30 : directoryContentsList (l)
46void DirectoryContentsDisplayComponent::sendSelectionChangeMessage()
52void DirectoryContentsDisplayComponent::sendMouseClickMessage (
const File& file,
const MouseEvent& e)
56 Component::BailOutChecker checker (
dynamic_cast<Component*
> (
this));
57 listeners.callChecked (checker, [&] (FileBrowserListener& l) { l.fileClicked (file, e); });
61void DirectoryContentsDisplayComponent::sendDoubleClickMessage (
const File& file)
65 Component::BailOutChecker checker (
dynamic_cast<Component*
> (
this));
66 listeners.callChecked (checker, [&] (FileBrowserListener& l) { l.fileDoubleClicked (file); });
A class to keep an eye on a component and check for it being deleted.
The base class for all JUCE user-interface objects.
DirectoryContentsDisplayComponent(DirectoryContentsList &listToShow)
Creates a DirectoryContentsDisplayComponent for a given list of files.
DirectoryContentsList & directoryContentsList
The list that this component is displaying.
virtual ~DirectoryContentsDisplayComponent()
Destructor.
void removeListener(FileBrowserListener *listener)
Removes a listener.
void addListener(FileBrowserListener *listener)
Adds a listener to be told when files are selected or clicked.
A class to asynchronously scan for details about the files in a directory.
const File & getDirectory() const noexcept
Returns the directory that's currently being used.
A listener for user selection events in a file browser.
virtual void selectionChanged()=0
Callback when the user selects a different file in the browser.
virtual ~FileBrowserListener()
Destructor.
bool exists() const
Checks whether the file actually exists.