wx.aui.AuiToolBarArt¶
wx.aui.AuiToolBarArt is part of the AUI class framework and is the base class defining the interface for rendering wx.aui.AuiToolBar.
It is an abstract base class and its concrete AuiGenericToolBarArt and AuiMSWToolBarArt subclasses provide the implementations used by default under all non-MSW platforms and under MSW respectively.
See also wx.aui.AuiToolBar and AUI Overview.
Class Hierarchy¶
Known Subclasses¶
wx.aui.AuiDefaultToolBarArt, AuiGenericToolBarArt
Methods Summary¶
Returns the size of the given element in DIPs. |
|
Get the element size scaled by the |
|
Return the size of the label for the given item. |
|
Return the direction used for rendering text. |
|
Return the size of the given item. |
|
Sets the size of the given element in DIPs. |
|
Set the text direction for rendering text. |
|
Properties Summary¶
See |
|
See |
Class API¶
- class wx.aui.AuiToolBarArt(object)¶
Possible constructors:
AuiToolBarArt() -> None
AuiToolBarArt is part of the
AUIclass framework and is the base class defining the interface for rendering AuiToolBar.
Methods¶
- __init__(self)¶
- Return type:
None
- Clone(self)¶
- Return type:
- DrawBackground(self, dc, wnd, rect)¶
- DrawButton(self, dc, wnd, item, rect)¶
- Parameters:
dc (wx.DC)
wnd (wx.Window)
item (wx.aui.AuiToolBarItem)
rect (wx.Rect)
- Return type:
None
- DrawControlLabel(self, dc, wnd, item, rect)¶
- Parameters:
dc (wx.DC)
wnd (wx.Window)
item (wx.aui.AuiToolBarItem)
rect (wx.Rect)
- Return type:
None
- DrawDropDownButton(self, dc, wnd, item, rect)¶
- Parameters:
dc (wx.DC)
wnd (wx.Window)
item (wx.aui.AuiToolBarItem)
rect (wx.Rect)
- Return type:
None
- DrawGripper(self, dc, wnd, rect)¶
- DrawLabel(self, dc, wnd, item, rect)¶
- Parameters:
dc (wx.DC)
wnd (wx.Window)
item (wx.aui.AuiToolBarItem)
rect (wx.Rect)
- Return type:
None
- DrawOverflowButton(self, dc, wnd, rect, state)¶
- DrawPlainBackground(self, dc, wnd, rect)¶
- DrawSeparator(self, dc, wnd, rect)¶
- GetElementSize(self, elementId)¶
Returns the size of the given element in DIPs.
This function is typically more convenient to override, as it can just return the same value as was passed to
SetElementSize, but it shouldn’t usually be called, useGetElementSizeForWindowinstead.- Parameters:
elementId (int) – One of wx.aui.AuiToolBarArtSetting elements.
- Return type:
int
- Returns:
The size of the element in DIPs.
- GetElementSizeForWindow(self, elementId, window)¶
Get the element size scaled by the
DPIof the given window.This function should be used to get the size of the element in pixels.
The default version delegates to
GetElementSize, override this function if a different behaviour (e.g. to use some smarter algorithm for scaling instead of just multiplying by theDPIfactor) is needed.- Parameters:
elementId (int) – One of wx.aui.AuiToolBarArtSetting elements.
window (wx.Window) – A valid window, typically wx.aui.AuiToolBar itself.
- Return type:
int
- Returns:
The size of the element in pixels.
Added in version 4.3/wxWidgets-3.3.0.
See also
- GetFlags(self)¶
- Return type:
int
- GetLabelSize(self, dc, wnd, item)¶
Return the size of the label for the given item.
Note that the type of dc was wx.DC until wxWidgets 3.3.0, where it was changed to wx.ReadOnlyDC as this function doesn’t modify the DC contents.
- Parameters:
dc (wx.ReadOnlyDC)
wnd (wx.Window)
item (wx.aui.AuiToolBarItem)
- Return type:
Size
- GetTextDirection(self)¶
Return the direction used for rendering text.
Always returns
wx.aui.AuiTextDirection.LeftToRightin the base class.- Return type:
Added in version 4.3/wxWidgets-3.3.2.
- GetTextOrientation(self)¶
- Return type:
int
- GetToolSize(self, dc, wnd, item)¶
Return the size of the given item.
Note that the type of dc was wx.DC until wxWidgets 3.3.0, where it was changed to wx.ReadOnlyDC as this function doesn’t modify the DC contents.
- Parameters:
dc (wx.ReadOnlyDC)
wnd (wx.Window)
item (wx.aui.AuiToolBarItem)
- Return type:
Size
- SetElementSize(self, elementId, size)¶
Sets the size of the given element in DIPs.
Note that this function takes the size in DPI-independent pixels and this size will be scaled by the factor depending on the
DPIbeing actually used byGetElementSizeForWindow. In particular, do not usewx.Window.FromDIPfor the size argument passed to this function.- Parameters:
elementId (int) – One of wx.aui.AuiToolBarArtSetting elements.
size (int) – The size of the element in DIPs.
- Return type:
None
- SetFlags(self, flags)¶
- Parameters:
flags (int)
- Return type:
None
- SetTextDirection(self, direction)¶
Set the text direction for rendering text.
Does nothing in the base class, override this function to support vertical text rendering.
- Parameters:
direction (AuiTextDirection)
- Return type:
None
Added in version 4.3/wxWidgets-3.3.2.
- SetTextOrientation(self, orientation)¶
- Parameters:
orientation (int)
- Return type:
None
- ShowDropDown(self, wnd, items)¶
- Parameters:
wnd (wx.Window)
items (AuiToolBarItemArray)
- Return type:
int
Properties¶
- TextDirection¶
See
GetTextDirectionandSetTextDirection
- TextOrientation¶
See
GetTextOrientationandSetTextOrientation