Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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);
Property component for selecting colors with a visual color picker.
Definition gin_propertycomponents.h:145
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25
See also
PropertyComponentBase, juce::ColourSelector

Constructor & Destructor Documentation

◆ ColourPropertyComponent()

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

References addAndMakeVisible().

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: