Mema
Memory Matrix — multi-channel audio matrix monitor and router
Loading...
Searching...
No Matches
Mema::CustomPluginListComponentTableModel Class Reference

#include <PluginControlComponent.h>

+ Inheritance diagram for Mema::CustomPluginListComponentTableModel:
+ Collaboration diagram for Mema::CustomPluginListComponentTableModel:

Public Types

enum  {
  nameCol = 1 ,
  typeCol = 2 ,
  categoryCol = 3 ,
  manufacturerCol = 4 ,
  descCol = 5
}
 

Public Member Functions

 CustomPluginListComponentTableModel (juce::PluginListComponent &c, juce::KnownPluginList &l)
 
int getNumRows () override
 
void paintRowBackground (juce::Graphics &g, int, int, int, bool rowIsSelected) override
 
void paintCell (juce::Graphics &g, int row, int columnId, int width, int height, bool) override
 
void cellClicked (int rowNumber, int columnId, const juce::MouseEvent &e) override
 
void deleteKeyPressed (int) override
 
void sortOrderChanged (int newSortColumnId, bool isForwards) override
 
void selectedRowsChanged (int lastRowSelected) override
 
juce::PluginDescription getPluginDescriptionOfSelectedRow ()
 

Static Public Member Functions

static juce::String getPluginDescription (const juce::PluginDescription &desc)
 

Public Attributes

std::function< void(int)> onSelectionChanged
 
juce::PluginListComponent & m_owner
 
juce::KnownPluginList & m_list
 
int m_lastRowSelected = -1
 

Detailed Description

This class was stolen from juce's juce::PluginListComponent::TableModel for customization to be able to react on row selection changes

Definition at line 35 of file PluginControlComponent.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
nameCol 
typeCol 
categoryCol 
manufacturerCol 
descCol 

Definition at line 54 of file PluginControlComponent.h.

Constructor & Destructor Documentation

◆ CustomPluginListComponentTableModel()

Mema::CustomPluginListComponentTableModel::CustomPluginListComponentTableModel ( juce::PluginListComponent &  c,
juce::KnownPluginList &  l 
)
inline

Definition at line 38 of file PluginControlComponent.h.

Member Function Documentation

◆ cellClicked()

void Mema::CustomPluginListComponentTableModel::cellClicked ( int  rowNumber,
int  columnId,
const juce::MouseEvent &  e 
)
inlineoverride

Definition at line 102 of file PluginControlComponent.h.

References getNumRows(), and m_owner.

◆ deleteKeyPressed()

void Mema::CustomPluginListComponentTableModel::deleteKeyPressed ( int  )
inlineoverride

Definition at line 110 of file PluginControlComponent.h.

References m_owner.

◆ getNumRows()

int Mema::CustomPluginListComponentTableModel::getNumRows ( )
inlineoverride

Definition at line 40 of file PluginControlComponent.h.

References m_list.

Referenced by cellClicked().

◆ getPluginDescription()

static juce::String Mema::CustomPluginListComponentTableModel::getPluginDescription ( const juce::PluginDescription &  desc)
inlinestatic

Definition at line 139 of file PluginControlComponent.h.

Referenced by paintCell().

◆ getPluginDescriptionOfSelectedRow()

juce::PluginDescription Mema::CustomPluginListComponentTableModel::getPluginDescriptionOfSelectedRow ( )
inline

Definition at line 152 of file PluginControlComponent.h.

References m_lastRowSelected, and m_list.

◆ paintCell()

void Mema::CustomPluginListComponentTableModel::paintCell ( juce::Graphics &  g,
int  row,
int  columnId,
int  width,
int  height,
bool   
)
inlineoverride

◆ paintRowBackground()

void Mema::CustomPluginListComponentTableModel::paintRowBackground ( juce::Graphics &  g,
int  ,
int  ,
int  ,
bool  rowIsSelected 
)
inlineoverride

Definition at line 45 of file PluginControlComponent.h.

References m_owner.

◆ selectedRowsChanged()

void Mema::CustomPluginListComponentTableModel::selectedRowsChanged ( int  lastRowSelected)
inlineoverride

Definition at line 129 of file PluginControlComponent.h.

References m_lastRowSelected, and onSelectionChanged.

◆ sortOrderChanged()

void Mema::CustomPluginListComponentTableModel::sortOrderChanged ( int  newSortColumnId,
bool  isForwards 
)
inlineoverride

Definition at line 115 of file PluginControlComponent.h.

References categoryCol, descCol, m_list, manufacturerCol, nameCol, and typeCol.

Member Data Documentation

◆ m_lastRowSelected

int Mema::CustomPluginListComponentTableModel::m_lastRowSelected = -1

◆ m_list

juce::KnownPluginList& Mema::CustomPluginListComponentTableModel::m_list

◆ m_owner

juce::PluginListComponent& Mema::CustomPluginListComponentTableModel::m_owner

◆ onSelectionChanged

std::function<void(int)> Mema::CustomPluginListComponentTableModel::onSelectionChanged

Definition at line 164 of file PluginControlComponent.h.

Referenced by selectedRowsChanged().


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