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

Preset/patch browser component with filtering by author and tags. More...

#include <gin_patchbrowser.h>

Inherits juce::Component.

Classes

struct  AuthorsModel
struct  TagsModel
struct  PresetsModel

Public Member Functions

 PatchBrowser (Processor &p)
void next ()
void prev ()
void selectionUpdated ()
void refresh ()
void resized () override
void paint (juce::Graphics &g) override
void editPreset (int row)
void deletePreset (int row)

Public Attributes

Processor & proc
AuthorsModel authorsModel { *this }
TagsModel tagsModel { *this }
PresetsModel presetsModel { *this }
juce::ListBox authors { "", &authorsModel }
juce::ListBox tags { "", &tagsModel }
juce::ListBox presets { "", &presetsModel }
bool updatingSelection = false
juce::StringArray currentAuthors
juce::StringArray currentTags
juce::StringArray currentPresets
juce::StringArray selectedAuthors
juce::StringArray selectedTags

Detailed Description

Preset/patch browser component with filtering by author and tags.

PatchBrowser provides a comprehensive UI for browsing, selecting, and managing audio plugin presets. It features three list views for filtering by author, tags, and displaying matching presets. The browser supports preset navigation, editing, and deletion.

Key Features:

  • Three-column layout: Authors, Tags, and Presets
  • Multi-criteria filtering (by author and/or tag)
  • Keyboard navigation (next/previous)
  • Context menu support for editing and deleting presets
  • Automatic selection synchronization
  • Integrated with Gin Processor preset system

UI Layout:

  • Left column: List of preset authors
  • Middle column: List of tags/categories
  • Right column: Filtered list of presets
  • Selection in authors/tags filters the presets list

Usage:

class MyEditor : public ProcessorEditor
{
PatchBrowser patchBrowser { processor };
MyEditor()
{
patchBrowser.refresh(); // Update preset lists
}
};
void refresh()
PatchBrowser(Processor &p)
Main plugin editor component for Gin-based audio plugins.
Definition gin_plugineditor.h:284
PatchBrowser patchBrowser
Definition gin_plugineditor.h:305
void addAndMakeVisible(juce::Component &parent, juce::Array< juce::Component * > children)
Adds an Array of components to a parent Component.
Definition gin_componentutils.h:16

The browser automatically updates when the processor's preset changes and notifies the processor when a new preset is selected.

See also
Processor, ProcessorEditor, TitleBar

Constructor & Destructor Documentation

◆ PatchBrowser()

Member Function Documentation

◆ next()

void PatchBrowser::next ( )

◆ prev()

void PatchBrowser::prev ( )

◆ selectionUpdated()

void PatchBrowser::selectionUpdated ( )

◆ refresh()

void PatchBrowser::refresh ( )

◆ resized()

void PatchBrowser::resized ( )
override

◆ paint()

void PatchBrowser::paint ( juce::Graphics & g)
override

◆ editPreset()

void PatchBrowser::editPreset ( int row)

◆ deletePreset()

void PatchBrowser::deletePreset ( int row)

Member Data Documentation

◆ proc

Processor& PatchBrowser::proc

◆ authorsModel

AuthorsModel PatchBrowser::authorsModel { *this }

◆ tagsModel

TagsModel PatchBrowser::tagsModel { *this }

◆ presetsModel

PresetsModel PatchBrowser::presetsModel { *this }

◆ authors

juce::ListBox PatchBrowser::authors { "", &authorsModel }

◆ tags

juce::ListBox PatchBrowser::tags { "", &tagsModel }

◆ presets

juce::ListBox PatchBrowser::presets { "", &presetsModel }

◆ updatingSelection

bool PatchBrowser::updatingSelection = false

◆ currentAuthors

juce::StringArray PatchBrowser::currentAuthors

◆ currentTags

juce::StringArray PatchBrowser::currentTags

◆ currentPresets

juce::StringArray PatchBrowser::currentPresets

◆ selectedAuthors

juce::StringArray PatchBrowser::selectedAuthors

◆ selectedTags

juce::StringArray PatchBrowser::selectedTags

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