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

Main plugin editor component for Gin-based audio plugins. More...

#include <gin_plugineditor.h>

Inheritance diagram for ProcessorEditor:

Public Member Functions

 ProcessorEditor (Processor &) noexcept
 ProcessorEditor (Processor &, int cx, int cy) noexcept
 ~ProcessorEditor () override
virtual void addMenuItems (juce::PopupMenu &)
virtual void showAboutInfo ()
void refreshProgramsList ()
void refreshPatchBrowser ()
void showPatchBrowser (bool p)
Public Member Functions inherited from ProcessorEditorBase
 ProcessorEditorBase (Processor &p, int cx_, int cy_)
 ~ProcessorEditorBase () override
void makeResizable (int minX, int minY, int maxX, int maxY)
void resized () override
void globalFocusChanged (juce::Component *) override
void paintOverChildren (juce::Graphics &g) override
void addControl (ParamComponent *c, int x=0, int y=0, int w=1, int h=1)
virtual juce::Rectangle< int > getControlsArea ()
virtual juce::Rectangle< int > getGridArea (int x, int y, int w=1, int h=1)
juce::Rectangle< int > getFullGridArea ()
int getGridWidth ()
int getGridHeight ()
virtual bool getUseIncreasedKeyboardAccessibility ()
virtual void setUseIncreasedKeyboardAccessibility (bool accessible)

Public Attributes

Processor & slProc
Public Attributes inherited from ProcessorEditorBase
juce::ComponentBoundsConstrainer resizeLimits

Protected Member Functions

void handleAsyncUpdate () override
void paint (juce::Graphics &g) override
void resized () override
Protected Member Functions inherited from ProcessorEditorBase
void setGridSize (int x, int y, int extraWidthPx=0, int extraHeightPx=0)
ParamComponent * componentForId (const juce::String &uid)
ParamComponent * componentForParam (Parameter &param)

Protected Attributes

PatchBrowser patchBrowser { slProc }
std::unique_ptr< TitleBar > titleBar
 Null when ProcessorOptions::useTitleBar is false - a plugin supplying its own header wants the stock one absent rather than hidden, so that it is not paying for a second update and news checker.
std::unique_ptr< MidiLearnOverlay > midiLearnOverlay
Protected Attributes inherited from ProcessorEditorBase
Processor & ginProcessor
std::unique_ptr< juce::ResizableCornerComponent > resizer
const int cx
const int cy
juce::OwnedArray< ParamComponent > controls
int headerHeight = 40
int inset = 4
int cols = 0
int rows = 0
int extraWidthPx = 0
int extraHeightPx = 0
juce::TooltipWindow tooltipWindow { this, 0 }

Detailed Description

Main plugin editor component for Gin-based audio plugins.

ProcessorEditor provides the primary user interface for audio plugins built with the Gin framework. It extends ProcessorEditorBase with integrated support for preset management, patch browsing, and plugin menu systems.

Key Features:

  • Integrated title bar with preset management UI
  • Patch browser for navigating and managing presets
  • Automatic program list synchronization
  • Customizable menu system via addMenuItems()
  • About/info display functionality
  • Grid-based control layout inherited from ProcessorEditorBase

The editor automatically manages:

  • Preset browser visibility and state
  • Program list updates
  • Async UI updates for thread-safe operations
  • Title bar with preset controls

Usage: Inherit from ProcessorEditor in your plugin and implement your UI layout in the constructor. Override addMenuItems() to add custom menu options and showAboutInfo() to customize the about dialog.

class MyPluginEditor : public ProcessorEditor
{
public:
MyPluginEditor(MyProcessor& p)
: ProcessorEditor(p, 4, 6) // 4x6 grid
{
// Add your controls using addControl()
addControl(filterKnob, 0, 0);
addControl(resonanceKnob, 1, 0);
}
void addMenuItems(juce::PopupMenu& menu) override
{
menu.addItem("Custom Action", [] { });
}
};
void addControl(ParamComponent *c, int x=0, int y=0, int w=1, int h=1)
Definition gin_plugineditor.h:129
ProcessorEditor(Processor &) noexcept
virtual void addMenuItems(juce::PopupMenu &)
Definition gin_plugineditor.h:290
See also
ProcessorEditorBase, TitleBar, PatchBrowser, Processor

Constructor & Destructor Documentation

◆ ProcessorEditor() [1/2]

ProcessorEditor::ProcessorEditor ( Processor & )
noexcept

◆ ProcessorEditor() [2/2]

ProcessorEditor::ProcessorEditor ( Processor & ,
int cx,
int cy )
noexcept

◆ ~ProcessorEditor()

ProcessorEditor::~ProcessorEditor ( )
override

Member Function Documentation

◆ addMenuItems()

virtual void ProcessorEditor::addMenuItems ( juce::PopupMenu & )
virtual

◆ showAboutInfo()

virtual void ProcessorEditor::showAboutInfo ( )
virtual

◆ refreshProgramsList()

void ProcessorEditor::refreshProgramsList ( )

◆ refreshPatchBrowser()

void ProcessorEditor::refreshPatchBrowser ( )

◆ showPatchBrowser()

void ProcessorEditor::showPatchBrowser ( bool p)

◆ handleAsyncUpdate()

void ProcessorEditor::handleAsyncUpdate ( )
overrideprotected

◆ paint()

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

◆ resized()

void ProcessorEditor::resized ( )
overrideprotected

Member Data Documentation

◆ slProc

Processor& ProcessorEditor::slProc

◆ patchBrowser

PatchBrowser ProcessorEditor::patchBrowser { slProc }
protected

◆ titleBar

std::unique_ptr<TitleBar> ProcessorEditor::titleBar
protected

Null when ProcessorOptions::useTitleBar is false - a plugin supplying its own header wants the stock one absent rather than hidden, so that it is not paying for a second update and news checker.

◆ midiLearnOverlay

std::unique_ptr<MidiLearnOverlay> ProcessorEditor::midiLearnOverlay
protected

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