Base class for wx.propgrid.PropertyGrid cell renderers.
Paints property category selection rectangle. |
|
Utility to draw editor’s value, or vertically aligned text if editor is |
|
Utility to draw vertically centered text. |
|
Returns size of the image in front of the editable area. |
|
Utility to be called after drawing is done, to revert whatever changes |
|
Utility to render cell bitmap and set text colour plus bg brush colour. |
|
Returns |
wx.propgrid.
PGCellRenderer
(RefCounter)¶Possible constructors:
PGCellRenderer() -> None
Base class for PropertyGrid cell renderers.
__init__
(self)¶None
DrawCaptionSelectionRect
(self, dc : DC, x : int, y : int, w : int, h : int)¶Paints property category selection rectangle.
dc (wx.DC) –
x (int) –
y (int) –
w (int) –
h (int) –
None
DrawEditorValue
(self, dc : DC, rect : Rect, xOffset : int, text : str, property : PGProperty, editor : PGEditor)¶Utility to draw editor’s value, or vertically aligned text if editor is None
.
dc (wx.DC) –
rect (wx.Rect) –
xOffset (int) –
text (string) –
property (wx.propgrid.PGProperty) –
editor (wx.propgrid.PGEditor) –
None
DrawText
(self, dc : DC, rect : Rect, imageWidth : int, text : str)¶Utility to draw vertically centered text.
GetImageSize
(self, property : PGProperty, column : int, item : int)¶Returns size of the image in front of the editable area.
property (wx.propgrid.PGProperty) –
column (int) –
item (int) –
Size
Note
If property is None
, then this call is for a custom value. In that case the item is index to wx.propgrid.PropertyGrid’s custom values.
PostDrawCell
(self, dc : DC, propGrid : PropertyGrid, cell : PGCell, flags : int)¶Utility to be called after drawing is done, to revert whatever changes PreDrawCell
did.
propGrid (wx.propgrid.PropertyGrid) – Property grid to which the cell belongs.
cell (wx.propgrid.PGCell) – Cell information.
flags (int) – Same as those passed to PreDrawCell
. See list of render flags.
None
PreDrawCell
(self, dc : DC, rect : Rect, propGrid : PropertyGrid, cell : PGCell, flags : int)¶Utility to render cell bitmap and set text colour plus bg brush colour.
rect (wx.Rect) – Box reserved for drawing.
propGrid (wx.propgrid.PropertyGrid) – Property grid to which the cell belongs.
cell (wx.propgrid.PGCell) – Cell information.
flags (int) – See list of render flags.
int
Returns image width, which, for instance, can be passed to DrawText
.
Render
(self, dc : DC, rect : Rect, propertyGrid : PropertyGrid, property : PGProperty, column : int, item : int, flags : int)¶Returns True
if rendered something in the foreground (text or bitmap).
rect (wx.Rect) – Box reserved for drawing.
propertyGrid (wx.propgrid.PropertyGrid) – Property grid in which property is displayed.
property (wx.propgrid.PGProperty) – Property to be rendered.
column (int) – Property cell column.
item (int) – Index of chosen item if combo popup is drawn, -1 otherwise.
flags (int) – See list of render flags.
bool