VCF::ToolbarItem Class Reference
#include <vcf/ApplicationKit/Toolbar.h>
Inheritance diagram for VCF::ToolbarItem:
List of all members.
|
Public Types |
| enum | {
tbCaptionChanged = 200431,
tbTooltipChanged,
tbSelected,
tbDimensionsChanged,
tbAdded,
tbRemoved,
tbStateChanged,
tbImageIndexChanged,
tbStateImageIndexChanged,
tbIndexChanged,
tbItemControlAdded,
tbItemClicked,
tbItemUpdate,
tbGroupChanged,
tbCheckChanged
} |
| enum | ToolbarItemState {
tisNone = 0,
tisSeparator = 0x01,
tisSelected = 0x10,
tisPressed = 0x20,
tisEnabled = 0x40,
tisGrouped = 0x100,
tisChecked = 0x200
} |
Public Member Functions |
| | ToolbarItem () |
| virtual void | click () |
| | This represents the user pressing the button, which then invokes whatever command is associated with the button.
|
| virtual void | setDefault (const bool &defaultButton) |
| | sets this button as the default button.
|
| virtual bool | isDefault () |
| virtual bool | containsPoint (Point *pt) |
| virtual void | setBounds (Rect *bounds) |
| virtual int32 | getStateImageIndex () |
| virtual void | setStateImageIndex (const int32 &index) |
| virtual uint32 | getIndex () |
| virtual int32 | getImageIndex () |
| virtual void | setImageIndex (const int32 &imageIndex) |
| virtual void | setIndex (const uint32 &index) |
| virtual void | setDisplayState (const int32 &state) |
| virtual void | paint (GraphicsContext *context, Rect *paintRect) |
| virtual bool | isSelected () |
| virtual void | setSelected (const bool &selected) |
| void | setWidth (const double &val) |
| double | getWidth () |
| String | getCaption () |
| void | setCaption (const String &val) |
| String | getTooltip () |
| void | setTooltip (const String &val) |
| void | setAsSeparator (const bool &val=true) |
| bool | isSeparator () |
| void | setPressed (const bool &val) |
| bool | isPressed () |
| void | setItemControl (Control *control) |
| Control * | getItemControl () |
| bool | isEnabled () |
| void | setEnabled (const bool &val) |
| void | internal_setBounds (const Rect &bounds) |
| | Utility method - not meant for public use.
|
| void | setGrouped (const bool &val) |
| bool | isGrouped () |
| void | setChecked (const bool &val) |
| bool | isChecked () |
| virtual bool | updateAction () |
| | Calling this triggers an update event to be fired.
|
| virtual void | handleEvent (Event *event) |
| | generic handler method for events.
|
Public Attributes |
| VCF::Delegate | ButtonDelegate |
| | ItemClicked |
| VCF::Delegate | EventDelegate |
| | ItemUpdate |
Protected Attributes |
| Control * | itemControl_ |
| int32 | imageStateIndex_ |
| String | caption_ |
| String | tooltip_ |
Member Enumeration Documentation
|
|
- Enumerator:
-
| tbCaptionChanged |
|
| tbTooltipChanged |
|
| tbSelected |
|
| tbDimensionsChanged |
|
| tbAdded |
|
| tbRemoved |
|
| tbStateChanged |
|
| tbImageIndexChanged |
|
| tbStateImageIndexChanged |
|
| tbIndexChanged |
|
| tbItemControlAdded |
|
| tbItemClicked |
|
| tbItemUpdate |
|
| tbGroupChanged |
|
| tbCheckChanged |
|
|
|
|
- Enumerator:
-
| tisNone |
|
| tisSeparator |
|
| tisSelected |
|
| tisPressed |
|
| tisEnabled |
|
| tisGrouped |
|
| tisChecked |
|
|
Constructor & Destructor Documentation
| VCF::ToolbarItem::ToolbarItem |
( |
|
) |
|
|
Member Function Documentation
| virtual void VCF::ToolbarItem::click |
( |
|
) |
[virtual] |
|
|
|
This represents the user pressing the button, which then invokes whatever command is associated with the button.
It should be called in the implementing controls class whenever the control is "clicked" on (see Control::mouseClick() ), it can also be called programmatically as well.
Implements VCF::Button. |
| virtual bool VCF::ToolbarItem::containsPoint |
( |
Point * |
pt |
) |
[virtual] |
|
| String VCF::ToolbarItem::getCaption |
( |
|
) |
[inline] |
|
| virtual int32 VCF::ToolbarItem::getImageIndex |
( |
|
) |
[inline, virtual] |
|
| virtual uint32 VCF::ToolbarItem::getIndex |
( |
|
) |
[virtual] |
|
| Control* VCF::ToolbarItem::getItemControl |
( |
|
) |
[inline] |
|
| virtual int32 VCF::ToolbarItem::getStateImageIndex |
( |
|
) |
[inline, virtual] |
|
| String VCF::ToolbarItem::getTooltip |
( |
|
) |
[inline] |
|
| double VCF::ToolbarItem::getWidth |
( |
|
) |
|
|
| virtual void VCF::ToolbarItem::handleEvent |
( |
Event * |
event |
) |
[virtual] |
|
|
|
generic handler method for events.
All UI events are sent here and then dispatched accordingly to a more specific event handler. If an Application class is present, then it is given a chance to "see" the event first before delegating it to the Component.
All events are dispatched by their type so it is important to correctly identify the event objects type if you would like it to be dispatched correctly. The method will call the appropriate component method, like afterCreate(), beforeDestroy(), etc. - Parameters:
-
Reimplemented from VCF::UIComponent. |
| void VCF::ToolbarItem::internal_setBounds |
( |
const Rect & |
bounds |
) |
|
|
|
|
Utility method - not meant for public use.
|
| bool VCF::ToolbarItem::isChecked |
( |
|
) |
|
|
| virtual bool VCF::ToolbarItem::isDefault |
( |
|
) |
[inline, virtual] |
|
| bool VCF::ToolbarItem::isEnabled |
( |
|
) |
|
|
| bool VCF::ToolbarItem::isGrouped |
( |
|
) |
|
|
| bool VCF::ToolbarItem::isPressed |
( |
|
) |
[inline] |
|
| virtual bool VCF::ToolbarItem::isSelected |
( |
|
) |
[virtual] |
|
| bool VCF::ToolbarItem::isSeparator |
( |
|
) |
[inline] |
|
| virtual void VCF::ToolbarItem::paint |
( |
GraphicsContext * |
context, |
|
|
Rect * |
paintRect |
|
) |
[inline, virtual] |
|
| void VCF::ToolbarItem::setAsSeparator |
( |
const bool & |
val = true |
) |
|
|
| virtual void VCF::ToolbarItem::setBounds |
( |
Rect * |
bounds |
) |
[virtual] |
|
| void VCF::ToolbarItem::setCaption |
( |
const String & |
val |
) |
|
|
| void VCF::ToolbarItem::setChecked |
( |
const bool & |
val |
) |
|
|
| virtual void VCF::ToolbarItem::setDefault |
( |
const bool & |
defaultButton |
) |
[inline, virtual] |
|
|
|
sets this button as the default button.
A default button will have it's click() event called whenever the enter key is hit.
Implements VCF::Button. |
| virtual void VCF::ToolbarItem::setDisplayState |
( |
const int32 & |
state |
) |
[virtual] |
|
| void VCF::ToolbarItem::setEnabled |
( |
const bool & |
val |
) |
|
|
| void VCF::ToolbarItem::setGrouped |
( |
const bool & |
val |
) |
|
|
| virtual void VCF::ToolbarItem::setImageIndex |
( |
const int32 & |
imageIndex |
) |
[virtual] |
|
| virtual void VCF::ToolbarItem::setIndex |
( |
const uint32 & |
index |
) |
[virtual] |
|
| void VCF::ToolbarItem::setItemControl |
( |
Control * |
control |
) |
|
|
| void VCF::ToolbarItem::setPressed |
( |
const bool & |
val |
) |
|
|
| virtual void VCF::ToolbarItem::setSelected |
( |
const bool & |
selected |
) |
[virtual] |
|
| virtual void VCF::ToolbarItem::setStateImageIndex |
( |
const int32 & |
index |
) |
[virtual] |
|
| void VCF::ToolbarItem::setTooltip |
( |
const String & |
val |
) |
|
|
| void VCF::ToolbarItem::setWidth |
( |
const double & |
val |
) |
|
|
| virtual bool VCF::ToolbarItem::updateAction |
( |
|
) |
[virtual] |
|
|
|
Calling this triggers an update event to be fired.
The default behaviour is to see if the component has an action associated with it, and then calls the action's update() method. - Returns:
- bool the method returns true if the component has an action and the action's update() method is called. Otherwise it returns false.
- See also:
- Action::update()
Reimplemented from VCF::UIComponent. |
Member Data Documentation
The documentation for this class was generated from the following file: