mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added method FileBrowserComponent::getDefaultRoots()
This commit is contained in:
parent
575725e39d
commit
227e7d70f9
2 changed files with 15 additions and 2 deletions
|
|
@ -497,7 +497,7 @@ void FileBrowserComponent::comboBoxChanged (ComboBox*)
|
|||
}
|
||||
}
|
||||
|
||||
void FileBrowserComponent::getRoots (StringArray& rootNames, StringArray& rootPaths)
|
||||
void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray& rootPaths)
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
Array<File> roots;
|
||||
|
|
@ -571,3 +571,8 @@ void FileBrowserComponent::getRoots (StringArray& rootNames, StringArray& rootPa
|
|||
rootNames.add ("Desktop");
|
||||
#endif
|
||||
}
|
||||
|
||||
void FileBrowserComponent::getRoots (StringArray& rootNames, StringArray& rootPaths)
|
||||
{
|
||||
getDefaultRoots (rootNames, rootPaths);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,12 @@ public:
|
|||
*/
|
||||
void removeListener (FileBrowserListener* listener);
|
||||
|
||||
/** Returns a platform-specific list of names and paths for some suggested places the user
|
||||
might want to use as root folders.
|
||||
The list returned contains empty strings to indicate section breaks.
|
||||
@see getRoots()
|
||||
*/
|
||||
static void getDefaultRoots (StringArray& rootNames, StringArray& rootPaths);
|
||||
|
||||
//==============================================================================
|
||||
/** @internal */
|
||||
|
|
@ -215,7 +221,9 @@ public:
|
|||
|
||||
protected:
|
||||
/** Returns a list of names and paths for the default places the user might want to look.
|
||||
Use an empty string to indicate a section break.
|
||||
|
||||
By default this just calls getDefaultRoots(), but you may want to override it to
|
||||
return a custom list.
|
||||
*/
|
||||
virtual void getRoots (StringArray& rootNames, StringArray& rootPaths);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue