| ||||||||||
| ||||||||||
| ||||||||||
Description | ||||||||||
Prompt the user for a file or directory name
| ||||||||||
Synopsis | ||||||||||
Detail | ||||||||||
FileSelection should be used to retrieve file or directory names from the user. It will create a new dialog window containing a directory list, and a file list corresponding to the current working directory. The filesystem can be navigated using the directory list or the drop-down history menu. Alternatively, the TAB key can be used to navigate using filename completion - common in text based editors such as emacs and jed. File selection dialogs are created with a call to fileSelectionNew. The default filename can be set using fileSelectionSetFilename and the selected filename retrieved using fileSelectionGetFilename. Use fileSelectionComplete to display files and directories that match a given pattern. This can be used for example, to show only *.txt files, or only files beginning with gtk*. Simple file operations; create directory, delete file, and rename file, are available from buttons at the top of the dialog. These can be hidden using fileSelectionHideFileopButtons and shown again using fileSelectionShowFileopButtons. | ||||||||||
Class Hierarchy | ||||||||||
| GObject | +----Object | +----Widget | +----Container | +----Bin | +----Window | +----Dialog | +----FileSelection | ||||||||||
Types | ||||||||||
data FileSelection | ||||||||||
class DialogClass o => FileSelectionClass o | ||||||||||
castToFileSelection :: GObjectClass obj => obj -> FileSelection | ||||||||||
toFileSelection :: FileSelectionClass o => o -> FileSelection | ||||||||||
Constructors | ||||||||||
fileSelectionNew | ||||||||||
| ||||||||||
Methods | ||||||||||
fileSelectionSetFilename | ||||||||||
| ||||||||||
fileSelectionGetFilename | ||||||||||
| ||||||||||
fileSelectionShowFileopButtons :: FileSelectionClass self => self -> IO () | ||||||||||
Shows the file operation buttons, if they have previously been hidden. The rest of the widgets in the dialog will be resized accordingly. | ||||||||||
fileSelectionHideFileopButtons :: FileSelectionClass self => self -> IO () | ||||||||||
Hides the file operation buttons that normally appear at the top of the dialog. Useful if you wish to create a custom file selector, based on FileSelection. | ||||||||||
fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> IO (Button, Button) | ||||||||||
Extract the buttons of a fileselection. | ||||||||||
fileSelectionComplete | ||||||||||
| ||||||||||
fileSelectionGetSelections :: FileSelectionClass self => self -> IO [String] | ||||||||||
Retrieves the list of file selections the user has made in the dialog box. This function is intended for use when the user can select multiple files in the file list. | ||||||||||
fileSelectionSetSelectMultiple | ||||||||||
| ||||||||||
fileSelectionGetSelectMultiple | ||||||||||
| ||||||||||
Attributes | ||||||||||
fileSelectionFilename :: FileSelectionClass self => Attr self String | ||||||||||
The currently selected filename. | ||||||||||
fileSelectionShowFileops :: FileSelectionClass self => Attr self Bool | ||||||||||
Whether buttons for creating/manipulating files should be displayed. Default value: False | ||||||||||
fileSelectionSelectMultiple :: FileSelectionClass self => Attr self Bool | ||||||||||
Whether to allow multiple files to be selected. Default value: False | ||||||||||
Produced by Haddock version 2.6.0 |