A type of button designed to go on a toolbar. More...
Inherits ToolbarItemComponent.
Public Member Functions | |
| ToolbarButton (int itemId, const String &labelText, Drawable *normalImage, Drawable *toggledOnImage) | |
| Creates a ToolbarButton. | |
| ~ToolbarButton () | |
| Destructor. | |
| bool | getToolbarItemSizes (int toolbarDepth, bool isToolbarVertical, int &preferredSize, int &minSize, int &maxSize) |
| void | paintButtonArea (Graphics &g, int width, int height, bool isMouseOver, bool isMouseDown) |
| void | contentAreaChanged (const Rectangle< int > &newBounds) |
A type of button designed to go on a toolbar.
This simple button can have two Drawable objects specified - one for normal use and another one (optionally) for the button's "on" state if it's a toggle button.
| ToolbarButton::ToolbarButton | ( | int | itemId, | |
| const String & | labelText, | |||
| Drawable * | normalImage, | |||
| Drawable * | toggledOnImage | |||
| ) |
Creates a ToolbarButton.
| itemId | the ID for this toolbar item type. This is passed through to the ToolbarItemComponent constructor | |
| labelText | the text to display on the button (if the toolbar is using a style that shows text labels). This is passed through to the ToolbarItemComponent constructor | |
| normalImage | a drawable object that the button should use as its icon. The object that is passed-in here will be kept by this object and will be deleted when no longer needed or when this button is deleted. | |
| toggledOnImage | a drawable object that the button can use as its icon if the button is in a toggled-on state (see the Button::getToggleState() method). If 0 is passed-in here, then the normal image will be used instead, regardless of the toggle state. The object that is passed-in here will be kept by this object and will be deleted when no longer needed or when this button is deleted. |
| ToolbarButton::~ToolbarButton | ( | ) |
Destructor.
| bool ToolbarButton::getToolbarItemSizes | ( | int | toolbarDepth, | |
| bool | isToolbarVertical, | |||
| int & | preferredSize, | |||
| int & | minSize, | |||
| int & | maxSize | |||
| ) | [virtual] |
For internal use only.
Implements ToolbarItemComponent.
| void ToolbarButton::paintButtonArea | ( | Graphics & | g, | |
| int | width, | |||
| int | height, | |||
| bool | isMouseOver, | |||
| bool | isMouseDown | |||
| ) | [virtual] |
For internal use only.
Implements ToolbarItemComponent.
| void ToolbarButton::contentAreaChanged | ( | const Rectangle< int > & | newBounds | ) | [virtual] |
For internal use only.
Implements ToolbarItemComponent.
1.6.3