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

A box for knobs with a header. More...

#include <gin_parambox.h>

Inheritance diagram for ParamBox:

Public Member Functions

 ParamBox (const juce::String &name)
void setTitle (const juce::String &name)
void addHeader (const juce::StringArray names, int idx, gin::Parameter::Ptr p)
void addEnable (gin::Parameter::Ptr p, bool includeButton=true)
void addModSource (juce::Component *c)
void addControl (juce::Component *c)
void addControl (juce::Component *p, juce::Component *c)
void addControl (juce::Component *c, int x, int y, int cx=1, int cy=1)
void addControl (juce::Component *c, float x, float y, float cx=1.0f, float cy=1.0f)
ParamHeader & getHeader ()
juce::Component & getFrame ()
Public Member Functions inherited from MultiParamComponent
 MultiParamComponent ()
 ~MultiParamComponent () override
juce::Colour dimIfNeeded (const juce::Colour &c)
Public Member Functions inherited from Parameter::ParameterListener
virtual ~ParameterListener ()

Protected Member Functions

void paramChanged () override
void paint (juce::Graphics &g) override
void resized () override
juce::Rectangle< int > getGridArea (int x, int y, int cx=1, int cy=1)
juce::Rectangle< int > getGridArea (float x, float y, float cx=1.0f, float cy=1.0f)
Protected Member Functions inherited from MultiParamComponent
void showBubble (const juce::String &text, const juce::Rectangle< int > &rc)
void hideBubble ()
void watchParam (Parameter *p)
void unwatchParam (Parameter *p)
void unwatchParams ()
void enablementChanged () override
void valueUpdated (Parameter *) override
void handleAsyncUpdate () override

Protected Attributes

ParamHeader header
juce::Component frame
juce::OwnedArray< Component > controls
juce::OwnedArray< Component > modSources
gin::Parameter::Ptr enableParam = nullptr
juce::OwnedArray< HeaderButton > headers
gin::Parameter::Ptr headerParam = nullptr
int headerIndex = 0
Protected Attributes inherited from MultiParamComponent
juce::Array< Parameter * > params
std::unique_ptr< juce::BubbleMessageComponent > bubble

Detailed Description

A box for knobs with a header.

Constructor & Destructor Documentation

◆ ParamBox()

ParamBox::ParamBox ( const juce::String & name)

References addAndMakeVisible(), frame, and header.

Member Function Documentation

◆ setTitle()

void ParamBox::setTitle ( const juce::String & name)

References header.

Referenced by addHeader().

◆ addHeader()

void ParamBox::addHeader ( const juce::StringArray names,
int idx,
gin::Parameter::Ptr p )

◆ addEnable()

void ParamBox::addEnable ( gin::Parameter::Ptr p,
bool includeButton = true )

◆ addModSource()

void ParamBox::addModSource ( juce::Component * c)

References addAndMakeVisible(), and modSources.

◆ addControl() [1/4]

void ParamBox::addControl ( juce::Component * c)

References controls, and frame.

◆ addControl() [2/4]

void ParamBox::addControl ( juce::Component * p,
juce::Component * c )

References controls.

◆ addControl() [3/4]

void ParamBox::addControl ( juce::Component * c,
int x,
int y,
int cx = 1,
int cy = 1 )

References controls, frame, and getGridArea().

◆ addControl() [4/4]

void ParamBox::addControl ( juce::Component * c,
float x,
float y,
float cx = 1.0f,
float cy = 1.0f )

References controls, frame, and getGridArea().

◆ getHeader()

ParamHeader & ParamBox::getHeader ( )

References header.

◆ getFrame()

juce::Component & ParamBox::getFrame ( )

References frame.

◆ paramChanged()

void ParamBox::paramChanged ( )
overrideprotectedvirtual

◆ paint()

void ParamBox::paint ( juce::Graphics & g)
overrideprotected

◆ resized()

void ParamBox::resized ( )
overrideprotected

References frame, header, headers, and modSources.

◆ getGridArea() [1/2]

juce::Rectangle< int > ParamBox::getGridArea ( int x,
int y,
int cx = 1,
int cy = 1 )
protected

Referenced by addControl(), and addControl().

◆ getGridArea() [2/2]

juce::Rectangle< int > ParamBox::getGridArea ( float x,
float y,
float cx = 1.0f,
float cy = 1.0f )
protected

Member Data Documentation

◆ header

ParamHeader ParamBox::header
protected

◆ frame

juce::Component ParamBox::frame
protected

◆ controls

juce::OwnedArray<Component> ParamBox::controls
protected

◆ modSources

juce::OwnedArray<Component> ParamBox::modSources
protected

Referenced by addModSource(), paramChanged(), and resized().

◆ enableParam

gin::Parameter::Ptr ParamBox::enableParam = nullptr
protected

Referenced by addEnable(), and paramChanged().

◆ headers

juce::OwnedArray<HeaderButton> ParamBox::headers
protected

Referenced by addHeader(), paramChanged(), and resized().

◆ headerParam

gin::Parameter::Ptr ParamBox::headerParam = nullptr
protected

Referenced by addHeader(), and paramChanged().

◆ headerIndex

int ParamBox::headerIndex = 0
protected

Referenced by addHeader(), and paramChanged().


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