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 allowPatternEntry (FXbool allow)
FXbool allowPatternEntry () const
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
FXbool showHiddenFiles () const
void showHiddenFiles (FXbool showing)
FXbool showImages () const
void showImages (FXbool showing)
FXint getImageSize () const
void setImageSize (FXint size)
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
 

Constructor.

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

Destructor.


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,

"*\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::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.

void FX::FXFileSelector::allowPatternEntry FXbool  allow  ) 
 

Allow pattern entry.

FXbool FX::FXFileSelector::allowPatternEntry  )  const
 

Return TRUE if pattern entry is allowed.

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.

FXbool FX::FXFileSelector::showHiddenFiles  )  const
 

Return TRUE if showing hidden files.

void FX::FXFileSelector::showHiddenFiles FXbool  showing  ) 
 

Show or hide hidden files.

FXbool FX::FXFileSelector::showImages  )  const
 

Return TRUE if image preview on.

void FX::FXFileSelector::showImages FXbool  showing  ) 
 

Show or hide preview images.

FXint FX::FXFileSelector::getImageSize  )  const
 

Return images preview size.

void FX::FXFileSelector::setImageSize FXint  size  ) 
 

Change images preview size.

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-2005 Jeroen van der Zijp