VCF::CommandButton Class Reference
The CommandButton is a native push button that fires an event when pressed, or "clicked". More...
#include <vcf/ApplicationKit/CommandButton.h>
Inheritance diagram for VCF::CommandButton:

Public Member Functions | |
| CommandButton () | |
| virtual | ~CommandButton () |
| virtual void | addButtonClickHandler (EventHandler *handler) |
| This macro creates a method for adding a listener to the CommandButton's events. | |
| virtual void | removeButtonClickHandler (EventHandler *handler) |
| This macro creates a method for removing a listener to the CommandButton's 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 void | setName (const String &name) |
| sets the name of the component. | |
| void | setCaption (const String &caption) |
| sets the caption for the button. | |
| String | getCaption () |
| ButtonCommandType | getCommandType () |
| The command type the button represents. | |
| void | setCommandType (const ButtonCommandType &commandType) |
| sets the | |
| virtual void | paint (GraphicsContext *context) |
| Paints the control. | |
| void | setIsPressed (const bool &pressed) |
| bool | isPressed () |
| virtual void | mnemonicActivate () |
| Pressing the accelerator character will cause the control's mnemonicActivate() method to be fired, which by default sets focus to the control. | |
| virtual double | getPreferredHeight () |
| returns the preferred height for this control. | |
| virtual double | getPreferredWidth () |
| returns the preferred width for this control. | |
| virtual bool | generatePropertyValue (const String &fullPropertyName, Property *property, VariantData *value, String &strValue) |
Public Attributes | |
| VCF::Delegate | ButtonDelegate |
| VCF::Delegate | ButtonClicked |
Protected Member Functions | |
| void | onFocusGained (FocusEvent *event) |
| void | onFocusLost (FocusEvent *event) |
Protected Attributes | |
| bool | isPressed_ |
| ButtonPeer * | buttonPeer_ |
| String | caption_ |
| ButtonCommandType | commandType_ |
Detailed Description
The CommandButton is a native push button that fires an event when pressed, or "clicked".
- Event Delegates for this class:
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
|
This macro creates a method for adding a listener to the CommandButton's events.
|
|
|
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. |
|
||||||||||||||||||||
|
Reimplemented from VCF::Control. |
|
|
|
|
|
The command type the button represents. Certain command types will automatically send the event to the dialog they belong to when used on modal dialogs. |
|
|
returns the preferred height for this control. This is used when determing the height of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size. Reimplemented from VCF::Control. |
|
|
returns the preferred width for this control. This is used when determing the width of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size. Reimplemented from VCF::Control. |
|
|
Implements VCF::Button. |
|
|
|
|
|
Pressing the accelerator character will cause the control's mnemonicActivate() method to be fired, which by default sets focus to the control.
Reimplemented from VCF::Control. |
|
|
|
|
|
|
|
|
Paints the control. Called by the underlying windowing system whenever the control needs to be painted. Note that in some cases the GraphicsContext passed in to this method may not be the same pointer as the GraphicsContext that the control holds itself. During the paint() method you should only use the context value for all your drawing and not the one returned in getContext(). The value returned by getContext() should be used for drawing that takes place outside of the paint() method. If the control allows paint notification, then the framework will fire an event to the BeforeControlPainted delegate prior to calling the control's paint() method. After the paint() method has returned, if the control allows paint notification, the framework will fire an event to the AfterControlPainted delegate. This allows outside observers to take part in the paint cycle, but beware that this does come at a bit of a cost, so use this feature sparingly. Note: This should NEVER be called by programmers using the VCF, it will be called for you during the course of your applications native event loop, and is only here for providing custom drawing routines for controls. In other words: you implement it, you never call it yourself.
Implements VCF::Control. |
|
|
This macro creates a method for removing a listener to the CommandButton's events.
|
|
|
sets the caption for the button. The is the text that is displayed on the button's face |
|
|
sets the
|
|
|
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. |
|
|
|
|
|
sets the name of the component. For naming conventions/rules please see getName(). Reimplemented from VCF::Component. |
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/CommandButton.h
