Toolbar¶
Constructor¶
Toolbar class has a complex constructor:
object Toolbar:new {
*number ID, string Name, object Parent,
*number Flags = TB_HORZ_TEXT
}
Constructor flags¶
These are the flags received by class constructor.
| Flag | Value | Description |
|---|---|---|
TB_FLAT |
32 |
“flat” buttons (Win32/GTK only) |
TB_HORIZONTAL |
4 |
lay out the toolbar horizontally |
TB_VERTICAL |
8 |
lay out the toolbar vertically |
TB_TEXT |
256 |
show the text (not shown by default) |
TB_NOICONS |
128 |
don’t show the icons (they’re shown by default) |
TB_NODIVIDER |
512 |
don’t show the divider between toolbar and the window (Win32 only) |
TB_NOALIGN |
1024 |
no automatic alignment (Win32 only, useless) |
TB_HORZ_LAYOUT |
2048 |
show the text and the icons alongside, not vertically stacked (Win32/GTK) |
TB_HORZ_TEXT |
2304 |
Combination of TB_HORZ_LAYOUT and TB_TEXT |
Inherited Methods¶
These methods are inherited from its super classes:
| Class Method | Description |
|---|---|
| Object:getID | Returns object’s identifier. |
| Object:setID | Sets the object identifier. |
| Object:getName | Returns object’s name. |
| Object:setName | Sets the object name. |
| Widget:getParent | Returns object’s parent. |
| Widget:setParent | Sets the object parent. |
| Widget:getBind | Returns the wxWidgets object. |
Class Methods¶
These methods are defined by this class.
Toolbar:addTool¶
Adds a tool to the toolbar.
Returns a number: index of tool.
| number | Toolbar:addTool( number nID, string sText, string sImage, string sTooltip ) |
Toolbar:addControl¶
Adds any control to the toolbar, typically e.g. a ComboBox.
| nil | Toolbar:addControl( object_ objControl ) |
Toolbar:getToolEnabled¶
Called to determine whether a tool is enabled (responds to user input).
| bool | Toolbar:getToolEnabled( number nToolID ) |
Toolbar:setImageSizes¶
Set size for tool’s bitmap.
| nil | Toolbar:setImageSizes( number nWidth, number nHeight ) |