PtFileSel

PtFileSel — A tree-like widget used to select files and directories.

Synopsis

class PtFileSel PtGenTree
{
    fs_file_spec;    // string  (Pt_ARG_FS_FILE_SPEC)    
    fs_flags;        // flag  (Pt_ARG_FS_FLAGS)    
    fs_root_dir;     // string  (Pt_ARG_FS_ROOT_DIR)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer <-- PtGenList <-- PtGenTree <-- PtFileSel

Description

This widget reads and displays file directories in a collapsing tree format that can be expanded to show sub-directories, files, and links. It uses images to differentiate various kinds of files.

[Note]

For detailed information, please refer to PtFileSel in the Photon documentation.

Instance Variables

fs_file_spec

A string specifying the files to match. The wildcard symbol "*" is the default. Multiple patterns can be specified; each must be separated by a comma.

fs_flags

This instance variable controls the characteristics of the widget, and may be a combination of zero or more of the following flags:

ConstantDescription
Pt_FS_SHOW_DIRSShow directories.
Pt_FS_SHOW_FILESShow files.
Pt_FS_SHOW_HIDDENShow hidden directories or files.
Pt_FS_SHOW_ERRORSShow files with read errors.
Pt_FS_FREE_ON_COLLAPSEFrees items on every collapse.
Pt_FS_SINGLE_LEVELUse single-level mode, rather than the default tree mode.
Pt_FS_SEEK_KEYIn single level mode, use keyboard seek to find items.
Pt_FS_ALL_FLAGSA mask containing all FS flag bits.

fs_root_dir

A string specifying the root directory for the file selector. Default is nil.

Callbacks

The following callbacks are associated with this widget:

CallbackDescription
Pt_CB_FS_STATEThis callback is generated when an item is expanded or collapsed.
Pt_CB_FS_SELECTIONThis callback is generated when an item is selected.
Pt_CB_FS_BKGD_HANDLERThis callback is generated when a directory item is read.

Associated Classes

PtFileSelItem, PtFileSelCallback, PtFileSelBkgdCallback, PtCallbackInfo