JUCE
|
A base class for components that display a list of the files in a directory. More...
Public Types | |
enum | ColourIds { highlightColourId = 0x1000540, textColourId = 0x1000541, highlightedTextColourId = 0x1000542 } |
A set of colour IDs to use to change the colour of various aspects of the list. More... | |
Public Member Functions | |
DirectoryContentsDisplayComponent (DirectoryContentsList &listToShow) | |
Creates a DirectoryContentsDisplayComponent for a given list of files. More... | |
virtual | ~DirectoryContentsDisplayComponent () |
Destructor. More... | |
virtual int | getNumSelectedFiles () const =0 |
Returns the number of files the user has got selected. More... | |
virtual File | getSelectedFile (int index) const =0 |
Returns one of the files that the user has currently selected. More... | |
virtual void | deselectAllFiles ()=0 |
Deselects any selected files. More... | |
virtual void | scrollToTop ()=0 |
Scrolls this view to the top. More... | |
virtual void | setSelectedFile (const File &)=0 |
If the specified file is in the list, it will become the only selected item (and if the file isn't in the list, all other items will be deselected). More... | |
void | addListener (FileBrowserListener *listener) |
Adds a listener to be told when files are selected or clicked. More... | |
void | removeListener (FileBrowserListener *listener) |
Removes a listener. More... | |
void | sendSelectionChangeMessage () |
void | sendDoubleClickMessage (const File &) |
void | sendMouseClickMessage (const File &, const MouseEvent &) |
Public Attributes | |
DirectoryContentsList & | directoryContentsList |
The list that this component is displaying. More... | |
Protected Attributes | |
ListenerList< FileBrowserListener > | listeners |
A base class for components that display a list of the files in a directory.
A set of colour IDs to use to change the colour of various aspects of the list.
These constants can be used either via the Component::setColour(), or LookAndFeel::setColour() methods.
DirectoryContentsDisplayComponent::DirectoryContentsDisplayComponent | ( | DirectoryContentsList & | listToShow | ) |
Creates a DirectoryContentsDisplayComponent for a given list of files.
|
virtual |
Destructor.
|
pure virtual |
Returns the number of files the user has got selected.
Implemented in FileListComponent, and FileTreeComponent.
Returns one of the files that the user has currently selected.
The index should be in the range 0 to (getNumSelectedFiles() - 1).
Implemented in FileListComponent, and FileTreeComponent.
Referenced by FileTreeComponent::getNumSelectedFiles().
|
pure virtual |
Deselects any selected files.
Implemented in FileListComponent, and FileTreeComponent.
Referenced by FileTreeComponent::getNumSelectedFiles().
|
pure virtual |
Scrolls this view to the top.
Implemented in FileListComponent, and FileTreeComponent.
Referenced by FileTreeComponent::getNumSelectedFiles().
|
pure virtual |
If the specified file is in the list, it will become the only selected item (and if the file isn't in the list, all other items will be deselected).
Implemented in FileListComponent, and FileTreeComponent.
Referenced by FileTreeComponent::getNumSelectedFiles().
void DirectoryContentsDisplayComponent::addListener | ( | FileBrowserListener * | listener | ) |
Adds a listener to be told when files are selected or clicked.
void DirectoryContentsDisplayComponent::removeListener | ( | FileBrowserListener * | listener | ) |
Removes a listener.
void DirectoryContentsDisplayComponent::sendSelectionChangeMessage | ( | ) |
void DirectoryContentsDisplayComponent::sendDoubleClickMessage | ( | const File & | ) |
void DirectoryContentsDisplayComponent::sendMouseClickMessage | ( | const File & | , |
const MouseEvent & | |||
) |
DirectoryContentsList& DirectoryContentsDisplayComponent::directoryContentsList |
The list that this component is displaying.
|
protected |