Gin
Loading...
Searching...
No Matches
ColourPropertyComponent Class Reference

Property component for selecting colors with a visual color picker. More...

#include <gin_propertycomponents.h>

Inheritance diagram for ColourPropertyComponent:

Public Member Functions

 ColourPropertyComponent (const juce::Value &valueToControl, const juce::String &propertyName, bool showAlpha=false)
void refresh () override
void paint (juce::Graphics &g) override
Public Member Functions inherited from PropertyComponentBase
 PropertyComponentBase (const juce::Value &valueToControl, const juce::String &propertyName)
juce::Value & getValueObject ()

Additional Inherited Members

Protected Member Functions inherited from PropertyComponentBase
void valueChanged (juce::Value &) override
Protected Attributes inherited from PropertyComponentBase
juce::Value value

Detailed Description

Property component for selecting colors with a visual color picker.

ColourPropertyComponent displays a color swatch that shows the current color and opens a color selector popup when clicked. The color value is stored as a string (via Colour::toString()) in the bound Value object.

Usage:

Value colorValue("ff0080ff"); // ARGB hex string
ColourPropertyComponent colorProp(colorValue, "Background Color", true); // true = show alpha
propertyPanel.addProperty(&colorProp);
ColourPropertyComponent(const juce::Value &valueToControl, const juce::String &propertyName, bool showAlpha=false)
Definition gin_propertycomponents.h:147
See also
PropertyComponentBase, juce::ColourSelector

Constructor & Destructor Documentation

◆ ColourPropertyComponent()

ColourPropertyComponent::ColourPropertyComponent ( const juce::Value & valueToControl,
const juce::String & propertyName,
bool showAlpha = false )

Member Function Documentation

◆ refresh()

void ColourPropertyComponent::refresh ( )
override

◆ paint()

void ColourPropertyComponent::paint ( juce::Graphics & g)
override

The documentation for this class was generated from the following file: