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

FX::FXFileSelector Class Reference

#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 Methods

 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.

FXButtonacceptButton () const
 Return a pointer to the "Accept" button.

FXButtoncancelButton () const
 Return a pointer to the "Cancel" button.

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

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

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

FXString getPattern () const
 Return file pattern.

void setPatternList (const FXString &patterns)
void setPatternList (const FXchar **ptrns)
FXString getPatternList () const
 Return list of patterns.

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.

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 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 object to a stream.

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

virtual ~FXFileSelector ()
 Destructor.


Detailed Description

File selection widget

See also:


Member Function Documentation

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::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 FX::FXFileSelector::setPatternList const FXchar **    ptrns
 

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

void FX::FXFileSelector::setCurrentPattern FXint    n
 

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