Public Member Functions

ButtonPropertyComponent Class Reference

A PropertyComponent that contains a button. More...

Inherits PropertyComponent.

List of all members.

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 *)

Detailed Description

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.

See also:
PropertyComponent

Constructor & Destructor Documentation

ButtonPropertyComponent::ButtonPropertyComponent ( const String propertyName,
bool  triggerOnMouseDown 
)

Creates a button component.

Parameters:
propertyNamethe property name to be passed to the PropertyComponent
triggerOnMouseDownthis is passed to the Button::setTriggeredOnMouseDown() method
ButtonPropertyComponent::~ButtonPropertyComponent (  )

Destructor.


Member Function Documentation

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  )

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines