PtFileSel

Gamma/Photon: Using Gamma™ with the Photon microGUIŽ, Version 4.0
Prev |  | Next

# `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.

| 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:

  Constant | Description
  --- | ---
  `Pt_FS_SHOW_DIRS` | Show directories.
  `Pt_FS_SHOW_FILES` | Show files.
  `Pt_FS_SHOW_HIDDEN` | Show hidden directories or files.
  `Pt_FS_SHOW_ERRORS` | Show files with read errors.
  `Pt_FS_FREE_ON_COLLAPSE` | Frees items on every collapse.
  `Pt_FS_SINGLE_LEVEL` | Use single-level mode, rather than the default tree mode.
  `Pt_FS_SEEK_KEY` | In single level mode, use keyboard seek to find items.
  `Pt_FS_ALL_FLAGS` | A 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:

Callback | Description
--- | ---
`Pt_CB_FS_STATE` | This callback is generated when an item is expanded or collapsed.
`Pt_CB_FS_SELECTION` | This callback is generated when an item is selected.
`Pt_CB_FS_BKGD_HANDLER` | This callback is generated when a directory item is read.

## Associated Classes

`PtFileSelItem`, `PtFileSelCallback`, `PtFileSelBkgdCallback`, `PtCallbackInfo`

Prev | Home | Next
`PtEllipse` | Up | `PtFolder`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.