Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::CommonFileDialog Class Reference

Base class for open and save common dialogs. More...

#include <vcf/ApplicationKit/CommonFileDialog.h>

Inheritance diagram for VCF::CommonFileDialog:

VCF::CommonDialog VCF::Component VCF::ObjectWithCallbacks VCF::Object VCF::CommonFileOpenDialog VCF::CommonFileSaveDialog List of all members.

Public Member Functions

 CommonFileDialog ()
virtual ~CommonFileDialog ()
virtual void addFilter (const String &description, const String &extension)
 Adds a filter to the File dialog.
virtual void setDirectory (const String &directory)
 sets the default directory whose files will be displayed in the dialog.
virtual void setFileName (const String &filename)
 sets the default filename suggested by the dialog.
virtual String getDirectory ()
 gets the directory chosen with the dialog.
virtual String getFileName ()
 gets the filename chosen with the dialog.
virtual String getFileExtension ()
 gets the filter's extension chosen with the dialog.
virtual String getSelectedFilter ()
 gets the filter selected the previous time this dialog has been openened.
void setSelectedFilter (const String &selectedFilter)
 sets the default selected filter for the dialog The value to be set is usually the one selected the previous time the dialog has been openened.
virtual void setAllowsMultiSelect (const bool &allowsMultiSelect)
 sets the flags allowing multiple selection of the items in the dialog.
virtual void setTitle (const String &title)
 sets the title of the dialog.

Protected Attributes

CommonFileDialogPeerpeer_
 the pointer to the peer for the OS specific implementation of the File dialog.

Detailed Description

Base class for open and save common dialogs.

Provides a way for you to specify the types of files to display, as well as the selected file and directory.


Constructor & Destructor Documentation

VCF::CommonFileDialog::CommonFileDialog  ) 
 

virtual VCF::CommonFileDialog::~CommonFileDialog  )  [virtual]
 


Member Function Documentation

virtual void VCF::CommonFileDialog::addFilter const String description,
const String extension
[virtual]
 

Adds a filter to the File dialog.

This is composed of the filter name or description and its associated extension(s).

Parameters:
const String& description, the description or name of the filter.
const String& extension, the extension associated to the filter. This may be a list of extensions separated by a semicolon ( under windows ) or any other separator depending on the OS. The dialog will display only the files with any extension existing in this string list.

virtual String VCF::CommonFileDialog::getDirectory  )  [virtual]
 

gets the directory chosen with the dialog.

Returns:
String, the chosen directory.

virtual String VCF::CommonFileDialog::getFileExtension  )  [virtual]
 

gets the filter's extension chosen with the dialog.

Returns:
String, the filter's extension chosen by the user.

virtual String VCF::CommonFileDialog::getFileName  )  [virtual]
 

gets the filename chosen with the dialog.

This includes the path to the directory chosen with the dialog.

Returns:
String, the filename chosen by the user.

virtual String VCF::CommonFileDialog::getSelectedFilter  )  [virtual]
 

gets the filter selected the previous time this dialog has been openened.

If the filters are composed by pairs of strings ( the filter's name and the associated extension ), the given string is the first string of the selected pair.

virtual void VCF::CommonFileDialog::setAllowsMultiSelect const bool &  allowsMultiSelect  )  [virtual]
 

sets the flags allowing multiple selection of the items in the dialog.

Parameters:
const bool& allowsMultiSelect, true if allowed.

virtual void VCF::CommonFileDialog::setDirectory const String directory  )  [virtual]
 

sets the default directory whose files will be displayed in the dialog.

Parameters:
const String& directory, the displayed directory.

virtual void VCF::CommonFileDialog::setFileName const String filename  )  [virtual]
 

sets the default filename suggested by the dialog.

This may include the directory set for the dialog.

Parameters:
const String& filename, the default displayed filename.

void VCF::CommonFileDialog::setSelectedFilter const String selectedFilter  ) 
 

sets the default selected filter for the dialog The value to be set is usually the one selected the previous time the dialog has been openened.

Parameters:
const String& selectedFilter, the default filter to be used.

virtual void VCF::CommonFileDialog::setTitle const String title  )  [virtual]
 

sets the title of the dialog.

Parameters:
const String& title, the title.


Member Data Documentation

CommonFileDialogPeer* VCF::CommonFileDialog::peer_ [protected]
 

the pointer to the peer for the OS specific implementation of the File dialog.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information