1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-04 03:40:07 +00:00

juce_gui_basics module: add file browser wildcard setter method to FilenameComponent class.

This commit is contained in:
Gio Azzalini 2019-05-08 20:17:16 +02:00
parent 42532eb535
commit 5f9e6ef129
2 changed files with 12 additions and 0 deletions

View file

@ -84,6 +84,11 @@ void FilenameComponent::setBrowseButtonText (const String& newBrowseButtonText)
lookAndFeelChanged();
}
void FilenameComponent::setFileBrowserWildcard (const String& newWildcard) noexcept
{
wildcard = newWildcard;
}
void FilenameComponent::lookAndFeelChanged()
{
browseButton.reset();

View file

@ -177,6 +177,13 @@ public:
*/
void setBrowseButtonText (const String& browseButtonText);
/** Changes the wildcard pattern to use in the file browser - e.g. "*.txt;*.foo".
If an empty string is passed in, then the pattern is assumed to be "*".
@param wildcard the new wildcard to use.
*/
void setFileBrowserWildcard (const String& wildcard) noexcept;
//==============================================================================
/** Adds a listener that will be called when the selected file is changed. */
void addListener (FilenameComponentListener* listener);