Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ControlBox Class Reference

Container for organizing plugin controls on a grid layout with page support. More...

#include <gin_controlbox.h>

Inheritance diagram for ControlBox:

Public Member Functions

 ControlBox (ProcessorEditor &e)
 
juce::Rectangle< intgetGridArea (int x, int y, int w=1, int h=1)
 
void add (Component *c)
 
void add (int page, ParamComponent *c)
 
void setPage (int page)
 
- 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 ()
 

Additional Inherited Members

- 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 ()
 
virtual void paramChanged ()
 
void enablementChanged () override
 
void valueUpdated (Parameter *) override
 
void handleAsyncUpdate () override
 
- Protected Attributes inherited from MultiParamComponent
juce::Array< Parameter * > params
 
std::unique_ptr< juce::BubbleMessageComponent > bubble
 

Detailed Description

Container for organizing plugin controls on a grid layout with page support.

ControlBox provides a simple grid-based layout system for organizing multiple parameter controls (knobs, sliders, buttons) in a plugin UI. It supports multi-page layouts where controls can be shown/hidden based on the current page.

Key Features:

Usage:

// Add controls to default page (0)
auto* knob1 = new Knob(param1);
knob1->setBounds(box.getGridArea(0, 0)); // Grid position (0,0)
box.add(knob1);
// Add control to page 1
auto* knob2 = new Knob(param2);
knob2->setBounds(box.getGridArea(1, 0)); // Grid position (1,0)
box.add(1, knob2); // Add to page 1
// Switch pages
box.setPage(1); // Show page 1 controls, hide others
Container for organizing plugin controls on a grid layout with page support.
Definition gin_controlbox.h:42
Complete parameter control combining rotary slider, value readout, and modulation.
Definition gin_knob.h:57
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25
See also
PagedControlBox, MultiParamComponent, ProcessorEditor

Constructor & Destructor Documentation

◆ ControlBox()

ControlBox::ControlBox ( ProcessorEditor e)

Member Function Documentation

◆ getGridArea()

juce::Rectangle< int > ControlBox::getGridArea ( int  x,
int  y,
int  w = 1,
int  h = 1 
)

◆ add() [1/2]

void ControlBox::add ( Component *  c)

References addAndMakeVisible().

◆ add() [2/2]

void ControlBox::add ( int  page,
ParamComponent c 
)

References addAndMakeVisible().

◆ setPage()

void ControlBox::setPage ( int  page)

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