Class Fox::FXFileSelector

In: | FXFileSelector.rb
Parent: | FXPacker

File selection widget

### File selection modes

`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
`SELECTFILE_DIRECTORY`: | Existing directory

### Message identifiers

`ID_FILEFILTER`: | x
`ID_ACCEPT`: | x
`ID_FILELIST`: | x
`ID_DIRECTORY_UP`: | x
`ID_DIRTREE`: | x
`ID_HOME`: | x
`ID_WORK`: | x
`ID_BOOKMARK`: | x
`ID_VISIT`: | x
`ID_NEW`: | x
`ID_DELETE`: | x
`ID_MOVE`: | x
`ID_COPY`: | x
`ID_LINK`: | x

Methods

filenames getPatternText new patternList patternList= readOnly= readOnly? readOnlyShown= readOnlyShown? setPatternText

Attributes

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]
itemSpace | [RW] | Inter-item spacing (in pixels) [Integer]
pattern | [RW] | File pattern [String]
selectMode | [RW] | Change file selection mode [Integer]

Public Class methods

new(p, tgt=nil, sel=0, opts=0, x=0, y=0, w=0, h=0) {|theFileSelector| ...}

Return an initialized FXFileSelector instance.

Public Instance methods

filenames()

Returns an array of the selected file names.

patternList=(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.

patternList()

Returns the list of patterns (an Array of Strings)

getPatternText(patno)

Get pattern text for given pattern number

setPatternText(patno, text)

Change pattern text for pattern number

readOnlyShown=(shown)

Show read-only button.

readOnlyShown?()

Return `true` if the read-only button is shown.

readOnly=(state)

Set state of read-only button.

readOnly?()

Return `true` if in read-only mode.