PtGenTree

PtGenTree — A parent class for tree widget resources.

Synopsis

class PtGenTree PtGenList
{
    tree_flags;    // flag  (Pt_ARG_TREE_FLAGS)    
}
		

Base Classes

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

Derived Classes

PtFileSel, PtTree

Description

This class serves as a parent class of resources for tree widgets, and is not normally instantiated. Tree widgets are lists, each item of which can be expanded to display an attached sub-list, or collapsed to hide the sub-list. The items at the first level of the tree are called root items, and are always visible.

Trees can be built independently and added as roots or trees to the main tree. Items can be added separately as well, but this requires calls to PtHold and PtUpdate functions to avoid multiple redraws.

[Note]

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

Instance Variables

tree_flags

This instance variable controls the appearance and behavior of the tree, and may be a combination of zero or more of the following flags:

ConstantDescription
Pt_TREE_HAS_BUTTONSDisplay the + and - buttons.
Pt_TREE_HAS_LINESDisplay connecting lines.
Pt_TREE_ROOT_LINESDisplay root lines and buttons, if any.
Pt_TREE_TO_RIGHTItems are extended to right edge.
Pt_TREE_TO_LEFTBackground is extended to left edge.
Pt_TREE_COLLAPSINGA subtype of Pt_CB_TREE_STATE, indicating a collapsing state.
Pt_TREE_EXPANDINGA subtype of Pt_CB_TREE_STATE, indicating an expanding state.
Pt_TREE_ITEM_EXPANDABLEThe item can be expanded.
Pt_TREE_ITEM_EXPANDEDThe item branches are expanded and displayed.

Callbacks

The following callback is associated with this widget:

CallbackDescription
Pt_CB_GEN_TREE_INPUTThis callback is generated from mouse and key events.

Associated Classes

PtGenTreeInput, PtCallbackInfo