#include <juce_BooleanPropertyComponent.h>
A PropertyComponent that contains an on/off toggle button.
This type of property component can be used if you have a boolean value to toggle on/off.
- See also
- PropertyComponent
Creates a button component.
If you use this constructor, you must override the getState() and setState() methods.
- Parameters
-
propertyName | the property name to be passed to the PropertyComponent |
buttonTextWhenTrue | the text shown in the button when the value is true |
buttonTextWhenFalse | the text shown in the button when the value is false |
Creates a button component.
Note that if you call this constructor then you must use the Value to interact with the button state, and you can't override the class with your own setState or getState methods. If you want to use getState and setState, call the other constructor instead.
- Parameters
-
valueToControl | a Value object that this property should refer to. |
propertyName | the property name to be passed to the PropertyComponent |
buttonText | the text shown in the ToggleButton component |
BooleanPropertyComponent::~BooleanPropertyComponent |
( |
| ) |
|
void BooleanPropertyComponent::buttonClicked |
( |
Button * |
| ) |
|
|
overridevirtual |
bool BooleanPropertyComponent::getState |
( |
| ) |
const |
|
virtual |
Must return the current value of the property.
void BooleanPropertyComponent::paint |
( |
Graphics & |
g | ) |
|
|
override |
void BooleanPropertyComponent::refresh |
( |
| ) |
|
|
override |
void BooleanPropertyComponent::setState |
( |
bool |
newState | ) |
|
|
virtual |
Called to change the state of the boolean value.
The documentation for this class was generated from the following files: