VCF::ToolbarItem Class Reference
#include <vcf/ApplicationKit/Toolbar.h>
Inheritance diagram for VCF::ToolbarItem:

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 | addButtonClickHandler (EventHandler *handler) |
| Adds a new EventHandler for button click events. | |
| virtual void | removeButtonClickHandler (EventHandler *handler) |
| Removes an EventHandler for button click events. | |
| 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) |
| This is called to determine if a given point is within the bounds of the item. | |
| virtual Rect * | getBounds () |
| returns the Bounds for the Item or NULL if not applicable. | |
| virtual void | setBounds (Rect *bounds) |
| virtual int32 | getStateImageIndex () |
| This image index represents the state of an particular item separate from whether or not it is selected. | |
| virtual void | setStateImageIndex (const int32 &index) |
| virtual uint32 | getIndex () |
| Returns the index of the item within it's model. | |
| virtual int32 | getImageIndex () |
| virtual void | setImageIndex (const int32 &imageIndex) |
| virtual void | setIndex (const uint32 &index) |
| virtual void * | getData () |
| Returns some application defined data. | |
| virtual void | setData (void *data) |
| Sets the application defined data. | |
| virtual void | setState (const int32 &state) |
| Sets the state for the item. | |
| virtual bool | canPaint () |
| indicates whether the item can paint itself. | |
| virtual void | paint (GraphicsContext *context, Rect *paintRect) |
| virtual bool | isSelected () |
| virtual void | setSelected (const bool &selected) |
| void | setWidth (const double &val) |
| String | getCaption () |
| void | setCaption (const String &val) |
| String | getTooltip () |
| void | setTooltip (const String &val) |
| void | setAsSeparator () |
| void | setPressed (bool val) |
| 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 | ItemClicked |
| VCF::Delegate | ItemUpdate |
Protected Attributes | |
| Control * | itemControl_ |
| void * | data_ |
| int32 | imageIndex_ |
| int32 | imageStateIndex_ |
| Rect | bounds_ |
| String | caption_ |
| String | tooltip_ |
Member Enumeration Documentation
|
|
|
|
|
|
Constructor & Destructor Documentation
|
|
|
Member Function Documentation
|
|
Adds a new EventHandler for button click events.
Implements VCF::Button. |
|
|
indicates whether the item can paint itself. In general this is often false, but when true, the control that contains the item should call the item's paint() method whenever the item needs repainting. Implements VCF::Item. |
|
|
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. |
|
|
This is called to determine if a given point is within the bounds of the item. The bounds may be slightly different than what is returned by getBounds(). For example, an item may not support getBounds(), but may have a non-rectangular region and may implement containsPoint() accordingly. Implements VCF::Item. |
|
|
returns the Bounds for the Item or NULL if not applicable.
Implements VCF::Item. |
|
|
|
|
|
Returns some application defined data. This can be anything you want, hence the void* storage. Implements VCF::Item. |
|
|
Implements VCF::Item. |
|
|
Returns the index of the item within it's model.
Implements VCF::Item. |
|
|
|
|
|
This image index represents the state of an particular item separate from whether or not it is selected. Typically it is offset horizontally from the regular image that getImageIndex() represents. This image is frequently used to represent check marks for things like tree or list controls. Implements VCF::Item. |
|
|
|
|
|
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.
Reimplemented from VCF::Component. |
|
|
Utility method - not meant for public use.
|
|
|
|
|
|
Implements VCF::Button. |
|
|
|
|
|
|
|
|
Implements VCF::Item. |
|
||||||||||||
|
Implements VCF::Item. |
|
|
Removes an EventHandler for button click events.
Implements VCF::Button. |
|
|
|
|
|
Implements VCF::Item. |
|
|
|
|
|
|
|
|
Sets the application defined data.
Implements VCF::Item. |
|
|
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. |
|
|
|
|
|
|
|
|
Implements VCF::Item. |
|
|
Implements VCF::Item. |
|
|
|
|
|
|
|
|
Implements VCF::Item. |
|
|
Sets the state for the item. This is made virtual to allow subclasses to customize the behaviour. Reimplemented from VCF::Item. |
|
|
Implements VCF::Item. |
|
|
|
|
|
|
|
|
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.
Reimplemented from VCF::Component. |
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/Toolbar.h
