Prima::FileDialog - File system related widgets and dialogs.
|
Prima::FileDialog - File system related widgets and dialogs.
The module contains widgets for file and drive selection,
and also standard open file, save file, and change directory
dialogs.
A directory listing list box. Shows the list of
subdirectories and upper directories, hierarchy-mapped,
with the folder images and outlines.
- closedGlyphs INTEGER
-
Number of horizontal equal-width images, contained in closedIcon
property.
Default value: 1
- closedIcon ICON
-
Provides an icon representation
for the directories, contained in the current directory.
- indent INTEGER
-
A positive integer number of pixels, used for offset of
the hierarchy outline.
Default value: 12
- openedGlyphs INTEGER
-
Number of horizontal equal-width images, contained in openedIcon
property.
Default value: 1
- openedIcon OBJECT
-
Provides an icon representation
for the directories, contained in the directories above the current
directory.
- path STRING
-
Runtime-only property. Selects a file system path.
- showDotDirs BOOLEAN
-
Selects if the directories with the first dot character
are shown the view. The treatment of the dot-prefixed names
as hidden is traditional to unix, and is of doubtful use under
win32 and os2.
Default value: 1
- files [ FILE_TYPE ]
-
If FILE_TYPE value is not specified, the list of all files in the
current directory is returned. If FILE_TYPE is given, only the files
of the types are returned. The FILE_TYPE is a string, one of those
returned by
Prima::Utils::getdir
( see getdir in the Prima::Utils manpage.
Provides drive selection combo-box for non-unix systems.
- firstDrive DRIVE_LETTER
-
Create-only property.
Default value: 'A:'
DRIVE_LETTER can be set to other value to start the drive enumeration from.
Some OSes can probe eventual diskette drives inside the drive enumeration
routines, so it might be reasonable to set DRIVE_LETTER to C:
string
for responsiveness increase.
- drive DRIVE_LETTER
-
Selects the drive letter.
Default value: 'C:'
Provides a standard file dialog, allowing to navigate by the
file system and select one or many files. The class can
operate in two modes - 'open' and 'save'; these modes are
set by the Prima::OpenDialog manpage and the Prima::SaveDialog manpage.
Some properties behave differently depending on the mode,
which is stored in openMode property.
- createPrompt BOOLEAN
-
If 1, and a file selected is nonexistent, asks the user
if the file is to be created.
Only actual when openMode is 1.
Default value: 0
- defaultExt STRING
-
Selects the file extension, appended to the
file name typed by the user, if the extension is not given.
Default value: ''
- directory STRING
-
Selects the currently selected directory.
- fileMustExist BOOLEAN
-
If 1, ensures that the file typed by the user exists before
closing the dialog.
Default value: 1
- fileName STRING, ...
-
For single-file selection, assigns the selected file name,
For multiple-file selection, on get-call returns list of the selected
files; on set-call, accepts a single string, where the file names
are separated by the space character. The eventual space characters
must be quoted.
- filter ARRAY
-
Contains array of arrays of string pairs, where each pair describes
a file type. The first scalar in the pair is the description of
the type; the second is a file mask.
Default value: [[ 'All files' => '*']]
- filterIndex INTEGER
-
Selects the index in filter array of the currently selected file type.
- multiSelect BOOLEAN
-
Selects whether the user can select several ( 1 ) or one ( 0 ) file.
See also: fileName.
- noReadOnly BOOLEAN
-
If 1, fails to open a file when it is read-only.
Default value: 0
Only actual when openMode is 0.
- noTestFileCreate BOOLEAN
-
If 0, tests if a file selected can be created.
Default value: 0
Only actual when openMode is 0.
- overwritePrompt BOOLEAN
-
If 1, asks the user if the file selected is to be overwrittten.
Default value: 1
Only actual when openMode is 0.
- openMode BOOLEAN
-
Create-only property.
Selects whether the dialog operates in 'open' ( 1 ) mode or 'save' ( 0 )
mode.
- pathMustExist BOOLEAN
-
If 1, ensures that the path, types by the user, exists before
closing the dialog.
Default value: 1
- showDotFiles BOOLEAN
-
Selects if the directories with the first dot character
are shown the files view.
Default value: 0
- showHelp BOOLEAN
-
Create-only property. If 1, 'Help' button is inserted in the dialog.
Default value: 1
- sorted BOOLEAN
-
Selects whether the file list appears sorted by name ( 1 ) or not ( 0 ).
Default value : 1
- reread
-
Re-reads the currently selected directory.
Descendant of the Prima::FileDialog manpage, tuned for open-dialog functionality.
Descendant of the Prima::FileDialog manpage, tuned for save-dialog functionality.
Provides standard dialog with interactive directory selection.
- directory STRING
-
Selects the directory
- showDotDirs
-
Selects if the directories with the first dot character
are shown the view.
Default value: 0
- showHelp
-
Create-only property. If 1, 'Help' button is inserted in the dialog.
Default value: 1
Dmitry Karasik, <dmitry@karasik.eu.org>.
Prima, the Prima::Window manpage, the Prima::Lists manpage,
examples/drivecombo.pl, examples/launch.pl.
Prima::FileDialog - File system related widgets and dialogs.
|