A PropertyComponent that contains a button. More...
Inherits PropertyComponent.
Public Member Functions | |
| ButtonPropertyComponent (const String &propertyName, bool triggerOnMouseDown) | |
| Creates a button component. | |
| ~ButtonPropertyComponent () | |
| Destructor. | |
| virtual void | buttonClicked ()=0 |
| Called when the user clicks the button. | |
| virtual const String | getButtonText () const =0 |
| Returns the string that should be displayed in the button. | |
| void | refresh () |
| Updates the property component if the item it refers to has changed. | |
| void | buttonClicked (Button *) |
A PropertyComponent that contains a button.
This type of property component can be used if you need a button to trigger some kind of action.
| ButtonPropertyComponent::ButtonPropertyComponent | ( | const String & | propertyName, |
| bool | triggerOnMouseDown | ||
| ) |
Creates a button component.
| propertyName | the property name to be passed to the PropertyComponent |
| triggerOnMouseDown | this is passed to the Button::setTriggeredOnMouseDown() method |
| ButtonPropertyComponent::~ButtonPropertyComponent | ( | ) |
Destructor.
| virtual void ButtonPropertyComponent::buttonClicked | ( | ) | [pure virtual] |
Called when the user clicks the button.
| virtual const String ButtonPropertyComponent::getButtonText | ( | ) | const [pure virtual] |
Returns the string that should be displayed in the button.
If you need to change this string, call refresh() to update the component.
| void ButtonPropertyComponent::refresh | ( | ) | [virtual] |
Updates the property component if the item it refers to has changed.
A subclass must implement this method, and other objects may call it to force it to refresh itself.
The subclass should be economical in the amount of work is done, so for example it should check whether it really needs to do a repaint rather than just doing one every time this method is called, as it may be called when the value being displayed hasn't actually changed.
Implements PropertyComponent.
| void ButtonPropertyComponent::buttonClicked | ( | Button * | ) |