A standard dialog for obtaining a file name to load or save.
![]() | PFileDialog ( PInteractor * parent, PRESOURCE_ID resID ) Create a new standard dile dialog. |
![]() | ~PFileDialog () Destroy the standard file dialog. |
![]() | SetTitle ( const PString & title ) Set the title to the standard file dialog. |
![]() | SetDirectory ( const PDirectory & dir ) Set the initial directory before the dialog is presented. |
![]() | GetDirectory () const Get the directory that was selected in the dialog. |
![]() | SetDefaultFilename (const PString & fname) Set the initial file name before the dialog is presented. |
![]() | GetFile () const Get the file that was selected in the dialog. |
![]() | OnFileSelect ( const PFilePath & file ) A file has been selected from the list presented to the user but the user has not pressed OK. |
![]() | New functions for class |
![]() | Callback functions |
![]() | directory The current directory for the dialog. |
![]() | file The final, selected file name for the dialog. |
![]() | defaultFilename The initial file name to be used. |
Overrides from class PDialog
Overrides from class PInteractor
Overrides from class PObject
System callback functions.
A standard dialog for obtaining a file name to load or save. This is really an abstract class for the descendents that get file names for loading and saving, or get a directory name. The exact appearance of the dialog is platform specific, however they all consists of the same basic functions.Note that unlike most dialogs, most operations such as PInteractor::Show(), PInteractorLayout::GetControl() etc may not be executed before the PModalDialog::RunModal() function has been executed. Furthermore, they are not available after PModalDialog::RunModal() has returned. Similarly some functions such as SetDirectory() are not available within the centext of PModalDialog::RunModal(). This is due to the implementation on some platforms which goes to great lengths to use the actual standard file dialog for the platform.
This function should be called before the
PModalDialog::RunModal() function is called. Afterwards it will
have no effect.
This function may be called at any time for the life of the object.
This function should be called before the
PModalDialog::RunModal() function is called. Afterwards it will
have no effect.
This function may be called at any time for the life of the object.
~PFileDialog()
New functions for class
void SetTitle( const PString & title )
void SetDirectory( const PDirectory & dir )
const PDirectory& GetDirectory() const
void SetDefaultFilename(const PString & fname)
const PFilePath& GetFile() const
Callback functions
virtual void OnFileSelect( const PFilePath & file )
PDirectory directory
PFilePath file
Alphabetic index HTML hierarchy of classes or Java