A component displaying a list of plugins, with options to scan for them, add, remove and sort them. More...
Inherits Component, ListBoxModel, ChangeListener, and Timer.
Public Member Functions | |
| PluginListComponent (KnownPluginList &listToRepresent, const File &deadMansPedalFile, PropertiesFile *propertiesToUse) | |
| Creates the list component. | |
| ~PluginListComponent () | |
| Destructor. | |
| void | resized () |
| Called when this component's size has been changed. | |
| bool | isInterestedInFileDrag (const StringArray &files) |
| void | filesDropped (const StringArray &files, int, int) |
| int | getNumRows () |
| This has to return the number of items in the list. | |
| void | paintListBoxItem (int row, Graphics &g, int width, int height, bool rowIsSelected) |
| This method must be implemented to draw a row of the list. | |
| void | deleteKeyPressed (int lastRowSelected) |
| Override this to be informed when the delete key is pressed. | |
| void | buttonClicked (Button *b) |
| void | changeListenerCallback (ChangeBroadcaster *) |
| Your subclass should implement this method to receive the callback. | |
| void | timerCallback () |
| The user-defined callback routine that actually gets called periodically. | |
A component displaying a list of plugins, with options to scan for them, add, remove and sort them.
| PluginListComponent::PluginListComponent | ( | KnownPluginList & | listToRepresent, |
| const File & | deadMansPedalFile, | ||
| PropertiesFile * | propertiesToUse | ||
| ) |
Creates the list component.
For info about the deadMansPedalFile, see the PluginDirectoryScanner constructor.
The properties file, if supplied, is used to store the user's last search paths.
| PluginListComponent::~PluginListComponent | ( | ) |
Destructor.
| void PluginListComponent::resized | ( | ) | [virtual] |
Called when this component's size has been changed.
A component can implement this method to do things such as laying out its child components when its width or height changes.
The method is called synchronously as a result of the setBounds or setSize methods, so repeatedly changing a components size will repeatedly call its resized method (unlike things like repainting, where multiple calls to repaint are coalesced together).
If the component is a top-level window on the desktop, its size could also be changed by operating-system factors beyond the application's control.
Reimplemented from Component.
| bool PluginListComponent::isInterestedInFileDrag | ( | const StringArray & | files ) |
| void PluginListComponent::filesDropped | ( | const StringArray & | files, |
| int | , | ||
| int | |||
| ) |
| int PluginListComponent::getNumRows | ( | ) | [virtual] |
This has to return the number of items in the list.
Implements ListBoxModel.
| void PluginListComponent::paintListBoxItem | ( | int | rowNumber, |
| Graphics & | g, | ||
| int | width, | ||
| int | height, | ||
| bool | rowIsSelected | ||
| ) | [virtual] |
This method must be implemented to draw a row of the list.
Implements ListBoxModel.
| void PluginListComponent::deleteKeyPressed | ( | int | lastRowSelected ) | [virtual] |
Override this to be informed when the delete key is pressed.
If no rows are selected when they press the key, this won't be called.
| lastRowSelected | the last row that had been selected when they pressed the key - if there are multiple selections, this might not be very useful |
Reimplemented from ListBoxModel.
| void PluginListComponent::buttonClicked | ( | Button * | b ) |
| void PluginListComponent::changeListenerCallback | ( | ChangeBroadcaster * | source ) | [virtual] |
Your subclass should implement this method to receive the callback.
| source | the ChangeBroadcaster that triggered the callback. |
Implements ChangeListener.
| void PluginListComponent::timerCallback | ( | ) | [virtual] |
The user-defined callback routine that actually gets called periodically.
It's perfectly ok to call startTimer() or stopTimer() from within this callback to change the subsequent intervals.
Implements Timer.