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 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)
FXint getNumPatterns () const
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
void allowNavigation (FXbool flag)
FXbool allowNavigation () const
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXFileSelector ()

Static Public Member Functions

static FXString patternFromText (const FXString &pattern)
static 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

Return a pointer to the "Accept" button.

Return a pointer to the "Cancel" button.

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

Change file name.

Return file name, if any.

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.

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.

Return list of patterns.

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

Return current pattern number.

Get pattern text for given pattern number.

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

Change pattern text for pattern number.

Return number of patterns.

Allow pattern entry.

Return TRUE if pattern entry is allowed.

static 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.

static 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.

Change directory.

Return directory.

Set the inter-item spacing (in pixels)

Return the inter-item spacing (in pixels)

Change file list style.

Return file list style.

Change file selection mode.

Return file selection mode.

Change wildcard matching mode.

Return wildcard matching mode.

Return TRUE if showing hidden files.

Show or hide hidden files.

Return TRUE if image preview on.

Show or hide preview images.

Return images preview size.

Change images preview size.

Show readonly button.

Return TRUE if readonly is shown.

Set initial state of readonly button.

Get readonly state.

Allow or disallow navigation.

Is navigation allowed?

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