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

Advanced container with sliding page transitions for organizing controls. More...

#include <gin_controlbox.h>

Inheritance diagram for PagedControlBox:

Public Types

using ParamComponentPtr = ParamComponent*

Public Member Functions

 PagedControlBox (ProcessorEditor &e)
void addPage (const juce::String &name, int rows, int cols)
void addPageEnable (int pageIdx, gin::Parameter::Ptr p)
void addBottomButton (int pageIdx, Component *c)
void addControl (int pageIdx, Component *c, int x, int y, int cx=1, int cy=1)
void setPageOpen (int page, bool open)
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
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

Additional Inherited Members

Protected Attributes inherited from MultiParamComponent
juce::Array< Parameter * > params
std::unique_ptr< juce::BubbleMessageComponent > bubble

Detailed Description

Advanced container with sliding page transitions for organizing controls.

PagedControlBox extends ControlBox with animated page transitions. Pages slide over each other with smooth animations, providing a polished UI for plugins with many parameters organized into logical groups.

Key Features:

  • Multiple pages with smooth sliding animations
  • Grid-based layout per page
  • Automatic page positioning and sizing
  • Cover overlay for visual polish
  • Page open/close animation tracking

Usage:

PagedControlBox pagedBox(myEditor);
// Add pages with specified dimensions
pagedBox.addPage("Oscillator", 4, 6); // 4 rows, 6 columns
pagedBox.addPage("Filter", 3, 4);
pagedBox.addPage("Effects", 5, 5);
// Add controls to specific pages
pagedBox.addControl(0, 0, 0, knob1); // Page 0, grid (0,0)
pagedBox.addControl(1, 1, 2, slider1); // Page 1, grid (1,2)
// Animate to a page
pagedBox.goToPage(1); // Slide to page 1
PagedControlBox(ProcessorEditor &e)
Definition gin_controlbox.h:127
See also
ControlBox, MultiParamComponent

Member Typedef Documentation

◆ ParamComponentPtr

Constructor & Destructor Documentation

◆ PagedControlBox()

PagedControlBox::PagedControlBox ( ProcessorEditor & e)

References addAndMakeVisible().

Member Function Documentation

◆ addPage()

void PagedControlBox::addPage ( const juce::String & name,
int rows,
int cols )

References addAndMakeVisible().

◆ addPageEnable()

void PagedControlBox::addPageEnable ( int pageIdx,
gin::Parameter::Ptr p )

◆ addBottomButton()

void PagedControlBox::addBottomButton ( int pageIdx,
Component * c )

◆ addControl()

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

◆ setPageOpen()

void PagedControlBox::setPageOpen ( int page,
bool open )

◆ paramChanged()

void PagedControlBox::paramChanged ( )
overrideprotectedvirtual

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