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

FX::FXFileDialog Class Reference

File selection dialog. More...

#include <FXFileDialog.h>

Inheritance diagram for FX::FXFileDialog:
FX::FXDialogBox FX::FXTopWindow FX::FXShell FX::FXComposite FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject

List of all members.

Public Member Functions

 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.
 FXFileDialog (FXApp *a, const FXString &name, FXuint opts=0, FXint x=0, FXint y=0, FXint w=500, FXint h=300)
 Construct free-floating file dialog box.
virtual void hide ()
 Hide this window.
void setFilename (const FXString &path)
 Change file name.
FXString getFilename () const
 Return file name, if any.
FXStringgetFilenames () const
 Return empty-string terminated list of selected file names, or NULL if none selected.
void setPattern (const FXString &ptrn)
 Change file pattern.
FXString getPattern () const
 Return file pattern.
void setPatternList (const FXString &patterns)
 Change the list of file patterns shown in the file dialog.
FXString getPatternList () const
 Return list of patterns.
void setCurrentPattern (FXint n)
 After setting the list of patterns, this call will initially select pattern n as the active one.
FXint getCurrentPattern () const
 Return current pattern number.
void setPatternText (FXint patno, const FXString &text)
 Change pattern text for pattern number.
FXString getPatternText (FXint patno) const
 Get pattern text for given pattern number.
FXint getNumPatterns () const
 Return number of patterns.
void allowPatternEntry (FXbool flag)
 Allow pattern entry.
FXbool allowPatternEntry () const
 Return true if pattern entry is allowed.
void setDirectory (const FXString &path)
 Change directory.
FXString getDirectory () const
 Return directory.
void setItemSpace (FXint s)
 Set the inter-item spacing (in pixels)
FXint getItemSpace () const
 Return the inter-item spacing (in pixels)
void setSelectMode (FXuint mode)
 Change file selection mode; the default is SELECTFILE_ANY.
FXuint getSelectMode () const
 Return file selection mode.
void setMatchMode (FXuint mode)
 Change wildcard matching mode (see FXPath)
FXuint getMatchMode () const
 Return wildcard matching mode.
FXbool showHiddenFiles () const
 Return true if showing hidden files.
void showHiddenFiles (FXbool flag)
 Show or hide hidden files.
FXbool showImages () const
 Return true if image preview on.
void showImages (FXbool flag)
 Show or hide preview images.
FXint getImageSize () const
 Return images preview size.
void setImageSize (FXint size)
 Change images preview size.
void showReadOnly (FXbool flag)
 Show readonly button.
FXbool shownReadOnly () const
 Return true if readonly is shown.
void setReadOnly (FXbool flag)
 Set initial state of readonly button.
FXbool getReadOnly () const
 Get readonly state.
void setFileBoxStyle (FXuint style)
 Change File List style.
FXuint getFileBoxStyle () const
 Return File List style.
void allowNavigation (FXbool flag)
 Allow or disallow navigation.
FXbool allowNavigation () const
 Is navigation allowed?
void setDraggableFiles (FXbool flag)
 Set draggable files.
FXbool getDraggableFiles () const
 Are draggable files.
void setAssociations (FXFileDict *assoc, FXbool owned=false)
 Change file associations; delete old ones if owned.
FXFileDictgetAssociations () const
 Return file associations.
virtual void save (FXStream &store) const
 Save to stream.
virtual void load (FXStream &store)
 Load from stream.
virtual ~FXFileDialog ()
 Destructor.

Static Public Member Functions

static FXString getOpenFilename (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
 Open existing filename.
static FXStringgetOpenFilenames (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
 Open multiple existing files.
static FXString getSaveFilename (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
 Save to filename.
static FXString getOpenDirectory (FXWindow *owner, const FXString &caption, const FXString &path)
 Open directory name.

Protected Member Functions

void initdialog ()

Protected Attributes

FXFileSelectorfilebox

Detailed Description

File selection dialog.


Member Function Documentation

void FX::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,

"*\n*.cpp,*.cc\n*.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.


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

Copyright © 1997-2011 Jeroen van der Zijp