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

FX::FXFileSelector Class Reference

File selection widget. More...

#include <FXFileSelector.h>

Inheritance diagram for FX::FXFileSelector:

FX::FXPacker FX::FXComposite FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject List of all members.

Public Member Functions

 FXFileSelector (FXComposite *p, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
FXButtonacceptButton () const
FXButtoncancelButton () const
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 ~FXFileSelector ()

Static Public Member Functions

FXString patternFromText (const FXString &pattern)
FXString extensionFromPattern (const FXString &pattern)

Detailed Description

File selection widget.

See also:

Constructor & Destructor Documentation

FX::FXFileSelector::FXFileSelector FXComposite p,
FXObject tgt = NULL,
FXSelector  sel = 0,
FXuint  opts = 0,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0


virtual FX::FXFileSelector::~FXFileSelector  )  [virtual]


Member Function Documentation

FXButton* FX::FXFileSelector::acceptButton  )  const [inline]

Return a pointer to the "Accept" button.

FXButton* FX::FXFileSelector::cancelButton  )  const [inline]

Return a pointer to the "Cancel" button.

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

Change file name.

FXString FX::FXFileSelector::getFilename  )  const

Return file name, if any.

FXString* FX::FXFileSelector::getFilenames  )  const

Return array of strings containing the selected file names, terminated by an empty string.

This string array must be freed using delete []. If no files were selected, a NULL is returned.

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

Change file pattern.

FXString FX::FXFileSelector::getPattern  )  const

Return file pattern.

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



"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::FXFileSelector::getPatternList  )  const

Return list of patterns.

void FX::FXFileSelector::setCurrentPattern FXint  n  ) 

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

FXint FX::FXFileSelector::getCurrentPattern  )  const

Return current pattern number.

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

Get pattern text for given pattern number.

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

Change pattern text for pattern number.

FXString FX::FXFileSelector::patternFromText const FXString pattern  )  [static]

Given filename pattern of the form "GIF Format (*.gif)", returns the pattern only, i.e.

"*.gif" in this case. If the parentheses are not found then returns the entire input pattern.

FXString FX::FXFileSelector::extensionFromPattern const FXString pattern  )  [static]

Given a pattern of the form "*.gif,*.GIF", return the first extension of the pattern, i.e.

"gif" in this example. Returns empty string if it doesn't work out.

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

Change directory.

FXString FX::FXFileSelector::getDirectory  )  const

Return directory.

void FX::FXFileSelector::setItemSpace FXint  s  ) 

Set the inter-item spacing (in pixels).

FXint FX::FXFileSelector::getItemSpace  )  const

Return the inter-item spacing (in pixels).

void FX::FXFileSelector::setFileBoxStyle FXuint  style  ) 

Change file list style.

FXuint FX::FXFileSelector::getFileBoxStyle  )  const

Return file list style.

void FX::FXFileSelector::setSelectMode FXuint  mode  ) 

Change file selection mode.

FXuint FX::FXFileSelector::getSelectMode  )  const [inline]

Return file selection mode.

void FX::FXFileSelector::setMatchMode FXuint  mode  ) 

Change wildcard matching mode.

FXuint FX::FXFileSelector::getMatchMode  )  const

Return wildcard matching mode.

void FX::FXFileSelector::showReadOnly FXbool  show  ) 

Show readonly button.

FXbool FX::FXFileSelector::shownReadOnly  )  const

Return TRUE if readonly is shown.

void FX::FXFileSelector::setReadOnly FXbool  state  ) 

Set initial state of readonly button.

FXbool FX::FXFileSelector::getReadOnly  )  const

Get readonly state.

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

Save object to a stream.

Reimplemented from FX::FXPacker.

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

Load object from a stream.

Reimplemented from FX::FXPacker.

Copyright © 1997-2004 Jeroen van der Zijp