Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXFileDialog Class Reference

File selection dialog.

#include <FXFileDialog.h>

Inheritance diagram for FXFileDialog:

FXDialogBox FXTopWindow FXShell FXComposite FXWindow FXDrawable FXId FXObject List of all members.

Public Methods

 FXFileDialog (FXWindow *owner, const FXString &name, FXuint opts=0, FXint x=0, FXint y=0, FXint w=500, FXint h=300)
 Construct File Dialog Box.

void setFilename (const FXString &path)
 Change file name.

FXStringgetFilenames () const
 Return empty-string terminated list of selected file names, or NULL if none selected.

void setPattern (const FXString &ptrn)
 Change file pattern.

void setPatternList (const FXString &patterns)
void setPatternList (const FXchar **ptrns)
void setCurrentPattern (FXint n)
FXint getCurrentPattern () const
 Return current pattern number.

FXString getPatternText (FXint patno) const
 Get pattern text for given pattern number.

void setPatternText (FXint patno, const FXString &text)
 Change pattern text for pattern number.

void setDirectory (const FXString &path)
 Change directory.

void setItemSpace (FXint s)
 Set the inter-item spacing (in pixels).

FXint getItemSpace () const
 Return the inter-item spacing (in pixels).

void setFileBoxStyle (FXuint style)
 Change File List style.

FXuint getFileBoxStyle () const
 Return File List style.

void setSelectMode (FXuint mode)
 Change file selection mode.

FXuint getSelectMode () const
 Return file selection mode.

void showReadOnly (FXbool show)
 Show readonly button.

FXbool shownReadOnly () const
 Return TRUE if readonly is shown.

void setReadOnly (FXbool state)
 Set initial state of readonly button.

FXbool getReadOnly () const
 Get readonly state.

virtual void save (FXStream &store) const
 Save to stream.

virtual void load (FXStream &store)
 Load from stream.

virtual ~FXFileDialog ()
 Destructor.


Static Public Methods

FXString getOpenFilename (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
 Open existing filename.

FXStringgetOpenFilenames (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
 Open multiple existing files.

FXString getSaveFilename (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
 Save to filename.

FXString getOpenDirectory (FXWindow *owner, const FXString &caption, const FXString &path)
 Open directory name.


Public Attributes

FXString getFilename () const
 Return file name, if any.

FXString getPattern () const
 Return file pattern.

FXString getPatternList () const
 Return list of patterns.

FXString getDirectory () const
 Return directory.


Member Function Documentation

void FXFileDialog::setPatternList const FXString   patterns
 

Change the list of file patterns shown in the file dialog. Each pattern comprises an optional name, followed by a pattern in parentheses. The patterns are separated by newlines. For example,

"*
*.cpp,*.cc
*.hpp,*.hh,*.h"

and

"All Files (*)\nC++ Sources (*.cpp,*.cc)\nC++ Headers (*.hpp,*.hh,*.h)"

will set the same three patterns, but the former shows no pattern names.

void FXFileDialog::setPatternList const FXchar **    ptrns
 

Set list of patterns as name,pattern pairs. The list should be terminated with a final NULL string. (DEPRECATED)

void FXFileDialog::setCurrentPattern FXint    n
 

After setting the list of patterns, this call will initially select pattern n as the active one.