93 const File& currentFile,
97 const String& fileBrowserWildcard,
98 const String& enforcedSuffix,
99 const String& textWhenNothingSelected);
106 File getCurrentFile()
const;
109 String getCurrentFileText()
const;
119 void setCurrentFile (
File newFile,
120 bool addToRecentlyUsedList,
125 void setFilenameIsEditable (
bool shouldBeEditable);
131 void setDefaultBrowseTarget (
const File& newDefaultDirectory);
138 virtual File getLocationToBrowse();
156 void setRecentlyUsedFilenames (
const StringArray& filenames);
165 void addRecentlyUsedFile (
const File& file);
169 void setMaxNumberOfRecentFiles (
int newMaximum);
177 void setBrowseButtonText (
const String& browseButtonText);
187 void setTooltip (
const String& newTooltip)
override;
195 virtual Button* createFilenameComponentBrowseButton (
const String& text) = 0;
201 void paintOverChildren (
Graphics&)
override;
203 void resized()
override;
205 void lookAndFeelChanged()
override;
207 bool isInterestedInFileDrag (
const StringArray&)
override;
209 void filesDropped (
const StringArray&,
int,
int)
override;
211 void fileDragEnter (
const StringArray&,
int,
int)
override;
219 void handleAsyncUpdate()
override;
226 int maxRecentFiles = 30;
227 bool isDir, isSaving, isFileDragOver =
false;
228 String wildcard, enforcedSuffix, browseButtonText;
229 ListenerList <FilenameComponentListener> listeners;
230 File defaultBrowseFile;
Has a callback method that is triggered asynchronously.
A component that lets the user choose from a drop-down list of choices.
The base class for all JUCE user-interface objects.
Components derived from this class can have files dropped onto them by an external application.
Represents a local file or directory.
Listens for events happening to a FilenameComponent.
virtual void filenameComponentChanged(FilenameComponent *fileComponentThatHasChanged)=0
This method is called after the FilenameComponent's file has been changed.
virtual ~FilenameComponentListener()=default
Destructor.
Shows a filename as an editable text box, with a 'browse' button and a drop-down list for recently se...
A graphics context, used for drawing a component or image.
A special array for holding a list of strings.
NotificationType
These enums are used in various classes to indicate whether a notification event should be sent out.
@ sendNotificationAsync
Requests an asynchronous notification.
This abstract base class is implemented by LookAndFeel classes.