virtual void setState(bool newState)
Called to change the state of the boolean value.
void paint(Graphics &) override
Components can override this method to draw their content.
~BooleanPropertyComponent() override
Destructor.
void refresh() override
Updates the property component if the item it refers to has changed.
BooleanPropertyComponent(const String &propertyName, const String &buttonTextWhenTrue, const String &buttonTextWhenFalse)
Creates a button component.
virtual bool getState() const
Must return the current value of the property.
@ backgroundColourId
The colour to fill the background of the button area.
@ outlineColourId
The colour to use to draw an outline around the text area.
void addAndMakeVisible(Component *child, int zOrder=-1)
Adds a child component to this one, and also makes the child visible if it isn't already.
Rectangle< int > getBounds() const noexcept
Returns this component's bounding box.
Colour findColour(int colourID, bool inheritFromParent=false) const
Looks for a colour that has been registered with the given colour ID number.
A graphics context, used for drawing a component or image.
void drawRect(int x, int y, int width, int height, int lineThickness=1) const
Draws a rectangular outline, using the current colour or brush.
void fillRect(Rectangle< int > rectangle) const
Fills a rectangle with the current colour or brush.
void setColour(Colour newColour)
Changes the current drawing colour.
A base class for a component that goes in a PropertyPanel and displays one of an item's properties.
void paint(Graphics &) override
The default paint method fills the background and draws a label for the item's name.
Represents a shared variant value.
void referTo(const Value &valueToReferTo)
Makes this object refer to the same underlying ValueSource as another one.
@ sendNotification
Requests a notification message, either synchronous or not.
@ dontSendNotification
No notification message should be sent.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...