JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
juce::PluginListComponent::TableModel Class Reference
Inheritance diagram for juce::PluginListComponent::TableModel:
juce::TableListBoxModel

Public Types

enum  {
  nameCol , typeCol , categoryCol , manufacturerCol ,
  descCol
}
 

Public Member Functions

 TableModel (PluginListComponent &c, KnownPluginList &l)
 
int getNumRows () override
 This must return the number of rows currently in the table.
 
void paintRowBackground (Graphics &g, int, int, int, bool rowIsSelected) override
 This must draw the background behind one of the rows in the table.
 
void paintCell (Graphics &g, int row, int columnId, int width, int height, bool) override
 This must draw one of the cells.
 
void cellClicked (int rowNumber, int columnId, const juce::MouseEvent &e) override
 This callback is made when the user clicks on one of the cells in the table.
 
void deleteKeyPressed (int) override
 Override this to be informed when the delete key is pressed.
 
void sortOrderChanged (int newSortColumnId, bool isForwards) override
 This callback is made when the table's sort order is changed.
 
- Public Member Functions inherited from juce::TableListBoxModel
virtual ~TableListBoxModel ()=default
 Destructor.
 
virtual ComponentrefreshComponentForCell (int rowNumber, int columnId, bool isRowSelected, Component *existingComponentToUpdate)
 This is used to create or update a custom component to go in a cell.
 
virtual void cellDoubleClicked (int rowNumber, int columnId, const MouseEvent &)
 This callback is made when the user clicks on one of the cells in the table.
 
virtual void backgroundClicked (const MouseEvent &)
 This can be overridden to react to the user double-clicking on a part of the list where there are no rows.
 
virtual int getColumnAutoSizeWidth (int columnId)
 Returns the best width for one of the columns.
 
virtual String getCellTooltip (int rowNumber, int columnId)
 Returns a tooltip for a particular cell in the table.
 
virtual void selectedRowsChanged (int lastRowSelected)
 Override this to be informed when rows are selected or deselected.
 
virtual void returnKeyPressed (int lastRowSelected)
 Override this to be informed when the return key is pressed.
 
virtual void listWasScrolled ()
 Override this to be informed when the list is scrolled.
 
virtual var getDragSourceDescription (const SparseSet< int > &currentlySelectedRows)
 To allow rows from your table to be dragged-and-dropped, implement this method.
 
virtual bool mayDragToExternalWindows () const
 Called when starting a drag operation on a list row to determine whether the item may be dragged to other windows.
 

Static Public Member Functions

static String getPluginDescription (const PluginDescription &desc)
 

Public Attributes

PluginListComponentowner
 
KnownPluginListlist
 

Detailed Description

Definition at line 29 of file juce_PluginListComponent.cpp.

Member Enumeration Documentation

◆ anonymous enum

Definition at line 48 of file juce_PluginListComponent.cpp.

Constructor & Destructor Documentation

◆ TableModel()

juce::PluginListComponent::TableModel::TableModel ( PluginListComponent c,
KnownPluginList l 
)

Definition at line 32 of file juce_PluginListComponent.cpp.

Member Function Documentation

◆ cellClicked()

void juce::PluginListComponent::TableModel::cellClicked ( int  rowNumber,
int  columnId,
const juce::MouseEvent  
)
overridevirtual

This callback is made when the user clicks on one of the cells in the table.

The mouse event's coordinates will be relative to the entire table row.

See also
cellDoubleClicked, backgroundClicked

Reimplemented from juce::TableListBoxModel.

Definition at line 96 of file juce_PluginListComponent.cpp.

◆ deleteKeyPressed()

void juce::PluginListComponent::TableModel::deleteKeyPressed ( int  lastRowSelected)
overridevirtual

Override this to be informed when the delete key is pressed.

See also
ListBox::deleteKeyPressed()

Reimplemented from juce::TableListBoxModel.

Definition at line 104 of file juce_PluginListComponent.cpp.

◆ getNumRows()

int juce::PluginListComponent::TableModel::getNumRows ( )
overridevirtual

This must return the number of rows currently in the table.

If the number of rows changes, you must call TableListBox::updateContent() to cause it to refresh the list.

Implements juce::TableListBoxModel.

Definition at line 34 of file juce_PluginListComponent.cpp.

◆ getPluginDescription()

static String juce::PluginListComponent::TableModel::getPluginDescription ( const PluginDescription desc)
static

Definition at line 123 of file juce_PluginListComponent.cpp.

◆ paintCell()

void juce::PluginListComponent::TableModel::paintCell ( Graphics ,
int  rowNumber,
int  columnId,
int  width,
int  height,
bool  rowIsSelected 
)
overridevirtual

This must draw one of the cells.

The graphics context's origin will already be set to the top-left of the cell, whose size is specified by (width, height).

Note that the rowNumber value may be greater than the number of rows in your list, so be careful that you don't assume it's less than getNumRows().

Implements juce::TableListBoxModel.

Definition at line 57 of file juce_PluginListComponent.cpp.

◆ paintRowBackground()

void juce::PluginListComponent::TableModel::paintRowBackground ( Graphics ,
int  rowNumber,
int  width,
int  height,
bool  rowIsSelected 
)
overridevirtual

This must draw the background behind one of the rows in the table.

The graphics context has its origin at the row's top-left, and your method should fill the area specified by the width and height parameters.

Note that the rowNumber value may be greater than the number of rows in your list, so be careful that you don't assume it's less than getNumRows().

Implements juce::TableListBoxModel.

Definition at line 39 of file juce_PluginListComponent.cpp.

◆ sortOrderChanged()

void juce::PluginListComponent::TableModel::sortOrderChanged ( int  newSortColumnId,
bool  isForwards 
)
overridevirtual

This callback is made when the table's sort order is changed.

This could be because the user has clicked a column header, or because the TableHeaderComponent::setSortColumnId() method was called.

If you implement this, your method should re-sort the table using the given column as the key.

Reimplemented from juce::TableListBoxModel.

Definition at line 109 of file juce_PluginListComponent.cpp.

Member Data Documentation

◆ list

KnownPluginList& juce::PluginListComponent::TableModel::list

Definition at line 137 of file juce_PluginListComponent.cpp.

◆ owner

PluginListComponent& juce::PluginListComponent::TableModel::owner

Definition at line 136 of file juce_PluginListComponent.cpp.


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