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)
 FXFileDialog (FXApp *a, const FXString &name, FXuint opts=0, FXint x=0, FXint y=0, FXint w=500, FXint h=300)
void setFilename (const FXString &path)
FXString getFilename () const
FXStringgetFilenames () const
void setPattern (const FXString &ptrn)
FXString getPattern () const
void setPatternList (const FXString &patterns)
FXString getPatternList () const
void setCurrentPattern (FXint n)
FXint getCurrentPattern () const
FXString getPatternText (FXint patno) const
void setPatternText (FXint patno, const FXString &text)
void setDirectory (const FXString &path)
FXString getDirectory () const
void setItemSpace (FXint s)
FXint getItemSpace () const
void setFileBoxStyle (FXuint style)
FXuint getFileBoxStyle () const
void setSelectMode (FXuint mode)
FXuint getSelectMode () const
void setMatchMode (FXuint mode)
FXuint getMatchMode () const
void showReadOnly (FXbool show)
FXbool shownReadOnly () const
void setReadOnly (FXbool state)
FXbool getReadOnly () const
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXFileDialog ()

Static Public Member Functions

FXString getOpenFilename (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
FXStringgetOpenFilenames (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
FXString getSaveFilename (FXWindow *owner, const FXString &caption, const FXString &path, const FXString &patterns="*", FXint initial=0)
FXString getOpenDirectory (FXWindow *owner, const FXString &caption, const FXString &path)

Detailed Description

File selection dialog.


Constructor & Destructor Documentation

FX::FXFileDialog::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.

FX::FXFileDialog::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 FX::FXFileDialog::~FXFileDialog  )  [virtual]
 

Destructor.


Member Function Documentation

void FX::FXFileDialog::setFilename const FXString path  ) 
 

Change file name.

FXString FX::FXFileDialog::getFilename  )  const
 

Return file name, if any.

FXString* FX::FXFileDialog::getFilenames  )  const
 

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

void FX::FXFileDialog::setPattern const FXString ptrn  ) 
 

Change file pattern.

FXString FX::FXFileDialog::getPattern  )  const
 

Return file pattern.

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.

FXString FX::FXFileDialog::getPatternList  )  const
 

Return list of patterns.

void FX::FXFileDialog::setCurrentPattern FXint  n  ) 
 

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

FXint FX::FXFileDialog::getCurrentPattern  )  const
 

Return current pattern number.

FXString FX::FXFileDialog::getPatternText FXint  patno  )  const
 

Get pattern text for given pattern number.

void FX::FXFileDialog::setPatternText FXint  patno,
const FXString text
 

Change pattern text for pattern number.

void FX::FXFileDialog::setDirectory const FXString path  ) 
 

Change directory.

FXString FX::FXFileDialog::getDirectory  )  const
 

Return directory.

void FX::FXFileDialog::setItemSpace FXint  s  ) 
 

Set the inter-item spacing (in pixels).

FXint FX::FXFileDialog::getItemSpace  )  const
 

Return the inter-item spacing (in pixels).

void FX::FXFileDialog::setFileBoxStyle FXuint  style  ) 
 

Change File List style.

FXuint FX::FXFileDialog::getFileBoxStyle  )  const
 

Return File List style.

void FX::FXFileDialog::setSelectMode FXuint  mode  ) 
 

Change file selection mode.

FXuint FX::FXFileDialog::getSelectMode  )  const
 

Return file selection mode.

void FX::FXFileDialog::setMatchMode FXuint  mode  ) 
 

Change wildcard matching mode.

FXuint FX::FXFileDialog::getMatchMode  )  const
 

Return wildcard matching mode.

void FX::FXFileDialog::showReadOnly FXbool  show  ) 
 

Show readonly button.

FXbool FX::FXFileDialog::shownReadOnly  )  const
 

Return TRUE if readonly is shown.

void FX::FXFileDialog::setReadOnly FXbool  state  ) 
 

Set initial state of readonly button.

FXbool FX::FXFileDialog::getReadOnly  )  const
 

Get readonly state.

FXString FX::FXFileDialog::getOpenFilename FXWindow owner,
const FXString caption,
const FXString path,
const FXString patterns = "*",
FXint  initial = 0
[static]
 

Open existing filename.

FXString* FX::FXFileDialog::getOpenFilenames FXWindow owner,
const FXString caption,
const FXString path,
const FXString patterns = "*",
FXint  initial = 0
[static]
 

Open multiple existing files.

FXString FX::FXFileDialog::getSaveFilename FXWindow owner,
const FXString caption,
const FXString path,
const FXString patterns = "*",
FXint  initial = 0
[static]
 

Save to filename.

FXString FX::FXFileDialog::getOpenDirectory FXWindow owner,
const FXString caption,
const FXString path
[static]
 

Open directory name.

virtual void FX::FXFileDialog::save FXStream store  )  const [virtual]
 

Save to stream.

Reimplemented from FX::FXTopWindow.

virtual void FX::FXFileDialog::load FXStream store  )  [virtual]
 

Load from stream.

Reimplemented from FX::FXTopWindow.

Copyright © 1997-2004 Jeroen van der Zijp