GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing docs.wxpython.org — wx.RendererNative — wxPython 4.3.2 Docs
|
Draw a check box. |
|
Draw a check mark. |
|
Draw a native wx.Choice. |
|
Draw a collapse button. |
|
Draw a native wx.ComboBox. |
|
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. |
|
Draw a focus rectangle using the specified rectangle. |
|
Draw a progress bar in the specified rectangle. |
|
Draw the header control button (used, for example, by wx.ListCtrl). |
|
Draw the contents of a header control button (label, sort arrows, etc.). |
|
Draw a selection rectangle underneath the text as used e.g. |
|
Draw item text in the correct color based on selection status. |
|
Draw a blank push button that looks very similar to wx.Button. |
|
Draw a native wx.RadioButton bitmap. |
|
Draw the border for sash window: this border must be such that the sash drawn by |
|
Draw a sash. |
|
Draw a native wx.TextCtrl frame. |
|
Draw a title bar button in the given state. |
|
Draw the expanded/collapsed icon for a tree control item. |
|
Return the currently used renderer. |
|
Returns the size of a check box. |
|
Returns the size of a check mark. |
|
Returns the size of a collapse button. |
|
Return the default (native) implementation for this platform – this is also the one used by default but this may be changed by calling |
|
Returns the size of the expander used in tree-like controls. |
|
Return the generic implementation of the renderer. |
|
Returns the height of a header button, either a fixed platform height if available, or a generic height based on the win window’s font. |
|
Returns the horizontal margin on the left and right sides of header button’s label. |
|
Get the splitter parameters, see wx.SplitterRenderParams. |
|
This function is used for version checking: |
|
Load the renderer from the specified |
|
Set the renderer to use, passing nullptr reverts to using the default renderer (the global renderer must always exist). |
Properties Summary¶See |
Class API¶First, a brief introduction to RendererNative and why it is needed.
Draw a check box.
flags may have the CONTROL_CHECKED , CONTROL_CURRENT or CONTROL_UNDETERMINED bit set, see CONTROL_FLAGS.
Draw a check mark.
flags may have the CONTROL_DISABLED bit set, see CONTROL_FLAGS.
Added in version 4.1/wxWidgets-3.1.3.
Draw a collapse button.
flags may have the CONTROL_EXPANDED or CONTROL_CURRENT bit set, see CONTROL_FLAGS.
Added in version 4.1/wxWidgets-3.1.0.
Draw a native wx.ComboBox.
Draw a button like the one used by wx.ComboBox to show a drop down window.
The usual appearance is a downwards pointing arrow.
flags may have the CONTROL_PRESSED or CONTROL_CURRENT bit set, see CONTROL_FLAGS.
Draw a drop down arrow that is suitable for use outside a combo box.
Arrow will have 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 CONTROL_PRESSED or CONTROL_CURRENT bit set, see CONTROL_FLAGS.
Draw a focus rectangle using the specified rectangle.
The only supported flags is CONTROL_SELECTED for items which are selected. see CONTROL_FLAGS.
Draw a progress bar in the specified rectangle.
The value and max arguments determine the part of the progress bar that is drawn as being filled in, max must be strictly positive and value must be between 0 and max.
CONTROL_SPECIALmust be set in flags for the vertical gauges.
None
Added in version 4.1/wxWidgets-3.1.0.
Draw the header control button (used, for example, by wx.ListCtrl).
Depending on platforms the flags parameter may support the CONTROL_SELECTED CONTROL_DISABLED and CONTROL_CURRENT bits, see CONTROL_FLAGS.
win (wx.Window)
dc (wx.DC)
rect (wx.Rect)
flags (int)
sortArrow (HeaderSortIconType)
params (wx.HeaderButtonParams)
int
The optimal width to contain the unabbreviated label text or bitmap, the sort arrow if present, and internal margins.
Draw the contents of a header control button (label, sort arrows, etc.).
This function is normally only called by DrawHeaderButton .
Depending on platforms the flags parameter may support the CONTROL_SELECTED CONTROL_DISABLED and CONTROL_CURRENT bits, see CONTROL_FLAGS.
win (wx.Window)
dc (wx.DC)
rect (wx.Rect)
flags (int)
sortArrow (HeaderSortIconType)
params (wx.HeaderButtonParams)
int
The optimal width to contain the unabbreviated label text or bitmap, the sort arrow if present, and internal margins.
Draw a selection rectangle underneath the text as used e.g.
in a wx.ListCtrl.
The supported flags are CONTROL_SELECTED for items which are selected (e.g. often a blue rectangle) and CONTROL_CURRENT for the item that has the focus (often a dotted line around the item’s text). CONTROL_FOCUSED may be used to indicate if the control has the focus (otherwise the selection rectangle is e.g. often grey and not blue). This may be ignored by the renderer or deduced by the code directly from the win. Additionally CONTROL_CELL may be used to draw a cell inside a bigger selection area.
See also
Draw item text in the correct color based on selection status.
Background of the text should be painted with DrawItemSelectionRect .
The supported flags are CONTROL_SELECTED for items which are selected. CONTROL_FOCUSED may be used to indicate if the control has the focus. CONTROL_DISABLED may be used to indicate if the control is disabled.
win (wx.Window)
dc (wx.DC)
text (string)
rect (wx.Rect)
align (int)
flags (int)
ellipsizeMode (EllipsizeMode)
None
Added in version 4.1/wxWidgets-3.1.0.
See also
Draw a blank push button that looks very similar to wx.Button.
flags may have the CONTROL_PRESSED , CONTROL_CURRENT or CONTROL_ISDEFAULT bit set, see CONTROL_FLAGS.
Draw a native wx.RadioButton bitmap.
Draw the border for sash window: this border must be such that the sash drawn by DrawSplitterSash blends into it well.
Draw a sash.
The orient parameter defines whether the sash should be vertical or horizontal and how the position should be interpreted.
win (wx.Window)
dc (wx.DC)
size (wx.Size)
position (int)
orient (Orientation)
flags (int)
None
Draw a native wx.TextCtrl frame.
Draw a title bar button in the given state.
None
Draw the expanded/collapsed icon for a tree control item.
To draw an expanded button the flags parameter must contain CONTROL_EXPANDED bit, see CONTROL_FLAGS.
Return the currently used renderer.
Returns the size of a check box.
win (wx.Window) – A valid, i.e. non-null, window pointer which is used to get the theme defining the checkbox size under some platforms.
flags (int) – The only acceptable flag is CONTROL_CELL which means that just the size of the checkbox itself is returned, without any margins that are included by default. This parameter is only available in wxWidgets 3.1.4 or later.
Returns the size of a check mark.
win (wx.Window) – A valid, i.e. non-null, window pointer which is used to get the theme defining the checkmark size under some platforms.
Added in version 4.1/wxWidgets-3.1.3.
Returns the size of a collapse button.
dc parameter was of type wx.DC until wxWidgets 3.3.0, which changed it to wx.ReadOnlyDC as this function doesn’t modify the DC contents.
win (wx.Window)
dc (wx.ReadOnlyDC)
Added in version 4.1/wxWidgets-3.1.0.
Return the default (native) implementation for this platform – this is also the one used by default but this may be changed by calling Set in which case the return value of this method may be different from the return value of Get .
Returns the size of the expander used in tree-like controls.
win (wx.Window) – A valid, i.e. non-null, window pointer which is used to get the theme defining the expander size under some platforms.
Added in version 4.1/wxWidgets-3.1.3.
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 GetDefault .
Returns the height of a header button, either a fixed platform height if available, or a generic height based on the win window’s font.
win (wx.Window)
int
Returns the horizontal margin on the left and right sides of header button’s label.
win (wx.Window)
int
Added in version 2.9.2.
Get the splitter parameters, see wx.SplitterRenderParams.
The win parameter should be a wx.SplitterWindow.
win (wx.Window)
This function is used for version checking: Load refuses to load any shared libraries implementing an older or incompatible version.
Note
The implementation of this method is always the same in all renderers (simply construct wx.RendererVersion using the RendererVersion::Current_XXX values), but it has to be in the derived, not base, class, to detect mismatches between the renderers versions and so you have to implement it anew in all renderers.
Load the renderer from the specified DLL, the returned pointer must be deleted by caller if not nullptr when it is not used any more.
The name should be just the base name of the renderer and not the full name of the DLL file which is constructed differently (using DynamicLibrary.CanonicalizePluginName ) on different systems.
name (string)
Set the renderer to use, passing nullptr reverts to using the default renderer (the global renderer must always exist).
Return the previous renderer used with Set or nullptr if none.
renderer (wx.RendererNative)
See GetVersion