AuiToolBarItem is a toolbar element.
It has a unique id (except for the separators which always have id = -1), the style (telling whether it is a normal button, separator or a control), the state (toggled or not, enabled or not) and short and long help strings. The default implementations use the short help string for the tooltip text which is popped up when the mouse pointer enters the tool and the long help string for the applications status bar.
Default class constructor. |
|
Assigns the properties of the |
|
Returns the toolbar item alignment. |
|
Returns the toolbar item bitmap. |
|
Returns the toolbar item disabled bitmap. |
|
Returns the toolbar item hover bitmap. |
|
Returns the toolbar item identifier. |
|
Returns the toolbar item kind. |
|
Returns the toolbar item label. |
|
Returns the long help string for the |
|
Returns the toolbar item minimum size. |
|
Returns the toolbar tool orientation. |
|
Returns the |
|
Returns the correct bitmap depending on the tool orientation. |
|
Returns the short help string for the |
|
Returns the associated sizer item. |
|
Returns the number of pixels for a toolbar item with kind = |
|
Returns the toolbar item state. |
|
Returns the associated user data. |
|
Returns window associated to the toolbar item. |
|
Returns whether the toolbar item has an associated dropdown menu or not. |
|
Returns whether the toolbar item is active or not. |
|
Returns whether the toolbar item has a sticky behaviour or not. |
|
Activates/deactivates the toolbar item. |
|
Sets the toolbar item alignment. |
|
Sets the toolbar item bitmap. |
|
Sets the toolbar item disabled bitmap. |
|
Sets whether the toolbar item has an associated dropdown menu. |
|
Sets the toolbar item hover bitmap. |
|
Sets the toolbar item identifier. |
|
Sets the |
|
Sets the toolbar item label. |
|
Sets the long help string for the toolbar item. This string is shown in the |
|
Sets the toolbar item minimum size. |
|
Sets the toolbar tool orientation. |
|
Sets the |
|
Sets the short help string for the |
|
Associates a sizer item to this toolbar item. |
|
Sets the number of pixels for a toolbar item with kind = |
|
Sets the toolbar item state. |
|
Sets whether the toolbar item is sticky (permanent highlight after mouse enter) |
|
Associates some kind of user data to the toolbar item. |
|
Assigns a window to the toolbar item. |
AuiToolBarItem
(object)¶AuiToolBarItem is a toolbar element.
It has a unique id (except for the separators which always have id = -1), the style (telling whether it is a normal button, separator or a control), the state (toggled or not, enabled or not) and short and long help strings. The default implementations use the short help string for the tooltip text which is popped up when the mouse pointer enters the tool and the long help string for the applications status bar.
__init__
(self, item=None)¶Default class constructor.
item – another instance of AuiToolBarItem
.
Assign
(self, c)¶Assigns the properties of the AuiToolBarItem
c to self.
c – another instance of AuiToolBarItem
.
GetAlignment
(self)¶Returns the toolbar item alignment.
GetBitmap
(self)¶Returns the toolbar item bitmap.
GetDisabledBitmap
(self)¶Returns the toolbar item disabled bitmap.
GetHoverBitmap
(self)¶Returns the toolbar item hover bitmap.
GetId
(self)¶Returns the toolbar item identifier.
GetLabel
(self)¶Returns the toolbar item label.
GetLongHelp
(self)¶Returns the long help string for the AuiToolBarItem
.
GetMinSize
(self)¶Returns the toolbar item minimum size.
GetOrientation
(self)¶Returns the toolbar tool orientation.
GetProportion
(self)¶Returns the AuiToolBarItem
proportion in the toolbar.
GetRotatedBitmap
(self, disabled)¶Returns the correct bitmap depending on the tool orientation.
disabled (bool) – whether to return the disabled bitmap or not.
GetShortHelp
(self)¶Returns the short help string for the AuiToolBarItem
.
GetSizerItem
(self)¶Returns the associated sizer item.
GetSpacerPixels
(self)¶Returns the number of pixels for a toolbar item with kind = ITEM_SEPARATOR
.
GetUserData
(self)¶Returns the associated user data.
GetWindow
(self)¶Returns window associated to the toolbar item.
HasDropDown
(self)¶Returns whether the toolbar item has an associated dropdown menu or not.
IsActive
(self)¶Returns whether the toolbar item is active or not.
IsSticky
(self)¶Returns whether the toolbar item has a sticky behaviour or not.
SetActive
(self, b)¶Activates/deactivates the toolbar item.
b (bool) – True
to activate the item, False
to deactivate it.
SetAlignment
(self, align)¶Sets the toolbar item alignment.
align (integer) – the item alignment, which can be one of the available wx.Sizer
alignments.
SetBitmap
(self, bmp)¶Sets the toolbar item bitmap.
bmp (wx.Bitmap) – the image associated with this AuiToolBarItem
.
SetDisabledBitmap
(self, bmp)¶Sets the toolbar item disabled bitmap.
bmp (wx.Bitmap) – the disabled image associated with this AuiToolBarItem
.
SetHasDropDown
(self, b)¶Sets whether the toolbar item has an associated dropdown menu.
b (bool) – True
to set a dropdown menu, False
otherwise.
SetHoverBitmap
(self, bmp)¶Sets the toolbar item hover bitmap.
bmp (wx.Bitmap) – the hover image associated with this AuiToolBarItem
.
SetId
(self, new_id)¶Sets the toolbar item identifier.
new_id (integer) – the new tool id.
SetKind
(self, new_kind)¶Sets the AuiToolBarItem
kind.
new_kind (integer) – can be one of the following items:
Item Kind |
Description |
---|---|
|
The item in the |
|
The item in the |
|
The item in the |
|
The item in the |
|
The item in the |
|
The item in the |
|
The item in the |
SetLabel
(self, s)¶Sets the toolbar item label.
s (string) – the toolbar item label.
SetLongHelp
(self, s)¶Sets the long help string for the toolbar item. This string is shown in the statusbar (if any) of the parent frame when the mouse pointer is inside the tool.
s (string) – the tool long help string.
SetMinSize
(self, s)¶Sets the toolbar item minimum size.
s (wx.Size) – the toolbar item minimum size.
SetOrientation
(self, a)¶Sets the toolbar tool orientation.
a (integer) – one of AUI_TBTOOL_HORIZONTAL
, AUI_TBTOOL_VERT_CLOCKWISE
or
AUI_TBTOOL_VERT_COUNTERCLOCKWISE
.
SetProportion
(self, p)¶Sets the AuiToolBarItem
proportion in the toolbar.
p (integer) – the item proportion.
SetShortHelp
(self, s)¶Sets the short help string for the AuiToolBarItem
, to be displayed in a
ToolTip
when the mouse hover over the toolbar item.
s (string) – the tool short help string.
SetSizerItem
(self, s)¶Associates a sizer item to this toolbar item.
s – an instance of wx.SizerItem
.
SetSpacerPixels
(self, s)¶Sets the number of pixels for a toolbar item with kind = ITEM_SEPARATOR
.
s (integer) – number of pixels.
SetState
(self, new_state)¶Sets the toolbar item state.
new_state – can be one of the following states:
Button State Constant |
Description |
---|---|
|
Normal button state |
|
Hovered button state |
|
Pressed button state |
|
Disabled button state |
|
Hidden button state |
|
Checked button state |
SetSticky
(self, b)¶Sets whether the toolbar item is sticky (permanent highlight after mouse enter) or not.
b (bool) – True
to set the item as sticky, False
otherwise.
SetUserData
(self, data)¶Associates some kind of user data to the toolbar item.
data (PyObject) – a Python object.
Note
The user data can be any Python object.
SetWindow
(self, w)¶Assigns a window to the toolbar item.
w (wx.Window) – associate this window w to the AuiToolBarItem
.