Class | Fox::FXFileSelector |
In: |
rdoc-sources/FXFileSelector.rb
|
Parent: | FXPacker |
File selection widget
SELECTFILE_ANY: | A single file, existing or not (to save to) |
SELECTFILE_EXISTING: | An existing file (to load) |
SELECTFILE_MULTIPLE: | Multiple existing files |
SELECTFILE_MULTIPLE_ALL: | Multiple existing files or directories, but not ’.’ and ’..’ |
SELECTFILE_DIRECTORY: | Existing directory, including ’.’ or ’..’ |
FILEMATCH_FILE_NAME: | No wildcard can ever match "/" (or "\","/" under Windows). |
FILEMATCH_NOESCAPE: | Backslashes don‘t quote special chars ("\" is treated as "\"). |
FILEMATCH_PERIOD: | Leading "." is matched only explicitly (Useful to match hidden files on Unix). |
FILEMATCH_LEADING_DIR: | Ignore "/…" after a match. |
FILEMATCH_CASEFOLD: | Compare without regard to case. |
Note that under Windows, FILEMATCH_NOESCAPE must be passed.
ID_FILEFILTER: | x |
ID_ACCEPT: | x |
ID_FILELIST: | x |
ID_DIRECTORY_UP: | x |
ID_DIRTREE: | x |
ID_NORMAL_SIZE: | x |
ID_MEDIUM_SIZE: | x |
ID_GIANT_SIZE: | x |
ID_HOME: | x |
ID_WORK: | x |
ID_BOOKMARK: | x |
ID_BOOKMENU: | x |
ID_VISIT: | x |
ID_NEW: | x |
ID_DELETE: | x |
ID_MOVE: | x |
ID_COPY: | x |
ID_LINK: | x |
acceptButton | [R] | The "Accept" button [FXButton] |
cancelButton | [R] | The "Cancel" button [FXButton] |
currentPattern | [RW] | Current pattern number [Integer] |
directory | [RW] | Directory [String] |
fileBoxStyle | [RW] | Change file list style [Integer] |
filename | [RW] | File name [String] |
imageSize | [RW] | Image size for preview images [Integer] |
itemSpace | [RW] | Inter-item spacing (in pixels) [Integer] |
matchMode | [RW] | Wildcard matching mode [Integer] |
pattern | [RW] | File pattern [String] |
selectMode | [RW] | Change file selection mode [Integer] |
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.
Return an initialized FXFileSelector instance.
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.
Change the list of file patterns shown in the file selector. The patterns argument is an array of strings, and each string represents a different file pattern. A pattern consists of an optional name, followed by a pattern in parentheses. For example, this code:
patterns = [ "*", "*.cpp,*.cc", "*.hpp,*.hh,*.h" ] aFileSelector.setPatternList(patterns)
and this code:
patterns = [ "All Files (*)", "C++ Sources (*.cpp,*.cc)", "C++ Headers (*.hpp,*.hh,*.h)" ] aFileSelector.setPatternList(patterns)
will both set the same three patterns, but the former shows no pattern names.
For compatibility with the FOX C++ library API of the same name, setPatternList also accepts a patterns value that is a single string, with each pattern separated by newline characters, e.g.
patterns = "All Files (*)\nC++ Sources (*.cpp,*.cc)\nC++ Headers (*.hpp,*.hh,*.h)" aFileSelector.setPatternList(patterns)