Toolbar art provider code - a tab provider provides all drawing functionality to the AuiToolBar
.
This allows the AuiToolBar
to have a pluggable 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.
Default class constructor. |
|
Clones the |
|
Draws a toolbar background with a gradient shading. |
|
Draws a toolbar item button. |
|
Draws a label for a toolbar control. |
|
Draws a toolbar dropdown button. |
|
Draws the toolbar gripper. |
|
Draws a toolbar item label. |
|
Draws the overflow button for the |
|
Draws a toolbar background with a plain colour. |
|
Draws a toolbar separator. |
|
Returns the |
|
Returns the size of a UI element in the |
|
Returns the |
|
Returns the label size for a toolbar item. |
|
Returns the toolbar orientation. |
|
Returns the |
|
Returns the toolbar item size. |
|
Returns the bitmap and text rectangles for a toolbar item. |
|
Sets the toolbar art flags. |
|
Sets the default colours, which are calculated from the given base colour. |
|
Sets the size of a UI element in the |
|
Sets the |
|
Sets the toolbar tool orientation. |
|
Sets the text orientation. |
|
Shows the drop down window menu for overflow items. |
Toolbar art provider code - a tab provider provides all drawing functionality to the AuiToolBar
.
This allows the AuiToolBar
to have a pluggable 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.
Default class constructor.
Clones the AuiDefaultToolBarArt
art.
Draws a toolbar background with a gradient shading.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
_rect (wx.Rect) – the AuiToolBarItem
rectangle;
horizontal (bool) – True
if the toolbar is horizontal, False
if it is vertical.
Draws a toolbar item button.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
item – an instance of AuiToolBarItem
;
rect (wx.Rect) – the AuiToolBarItem
rectangle.
Draws a label for a toolbar control.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
item – an instance of AuiToolBarItem
;
rect (wx.Rect) – the AuiToolBarItem
rectangle.
Draws a toolbar dropdown button.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
item – an instance of AuiToolBarItem
;
rect (wx.Rect) – the AuiToolBarItem
rectangle.
Draws the toolbar gripper.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
rect (wx.Rect) – the AuiToolBarItem
rectangle.
Draws a toolbar item label.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
item – an instance of AuiToolBarItem
;
rect (wx.Rect) – the AuiToolBarItem
rectangle.
Draws the overflow button for the AuiToolBar
.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
rect (wx.Rect) – the AuiToolBarItem
rectangle;
state (integer) – the overflow button state.
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).
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
_rect (wx.Rect) – the AuiToolBarItem
rectangle.
Draws a toolbar separator.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
_rect (wx.Rect) – the AuiToolBarItem
rectangle.
Returns the AuiDefaultToolBarArt
flags.
See also
SetAGWFlags
for more details.
Returns the size of a UI element in the AuiToolBar
.
element_id (integer) – can be one of the following:
Element Identifier |
Description |
---|---|
|
Separator size in |
|
Gripper size in |
|
Overflow button size in |
Returns the AuiDefaultToolBarArt
font.
Returns the label size for a toolbar item.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
item – an instance of AuiToolBarItem
.
Returns the toolbar orientation.
Returns the AuiDefaultToolBarArt
text orientation.
See also
SetTextOrientation
for more details.
Returns the toolbar item size.
dc – a wx.DC
device context;
wnd – a wx.Window
derived window;
item – an instance of AuiToolBarItem
.
Returns the bitmap and text rectangles for a toolbar item.
dc – a wx.DC
device context;
item – an instance of AuiToolBarItem
;
rect (wx.Rect) – the tool rectangle.
Sets the toolbar art flags.
agwFlags (integer) – a combination of the following values:
Flag name |
Description |
---|---|
|
Shows the text in the toolbar buttons; by default only icons are shown |
|
Don’t show tooltips on |
|
Do not auto-resize the |
|
Shows a gripper on the |
|
The |
|
The |
|
Shows the text and the icons alongside, not vertically stacked. This style
must be used with |
|
Don’t draw a gradient background on the toolbar |
|
Combination of |
Sets the default colours, which are calculated from the given base colour.
base_colour – an instance of wx.Colour
. If defaulted to None
, a colour
is generated accordingly to the platform and theme.
Sets the size of a UI element in the AuiToolBar
.
element_id (integer) – can be one of the following:
Element Identifier |
Description |
---|---|
|
Separator size in |
|
Gripper size in |
|
Overflow button size in |
size (integer) – the new size of the UI element.
Sets the AuiDefaultToolBarArt
font.
font (wx.Font) – the font used for displaying toolbar item labels.
Sets the toolbar tool orientation.
orientation (integer) – one of AUI_TBTOOL_HORIZONTAL
, AUI_TBTOOL_VERT_CLOCKWISE
or
AUI_TBTOOL_VERT_COUNTERCLOCKWISE
.
Sets the text orientation.
orientation (integer) – can be one of the following constants:
Orientation Switches |
Description |
---|---|
|
Text in |
|
Text in |
|
Text in |
|
Text in |