![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
File selection widget. More...
#include <FXFileSelector.h>
Public Types | |
| enum | { ID_FILEFILTER = FXPacker::ID_LAST, ID_ACCEPT, ID_FILELIST, ID_DIRECTORY_UP, ID_DIRTREE, ID_NORMAL_SIZE, ID_MEDIUM_SIZE, ID_GIANT_SIZE, ID_HOME, ID_WORK, ID_BOOKMARK, ID_BOOKMENU, ID_VISIT, ID_NEW, ID_RENAME, ID_COPY, ID_MOVE, ID_LINK, ID_REMOVE, ID_LAST } |
Public Member Functions | |
| long | onCmdAccept (FXObject *, FXSelector, void *) |
| long | onCmdFilter (FXObject *, FXSelector, void *) |
| long | onCmdItemDblClicked (FXObject *, FXSelector, void *) |
| long | onCmdItemSelected (FXObject *, FXSelector, void *) |
| long | onCmdItemDeselected (FXObject *, FXSelector, void *) |
| long | onCmdDirectoryUp (FXObject *, FXSelector, void *) |
| long | onUpdDirectoryUp (FXObject *, FXSelector, void *) |
| long | onCmdDirTree (FXObject *, FXSelector, void *) |
| long | onCmdHome (FXObject *, FXSelector, void *) |
| long | onCmdWork (FXObject *, FXSelector, void *) |
| long | onCmdBookmark (FXObject *, FXSelector, void *) |
| long | onCmdVisit (FXObject *, FXSelector, void *) |
| long | onCmdNew (FXObject *, FXSelector, void *) |
| long | onUpdNew (FXObject *, FXSelector, void *) |
| long | onCmdRename (FXObject *, FXSelector, void *) |
| long | onCmdCopy (FXObject *, FXSelector, void *) |
| long | onCmdMove (FXObject *, FXSelector, void *) |
| long | onCmdLink (FXObject *, FXSelector, void *) |
| long | onCmdRemove (FXObject *, FXSelector, void *) |
| long | onUpdSelected (FXObject *, FXSelector, void *) |
| long | onPopupMenu (FXObject *, FXSelector, void *) |
| long | onCmdImageSize (FXObject *, FXSelector, void *) |
| long | onUpdImageSize (FXObject *, FXSelector, void *) |
| long | onUpdNavigable (FXObject *, FXSelector, void *) |
| 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. | |
| FXButton * | acceptButton () const |
| Return a pointer to the "Accept" button. | |
| FXButton * | cancelButton () const |
| Return a pointer to the "Cancel" button. | |
| void | setFilename (const FXString &path) |
| Change file name. | |
| FXString | getFilename () const |
| Return file name, if any. | |
| FXString * | getFilenames () const |
| Return array of strings containing the selected file names, terminated by an empty string. | |
| void | setPattern (const FXString &ptrn) |
| Change file pattern. | |
| FXString | getPattern () const |
| Return file pattern. | |
| void | setPatternList (const FXString &patterns) |
| Change the list of file patterns shown in the file dialog. | |
| FXString | getPatternList () const |
| Return list of patterns. | |
| void | setCurrentPattern (FXint patno) |
| After setting the list of patterns, this call will initially select pattern n as the active one. | |
| FXint | getCurrentPattern () const |
| Return current pattern number. | |
| void | setPatternText (FXint patno, const FXString &text) |
| Change pattern text for pattern number. | |
| FXString | getPatternText (FXint patno) const |
| Get pattern text for given pattern number. | |
| FXint | getNumPatterns () const |
| Return number of patterns. | |
| void | allowPatternEntry (FXbool flag) |
| Allow pattern entry. | |
| FXbool | allowPatternEntry () const |
| Return true if pattern entry is allowed. | |
| 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; the default is SELECTFILE_ANY. | |
| FXuint | getSelectMode () const |
| Return file selection mode. | |
| void | setMatchMode (FXuint mode) |
| Change wildcard matching mode (see FXPath) | |
| FXuint | getMatchMode () const |
| Return wildcard matching mode. | |
| FXbool | showHiddenFiles () const |
| Return true if showing hidden files. | |
| void | showHiddenFiles (FXbool flag) |
| Show or hide hidden files. | |
| FXbool | showImages () const |
| Return true if image preview on. | |
| void | showImages (FXbool flag) |
| Show or hide preview images. | |
| FXint | getImageSize () const |
| Return images preview size. | |
| void | setImageSize (FXint size) |
| Change images preview size. | |
| void | showReadOnly (FXbool flag) |
| Show readonly button. | |
| FXbool | shownReadOnly () const |
| Return true if readonly is shown. | |
| void | setReadOnly (FXbool flag) |
| Set initial state of readonly button. | |
| FXbool | getReadOnly () const |
| Get readonly state. | |
| void | allowNavigation (FXbool flag) |
| Allow or disallow navigation. | |
| FXbool | allowNavigation () const |
| Is navigation allowed? | |
| void | setAssociations (FXFileDict *assoc, FXbool owned=false) |
| Change file associations; delete old ones if owned. | |
| FXFileDict * | getAssociations () const |
| Return file associations. | |
| void | setDraggableFiles (FXbool flag) |
| Set draggable files. | |
| FXbool | getDraggableFiles () const |
| Are draggable files. | |
| virtual void | save (FXStream &store) const |
| Save object to a stream. | |
| virtual void | load (FXStream &store) |
| Load object from a stream. | |
| virtual | ~FXFileSelector () |
| Destructor. | |
Static Public Member Functions | |
| static FXString | patternFromText (const FXString &pattern) |
| Given filename pattern of the form "GIF Format (*.gif)", returns the pattern only, i.e. | |
| static FXString | extensionFromPattern (const FXString &pattern) |
| Given a pattern of the form "*.gif,*.GIF", return the first extension of the pattern, i.e. | |
Protected Member Functions | |
| FXString * | getSelectedFiles () const |
| FXString * | getSelectedFilesOnly () const |
Protected Attributes | |
| FXFileList * | filebox |
| FXTextField * | filename |
| FXComboBox * | filefilter |
| FXMenuPane * | bookmarkmenu |
| FXHorizontalFrame * | navbuttons |
| FXHorizontalFrame * | fileboxframe |
| FXMatrix * | entryblock |
| FXCheckButton * | readonly |
| FXDirBox * | dirbox |
| FXButton * | accept |
| FXButton * | cancel |
| FXIcon * | updiricon |
| FXIcon * | listicon |
| FXIcon * | detailicon |
| FXIcon * | iconsicon |
| FXIcon * | homeicon |
| FXIcon * | workicon |
| FXIcon * | shownicon |
| FXIcon * | hiddenicon |
| FXIcon * | markicon |
| FXIcon * | clearicon |
| FXIcon * | newicon |
| FXIcon * | renameicon |
| FXIcon * | copyicon |
| FXIcon * | moveicon |
| FXIcon * | linkicon |
| FXIcon * | deleteicon |
| FXRecentFiles | bookmarks |
| FXuint | selectmode |
| FXbool | navigable |
File selection widget.
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.
| 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.
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.
| 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.
|
|