wx.lib.agw.aui.auibar.AuiDefaultToolBarArt¶Toolbar art provider code - a tab provider provides all drawing functionality to the AuiToolBar.
This allows the AuiToolBar to have a plugable look-and-feel.
By default, a AuiToolBar uses an instance of this class called AuiDefaultToolBarArt
which provides bitmap art and a colour scheme that is adapted to the major platforms’
look. You can either derive from that class to alter its behaviour or write a
completely new tab art class. Call AuiToolBar.SetArtProvider to make use this new tab art.
Methods Summary¶__init__ |
Default class constructor. |
Clone |
Clones the AuiDefaultToolBarArt art. |
DrawBackground |
Draws a toolbar background with a gradient shading. |
DrawButton |
Draws a toolbar item button. |
DrawControlLabel |
Draws a label for a toolbar control. |
DrawDropDownButton |
Draws a toolbar dropdown button. |
DrawGripper |
Draws the toolbar gripper. |
DrawLabel |
Draws a toolbar item label. |
DrawOverflowButton |
Draws the overflow button for the AuiToolBar. |
DrawPlainBackground |
Draws a toolbar background with a plain colour. |
DrawSeparator |
Draws a toolbar separator. |
GetAGWFlags |
Returns the AuiDefaultToolBarArt flags. |
GetElementSize |
Returns the size of a UI element in the AuiToolBar. |
GetFont |
Returns the AuiDefaultToolBarArt font. |
GetLabelSize |
Returns the label size for a toolbar item. |
GetOrientation |
Returns the toolbar orientation. |
GetTextOrientation |
Returns the AuiDefaultToolBarArt text orientation. |
GetToolSize |
Returns the toolbar item size. |
GetToolsPosition |
Returns the bitmap and text rectangles for a toolbar item. |
SetAGWFlags |
Sets the toolbar art flags. |
SetDefaultColours |
Sets the default colours, which are calculated from the given base colour. |
SetElementSize |
Sets the size of a UI element in the AuiToolBar. |
SetFont |
Sets the AuiDefaultToolBarArt font. |
SetOrientation |
Sets the toolbar tool orientation. |
SetTextOrientation |
Sets the text orientation. |
ShowDropDown |
Shows the drop down window menu for overflow items. |
Class API¶AuiDefaultToolBarArt(object)¶Toolbar art provider code - a tab provider provides all drawing functionality to the AuiToolBar.
This allows the AuiToolBar to have a plugable look-and-feel.
By default, a AuiToolBar uses an instance of this class called AuiDefaultToolBarArt
which provides bitmap art and a colour scheme that is adapted to the major platforms’
look. You can either derive from that class to alter its behaviour or write a
completely new tab art class. Call AuiToolBar.SetArtProvider to make use this new tab art.
__init__(self)¶Default class constructor.
Clone(self)¶Clones the AuiDefaultToolBarArt art.
DrawBackground(self, dc, wnd, _rect, horizontal=True)¶Draws a toolbar background with a gradient shading.
| Parameters: |
|
|---|
DrawButton(self, dc, wnd, item, rect)¶Draws a toolbar item button.
| Parameters: |
|
|---|
DrawControlLabel(self, dc, wnd, item, rect)¶Draws a label for a toolbar control.
| Parameters: |
|
|---|
DrawDropDownButton(self, dc, wnd, item, rect)¶Draws a toolbar dropdown button.
| Parameters: |
|
|---|
DrawGripper(self, dc, wnd, rect)¶Draws the toolbar gripper.
| Parameters: |
|
|---|
DrawLabel(self, dc, wnd, item, rect)¶Draws a toolbar item label.
| Parameters: |
|
|---|
DrawOverflowButton(self, dc, wnd, rect, state)¶Draws the overflow button for the AuiToolBar.
| Parameters: |
|
|---|
DrawPlainBackground(self, dc, wnd, _rect)¶Draws a toolbar background with a plain colour.
This method contrasts with the default behaviour of the AuiToolBar that
draws a background gradient and this break the window design when putting
it within a control that has margin between the borders and the toolbar
(example: put AuiToolBar within a StaticBoxSizer that has a plain background).
| Parameters: |
|
|---|
DrawSeparator(self, dc, wnd, _rect)¶Draws a toolbar separator.
| Parameters: |
|
|---|
GetAGWFlags(self)¶Returns the AuiDefaultToolBarArt flags.
See also
SetAGWFlags for more details.
GetElementSize(self, element_id)¶Returns the size of a UI element in the AuiToolBar.
| Parameters: | element_id (integer) – can be one of the following:
|
|---|
GetFont(self)¶Returns the AuiDefaultToolBarArt font.
GetLabelSize(self, dc, wnd, item)¶Returns the label size for a toolbar item.
| Parameters: |
|
|---|
GetOrientation(self)¶Returns the toolbar orientation.
GetTextOrientation(self)¶Returns the AuiDefaultToolBarArt text orientation.
See also
SetTextOrientation for more details.
GetToolSize(self, dc, wnd, item)¶Returns the toolbar item size.
| Parameters: |
|
|---|
GetToolsPosition(self, dc, item, rect)¶Returns the bitmap and text rectangles for a toolbar item.
| Parameters: |
|
|---|
SetAGWFlags(self, agwFlags)¶Sets the toolbar art flags.
| Parameters: | agwFlags (integer) – a combination of the following values:
|
|---|
SetDefaultColours(self, base_colour=None)¶Sets the default colours, which are calculated from the given base colour.
| Parameters: | base_colour – an instance of wx.Colour. If defaulted to None, a colour
is generated accordingly to the platform and theme. |
|---|
SetElementSize(self, element_id, size)¶Sets the size of a UI element in the AuiToolBar.
| Parameters: |
|
|---|
SetFont(self, font)¶Sets the AuiDefaultToolBarArt font.
| Parameters: | font (wx.Font) – the font used for displaying toolbar item labels. |
|---|
SetOrientation(self, orientation)¶Sets the toolbar tool orientation.
| Parameters: | orientation (integer) – one of AUI_TBTOOL_HORIZONTAL, AUI_TBTOOL_VERT_CLOCKWISE or
AUI_TBTOOL_VERT_COUNTERCLOCKWISE. |
|---|
SetTextOrientation(self, orientation)¶Sets the text orientation.
| Parameters: | orientation (integer) – can be one of the following constants:
|
|---|