auibar.AuiToolBarItem

Inheritance diagram for AuiToolBarItem:


digraph inheritance87ff231de0 {
rankdir=LR;
size="8.0, 12.0";
  "auibar.AuiToolBarItem" [style="setlinewidth(0.5)",URL="#auibar.AuiToolBarItem",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10];
}


Description

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.

Class API

Methods

class AuiToolBarItem(item=None)

Bases: 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__()

Default class constructor.

Parameter:item – another instance of L{AuiToolBarItem}.
Assign(c)

Assigns the properties of the L{AuiToolBarItem} c to self.

Parameter:c – another instance of L{AuiToolBarItem}.
GetAlignment()
Returns the toolbar item alignment.
GetBitmap()
Returns the toolbar item bitmap.
GetDisabledBitmap()
Returns the toolbar item disabled bitmap.
GetHoverBitmap()
Returns the toolbar item hover bitmap.
GetId()
Returns the toolbar item identifier.
GetKind()
Returns the toolbar item kind. See L{SetKind} for more details.
GetLabel()
Returns the toolbar item label.
GetLongHelp()
Returns the long help string for the L{AuiToolBarItem}.
GetMinSize()
Returns the toolbar item minimum size.
GetProportion()
Returns the L{AuiToolBarItem} proportion in the toolbar.
GetShortHelp()
Returns the short help string for the L{AuiToolBarItem}.
GetSizerItem()
Returns the associated sizer item.
GetSpacerPixels()
Returns the number of pixels for a toolbar item with kind=``ITEM_SEPARATOR``.
GetState()
Returns the toolbar item state. See L{SetState} for more details.
GetUserData()
Returns the associated user data.
GetWindow()
Returns window associated to the toolbar item.
HasDropDown()
Returns whether the toolbar item has an associated dropdown menu or not.
IsActive()
Returns whether the toolbar item is active or not.
IsSticky()
Returns whether the toolbar item has a sticky behaviour or not.
SetActive(b)

Activates/deactivates the toolbar item.

Parameter:b – True to activate the item, False to deactivate it.
SetAlignment(l)

Sets the toolbar item alignment.

Parameter:l – the item alignment, which can be one of the available wx.Sizer alignments.
SetBitmap(bmp)

Sets the toolbar item bitmap.

Parameter:bmp – an instance of wx.Bitmap.
SetDisabledBitmap(bmp)

Sets the toolbar item disabled bitmap.

Parameter:bmp – an instance of wx.Bitmap.
SetHasDropDown(b)

Sets whether the toolbar item has an associated dropdown menu.

Parameter:b – True to set a dropdown menu, False otherwise.
SetHoverBitmap(bmp)

Sets the toolbar item hover bitmap.

Parameter:bmp – an instance of wx.Bitmap.
SetId(new_id)

Sets the toolbar item identifier.

Parameter:new_id – the new tool id.
SetKind(new_kind)

Sets the L{AuiToolBarItem} kind.

Parameter:kind – can be one of the following item:
Item Kind Description
ITEM_CONTROL The item in the AuiToolBar is a control
ITEM_LABEL The item in the AuiToolBar is a text label
ITEM_SPACER The item in the AuiToolBar is a spacer
ITEM_SEPARATOR The item in the AuiToolBar is a separator
ITEM_CHECK The item in the AuiToolBar is a toolbar check item
ITEM_NORMAL The item in the AuiToolBar is a standard toolbar item
ITEM_RADIO The item in the AuiToolBar is a toolbar radio item
SetLabel(s)

Sets the toolbar item label.

Parameter:s – a string specifying the toolbar item label.
SetLongHelp(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.

Parameter:s – the tool long help string.
SetMinSize(s)

Sets the toolbar item minimum size.

Parameter:s – an instance of wx.Size.
SetProportion(p)

Sets the L{AuiToolBarItem} proportion in the toolbar.

Parameter:p – the item proportion.
SetShortHelp(s)

Sets the short help string for the L{AuiToolBarItem}, to be displayed in a wx.ToolTip when the mouse hover over the toolbar item.

Parameter:s – the tool short help string.
SetSizerItem(s)

Associates a sizer item to this toolbar item.

Parameter:s – an instance of wx.SizerItem.
SetSpacerPixels(s)

Sets the number of pixels for a toolbar item with kind=``ITEM_SEPARATOR``.

Parameter:s – number of pixels.
SetState(new_state)

Sets the toolbar item state.

Parameter:state – can be one of the following states:
Button State Constant Description
AUI_BUTTON_STATE_NORMAL Normal button state
AUI_BUTTON_STATE_HOVER Hovered button state
AUI_BUTTON_STATE_PRESSED Pressed button state
AUI_BUTTON_STATE_DISABLED Disabled button state
AUI_BUTTON_STATE_HIDDEN Hidden button state
AUI_BUTTON_STATE_CHECKED Checked button state
SetSticky(b)

Sets whether the toolbar item is sticky (permanent highlight after mouse enter) or not.

Parameter:b – True to set the item as sticky, False otherwise.
SetUserData(l)

Associates some kind of user data to the toolbar item. The user data can be any Python object.

Parameter:l – a Python object.
SetWindow(w)

Assigns a window to the toolbar item.

Parameter:w – an instance of wx.Window.

Table Of Contents

This Page