FlightGear next
FGFileDialog Class Referenceabstract

#include <FileDialog.hxx>

Inherited by CocoaFileDialog, QtFileDialog, and WindowsFileDialog.

Classes

class  Callback
 

Public Types

enum  Usage { USE_OPEN_FILE = 0 , USE_SAVE_FILE , USE_CHOOSE_DIR }
 

Public Member Functions

std::string getTitle () const
 
void setTitle (const std::string &aTitle)
 
std::string getButton () const
 
void setButton (const std::string &aText)
 
SGPath getDirectory () const
 
void setDirectory (const SGPath &aPath)
 
string_list filterPatterns () const
 
void setFilterPatterns (const string_list &patterns)
 
std::string getPlaceholder () const
 for saving
 
void setPlaceholderName (const std::string &aName)
 
bool showHidden () const
 
void setShowHidden (bool show)
 
virtual ~FGFileDialog ()
 Destructor.
 
virtual void exec ()=0
 
virtual void close ()=0
 
virtual void setCallback (Callback *aCB)
 
void setCallbackFromNasal (const nasal::CallContext &ctx)
 

Protected Member Functions

 FGFileDialog (Usage use)
 

Protected Attributes

const Usage _usage
 
std::string _title
 
std::string _buttonText
 
SGPath _initialPath
 
string_list _filterPatterns
 
std::string _placeholder
 
bool _showHidden
 
std::unique_ptr< Callback_callback
 

Detailed Description

Definition at line 16 of file FileDialog.hxx.

Member Enumeration Documentation

◆ Usage

Enumerator
USE_OPEN_FILE 
USE_SAVE_FILE 
USE_CHOOSE_DIR 

Definition at line 19 of file FileDialog.hxx.

Constructor & Destructor Documentation

◆ ~FGFileDialog()

FGFileDialog::~FGFileDialog ( )
virtual

Destructor.

Definition at line 47 of file FileDialog.cxx.

◆ FGFileDialog()

FGFileDialog::FGFileDialog ( Usage use)
protected

Definition at line 40 of file FileDialog.cxx.

Member Function Documentation

◆ close()

virtual void FGFileDialog::close ( )
pure virtual

◆ exec()

virtual void FGFileDialog::exec ( )
pure virtual

◆ filterPatterns()

string_list FGFileDialog::filterPatterns ( ) const
inline

Definition at line 40 of file FileDialog.hxx.

◆ getButton()

std::string FGFileDialog::getButton ( ) const
inline

Definition at line 30 of file FileDialog.hxx.

◆ getDirectory()

SGPath FGFileDialog::getDirectory ( ) const
inline

Definition at line 35 of file FileDialog.hxx.

◆ getPlaceholder()

std::string FGFileDialog::getPlaceholder ( ) const
inline

for saving

Definition at line 46 of file FileDialog.hxx.

◆ getTitle()

std::string FGFileDialog::getTitle ( ) const
inline

Definition at line 25 of file FileDialog.hxx.

◆ setButton()

void FGFileDialog::setButton ( const std::string & aText)

Definition at line 57 of file FileDialog.cxx.

◆ setCallback()

void FGFileDialog::setCallback ( Callback * aCB)
virtual

Definition at line 77 of file FileDialog.cxx.

◆ setCallbackFromNasal()

void FGFileDialog::setCallbackFromNasal ( const nasal::CallContext & ctx)

Definition at line 126 of file FileDialog.cxx.

◆ setDirectory()

void FGFileDialog::setDirectory ( const SGPath & aPath)

Definition at line 62 of file FileDialog.cxx.

◆ setFilterPatterns()

void FGFileDialog::setFilterPatterns ( const string_list & patterns)

Definition at line 67 of file FileDialog.cxx.

◆ setPlaceholderName()

void FGFileDialog::setPlaceholderName ( const std::string & aName)

Definition at line 72 of file FileDialog.cxx.

◆ setShowHidden()

void FGFileDialog::setShowHidden ( bool show)

Definition at line 82 of file FileDialog.cxx.

◆ setTitle()

void FGFileDialog::setTitle ( const std::string & aTitle)

Definition at line 52 of file FileDialog.cxx.

◆ showHidden()

bool FGFileDialog::showHidden ( ) const
inline

Definition at line 51 of file FileDialog.hxx.

Member Data Documentation

◆ _buttonText

std::string FGFileDialog::_buttonText
protected

Definition at line 77 of file FileDialog.hxx.

◆ _callback

std::unique_ptr<Callback> FGFileDialog::_callback
protected

Definition at line 82 of file FileDialog.hxx.

◆ _filterPatterns

string_list FGFileDialog::_filterPatterns
protected

Definition at line 79 of file FileDialog.hxx.

◆ _initialPath

SGPath FGFileDialog::_initialPath
protected

Definition at line 78 of file FileDialog.hxx.

◆ _placeholder

std::string FGFileDialog::_placeholder
protected

Definition at line 80 of file FileDialog.hxx.

◆ _showHidden

bool FGFileDialog::_showHidden
protected

Definition at line 81 of file FileDialog.hxx.

◆ _title

std::string FGFileDialog::_title
protected

Definition at line 77 of file FileDialog.hxx.

◆ _usage

const Usage FGFileDialog::_usage
protected

Definition at line 76 of file FileDialog.hxx.


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