Home | Trees | Index | Help |
|
---|
Package wx :: Class RendererNative |
|
object
--+
|
RendererNative
One of the design principles of wxWidgets is to use the native widgets on every platform in order to be as close as possible to the native look and feel on every platform. However there are still cases when some generic widgets are needed for various reasons, but it can sometimes take a lot of messy work to make them conform to the native LnF.
The wx.RendererNative class is a collection of functions that have platform-specific implementations for drawing certain parts of genereic controls in ways that are as close to the native look as possible.
Note that each drawing function restores the wx.DC
attributes if it
changes them, so it is safe to assume that the same pen, brush and
colours that were active before the call to this function are still in
effect after it.
Method Summary | |
---|---|
__init__(self)
| |
Draw a check button. | |
Draw a button like the one used by wx.ComboBox to show a drop down
window. | |
Draw a drop down arrow that is suitable for use outside a combo box. | |
int |
Draw a header control button (such as what is used by wx.ListCtrl in report
mode.) The optimal size of the label (text and icons) is returned. |
int |
Draw the contents of a header control button, (label, sort arrows, etc.) Normally this is only called by DrawHeaderButton . |
Draw rectangle indicating that an item in e.g. | |
Draw a blank button. | |
Draw the border for a sash window: this border must be such that the sash drawn by DrawSplitterSash blends into it well. | |
Draw a sash. | |
Draw the expanded/collapsed icon for a tree control item. | |
RendererNative |
Return the currently used renderer (Static method) |
RendererNative |
Return the default (native) implementation for this platform -- this is also the one used by default but this may be changed by calling wx.RendererNative.Set in which case the return value of this method
may be different from the return value of wx.RendererNative.Get . (Static method)
|
RendererNative |
Return the generic implementation of the renderer. (Static method) |
int |
Returns the default height of a header button, either a fixed platform height if available, or a generic height based on the window's font. |
SplitterRenderParams |
Get the splitter parameters, see wx.SplitterRenderParams . |
RendererVersion |
Returns the version of the renderer. |
RendererNative |
Set the renderer to use, passing None reverts to using the default renderer. (Static method) |
Property Summary | |
---|---|
SplitterParams : See GetSplitterParams | |
thisown : The membership flag | |
Version : See GetVersion |
Instance Method Details |
---|
DrawCheckBox(self, win, dc, rect, flags=0)Draw a check button. Flags may use wx.CONTROL_CHECKED, wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
|
DrawComboBoxDropButton(self, win, dc, rect, flags=0)Draw a button like the one used by The flags parameter may have the wx.CONTROL_PRESSED or wx.CONTROL_CURRENT bits set.
|
DrawDropArrow(self, win, dc, rect, flags=0)Draw a drop down arrow that is suitable for use outside a combo box. Arrow will have a transparent background. rect is not entirely filled by the arrow. Instead, you should use bounding rectangle of a drop down button which arrow matches the size you need. flags may have the wx.CONTROL_PRESSED or wx.CONTROL_CURRENT bit set.
|
DrawHeaderButton(self, win, dc, rect, flags=0, sortArrow=HDR_SORT_ICON_NONE, params=None)Draw a header control button (such as what is used by
|
DrawHeaderButtonContents(self, win, dc, rect, flags=0, sortArrow=HDR_SORT_ICON_NONE, params=None)Draw the contents of a header control button, (label, sort
arrows, etc.) Normally this is only called by
|
DrawItemSelectionRect(self, win, dc, rect, flags=0)Draw rectangle indicating that an item in e.g. a list control has been selected or focused The flags parameter may be:
|
DrawPushButton(self, win, dc, rect, flags=0)Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and wx.CONTROL_ISDEFAULT
|
DrawSplitterBorder(self, win, dc, rect, flags=0)Draw the border for a sash window: this border must be such that the
sash drawn by
|
DrawSplitterSash(self, win, dc, size, position, orient, flags=0)Draw a sash. The orient parameter defines whether the sash should be vertical or horizontal and how the position should be interpreted.
|
DrawTreeItemButton(self, win, dc, rect, flags=0)Draw the expanded/collapsed icon for a tree control item.
|
GetHeaderButtonHeight(self, win)Returns the default height of a header button, either a fixed platform height if available, or a generic height based on the window's font.
|
GetSplitterParams(self, win)Get the splitter parameters, see
|
GetVersion(self)Returns the version of the renderer. Will be used for ensuring compatibility of dynamically loaded renderers.
|
Static Method Details |
---|
Get()Return the currently used renderer
|
GetDefault()Return the default (native) implementation for this platform -- this
is also the one used by default but this may be changed by calling
|
GetGeneric()Return the generic implementation of the renderer. Under some
platforms, this is the default renderer implementation, others have
platform-specific default renderer which can be retrieved by calling
|
Set(renderer)Set the renderer to use, passing None reverts to using the default renderer. Returns the previous renderer used with Set or None.
|
Property Details |
---|
SplitterParams
|
thisownThe membership flag |
VersionSee
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:10 2007 | http://epydoc.sf.net |