Browse Source

Added a getHighlightedFile method to the FileBrowserComponent

tags/2021-05-28
Julian Storer 16 years ago
parent
commit
dad610b948
2 changed files with 14 additions and 1 deletions
  1. +5
    -0
      src/gui/components/filebrowser/juce_FileBrowserComponent.cpp
  2. +9
    -1
      src/gui/components/filebrowser/juce_FileBrowserComponent.h

+ 5
- 0
src/gui/components/filebrowser/juce_FileBrowserComponent.cpp View File

@@ -185,6 +185,11 @@ bool FileBrowserComponent::currentFileIsValid() const
return false;
}
const File FileBrowserComponent::getHighlightedFile() const throw()
{
return fileListComponent->getSelectedFile();
}
//==============================================================================
const File FileBrowserComponent::getRoot() const
{


+ 9
- 1
src/gui/components/filebrowser/juce_FileBrowserComponent.h View File

@@ -99,7 +99,8 @@ public:
~FileBrowserComponent();
//==============================================================================
/**
/** Returns the file that the user has currently chosen.
@see getHighlightedFile
*/
const File getCurrentFile() const throw();
@@ -112,6 +113,13 @@ public:
*/
bool currentFileIsValid() const;
/** This returns the item in the view that is currently highlighted.
This may be different from getCurrentFile(), which returns the value
that is shown in the filename box.
@see getCurrentFile
*/
const File getHighlightedFile() const throw();
//==============================================================================
/** Returns the directory whose contents are currently being shown in the listbox. */
const File getRoot() const;


Loading…
Cancel
Save