JUCE  v5.1.1-3-g1a0b28c73
JUCE API
FileFilter Class Referenceabstract

Interface for deciding which files are suitable for something. More...

#include <juce_FileFilter.h>

Inheritance diagram for FileFilter:
Collaboration diagram for FileFilter:

Public Member Functions

 FileFilter (const String &filterDescription)
 Creates a filter with the given description. More...
 
virtual ~FileFilter ()
 Destructor. More...
 
const StringgetDescription () const noexcept
 Returns the description that the filter was created with. More...
 
virtual bool isDirectorySuitable (const File &file) const =0
 Should return true if this directory is suitable for inclusion in whatever context the object is being used. More...
 
virtual bool isFileSuitable (const File &file) const =0
 Should return true if this file is suitable for inclusion in whatever context the object is being used. More...
 

Protected Attributes

String description
 

Detailed Description

Interface for deciding which files are suitable for something.

For example, this is used by DirectoryContentsList to select which files go into the list.

See also
WildcardFileFilter, DirectoryContentsList, FileListComponent, FileBrowserComponent

Constructor & Destructor Documentation

◆ FileFilter()

FileFilter::FileFilter ( const String filterDescription)

Creates a filter with the given description.

The description can be returned later with the getDescription() method.

◆ ~FileFilter()

virtual FileFilter::~FileFilter ( )
virtual

Destructor.

Member Function Documentation

◆ getDescription()

const String& FileFilter::getDescription ( ) const
noexcept

Returns the description that the filter was created with.

◆ isDirectorySuitable()

virtual bool FileFilter::isDirectorySuitable ( const File file) const
pure virtual

Should return true if this directory is suitable for inclusion in whatever context the object is being used.

Implemented in FileBrowserComponent, and WildcardFileFilter.

Referenced by FileBrowserComponent::LookAndFeelMethods::~LookAndFeelMethods().

◆ isFileSuitable()

virtual bool FileFilter::isFileSuitable ( const File file) const
pure virtual

Should return true if this file is suitable for inclusion in whatever context the object is being used.

Implemented in FileBrowserComponent, and WildcardFileFilter.

Referenced by FileBrowserComponent::LookAndFeelMethods::~LookAndFeelMethods().

Member Data Documentation

◆ description

String FileFilter::description
protected

The documentation for this class was generated from the following file: