Class TGUITreeViewNode

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGUITreeViewNode = class(TReferenceCounted)

Description

Node for gui tree view.

Hierarchy

Overview

Methods

Public function AddChildBack(const Text: StringType; const Icon: StringType = ''; ImageIndex: LongInt = -1; SelectedImageIndex: LongInt = -1; Data: Pointer = nil): TGUITreeViewNode; inline;
Public function AddChildFront(const Text: StringType; const Icon: StringType = ''; ImageIndex: LongInt = -1; SelectedImageIndex: LongInt = -1; Data: Pointer = nil): TGUITreeViewNode; inline;
Public function DeleteChild(Child: TGUITreeViewNode): Boolean; inline;
Public function GetFirstChild: TGUITreeViewNode; inline;
Public function GetIcon: StringType; inline;
Public function GetLastChild: TGUITreeViewNode; inline;
Public function GetNextSibling: TGUITreeViewNode; inline;
Public function GetNextVisible: TGUITreeViewNode; inline;
Public function GetOwner: TGUIElement; inline;
Public function GetParent: TGUITreeViewNode; inline;
Public function GetPrevSibling: TGUITreeViewNode; inline;
Public function InsertChildAfter(Other: TGUITreeViewNode; const Text: StringType; const Icon: StringType = ''; ImageIndex: LongInt = -1; SelectedImageIndex: LongInt = -1; Data: Pointer = nil): TGUITreeViewNode; inline;
Public function InsertChildBefore(Other: TGUITreeViewNode; const Text: StringType; const Icon: StringType = ''; ImageIndex: LongInt = -1; SelectedImageIndex: LongInt = -1; Data: Pointer = nil): TGUITreeViewNode; inline;
Public function MoveChildDown(Child: TGUITreeViewNode): Boolean; inline;
Public function MoveChildUp(Child: TGUITreeViewNode): Boolean; inline;
Public procedure ClearChildren; inline;

Properties

Public property ChildCount: LongWord read GetChildCount;
Public property Data: Pointer read GetData write SetData;
Public property Expanded: Boolean read GetExpanded write SetExpanded;
Public property HasChildren: Boolean read GetHasChildren;
Public property ImageIndex: LongWord read GetImageIndex write SetImageIndex;
Public property IsRoot: Boolean read GetIsRoot;
Public property Level: LongInt read GetLevel;
Public property Selected: Boolean read GetSelected write SetSelected;
Public property SelectedImageIndex: LongWord read GetSelectedImageIndex write SetSelectedImageIndex;
Public property Text: StringType read GetText write SetText;
Public property Visible: Boolean read IsVisible;

Description

Methods

Public function AddChildBack(const Text: StringType; const Icon: StringType = ''; ImageIndex: LongInt = -1; SelectedImageIndex: LongInt = -1; Data: Pointer = nil): TGUITreeViewNode; inline;

Adds a new node after the last child node.

Parameters
Text
Of the new node
Icon
Text of the new node
ImageIndex
Index of the image for the new node (-1 = none)
SelectedImageIndex
Index of the selected image for the new node (-1 = same as imageIndex)
Data
User data pointer of the new node
Returns

The new node.

Public function AddChildFront(const Text: StringType; const Icon: StringType = ''; ImageIndex: LongInt = -1; SelectedImageIndex: LongInt = -1; Data: Pointer = nil): TGUITreeViewNode; inline;

Adds a new node before the first child node.

Parameters
Text
Of the new node
Icon
Text of the new node
ImageIndex
Index of the image for the new node (-1 = none)
SelectedImageIndex
Index of the selected image for the new node (-1 = same as imageIndex)
Data
User data pointer of the new node
Returns

The new node.

Public function DeleteChild(Child: TGUITreeViewNode): Boolean; inline;

Deletes a child node.

Returns

True if the node was found as a child and is deleted.

Public function GetFirstChild: TGUITreeViewNode; inline;

Returns the first child node, if any, else nil.

Public function GetIcon: StringType; inline;

Returns the node's icon string.

Public function GetLastChild: TGUITreeViewNode; inline;

Returns the last child node, if any, else nil.

Public function GetNextSibling: TGUITreeViewNode; inline;

Returns the node following this one in the parent node's children list.

Public function GetNextVisible: TGUITreeViewNode; inline;

Returns the next visible node.
A node is visible when all it's parents are expanded. This function may be used to traverse a tree like using the "up" or "down" arrows.

Public function GetOwner: TGUIElement; inline;

Returns the owning GUITreeView.

Public function GetParent: TGUITreeViewNode; inline;

Returns the parent node, or nil if this is the root node.

Public function GetPrevSibling: TGUITreeViewNode; inline;

Returns the node preceding this one in the parent node's children list.

Public function InsertChildAfter(Other: TGUITreeViewNode; const Text: StringType; const Icon: StringType = ''; ImageIndex: LongInt = -1; SelectedImageIndex: LongInt = -1; Data: Pointer = nil): TGUITreeViewNode; inline;

Adds a new node after another one.

Parameters
Other
The node to insert after.
Text
Of the new node
Icon
Text of the new node
ImageIndex
Index of the image for the new node (-1 = none)
SelectedImageIndex
Index of the selected image for the new node (-1 = same as imageIndex)
Data
User data pointer of the new node
Returns

The new node.

Public function InsertChildBefore(Other: TGUITreeViewNode; const Text: StringType; const Icon: StringType = ''; ImageIndex: LongInt = -1; SelectedImageIndex: LongInt = -1; Data: Pointer = nil): TGUITreeViewNode; inline;

Adds a new node before another one.

Parameters
Other
The node to insert after.
Text
Of the new node
Icon
Text of the new node
ImageIndex
Index of the image for the new node (-1 = none)
SelectedImageIndex
Index of the selected image for the new node (-1 = same as imageIndex)
Data
User data pointer of the new node
Returns

The new node.

Public function MoveChildDown(Child: TGUITreeViewNode): Boolean; inline;

Moves a child node down by one position.

Returns

True if the node was found as a child node and was not already the last child.

Public function MoveChildUp(Child: TGUITreeViewNode): Boolean; inline;

Moves a child node up by one position.

Returns

True if the node was found as a child node and was not already the first child.

Public procedure ClearChildren; inline;

Removes all childs (recursive) from this node.

Properties

Public property ChildCount: LongWord read GetChildCount;

The number of child nodes.

Public property Data: Pointer read GetData write SetData;

The user data pointer of this node.
This pointer is never dereferenced and may therefore safely contain a casted Integer.

Public property Expanded: Boolean read GetExpanded write SetExpanded;

Specifies whether the node is expanded and its children are visible.

Public property HasChildren: Boolean read GetHasChildren;

Tells whether this node has any children.

Public property ImageIndex: LongWord read GetImageIndex write SetImageIndex;

The index of this node's image in the TreeView's image list.

Public property IsRoot: Boolean read GetIsRoot;

Tells whether this node is a root node.

Public property Level: LongInt read GetLevel;

The level of this node in the owning TreeView's hierarchy.
The root node has level 0.

Public property Selected: Boolean read GetSelected write SetSelected;

Specifies whether this node is currently selected.

Public property SelectedImageIndex: LongWord read GetSelectedImageIndex write SetSelectedImageIndex;

The index of this node's "selected" image in the TreeView's image list.

Public property Text: StringType read GetText write SetText;

The node's caption.

Public property Visible: Boolean read IsVisible;

True if this node is visible (all parents are expanded)


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22