Class TDDXOutlineNode (unit Ddxoutl) |
Inherits from
TPersistent
TDDXOutlineNode } { The TDDXOutlineNode is an encapsulation of an outliner item. Access
to a TDDXOutlineNode is via the container class TDDXOutline. Each
TDDXOutlineNode contains user defined text and data.
An item is also capable of containing up to 16368 sub-items.
TDDXOutlineNodes are also persistent.
A TDDXOutlineNode item can be interrogated about its current state :
Expanded
Whether the node is open or closed.
Index
The current Index of the node. This changes as items are inserted and
deleted. The index will range from 1..n
Level
The current depth of the node with 1 being the top level
HasItems
Whether the item contains items
IsVisible
Whether the item is capable of being displayed. This value is only
True if all its parent items are visible
TopItem
Obtains the parent of the item that resides at level 1
FullPath
Returns the fully qualified name of the item starting from its
level 1 parent. Each item is separated by the separator string
specified in the TOutline Container
Text
Used to set and get the items text value
Data
Used to get and set the items data
constructor Create(AOwner: TDDXCustomOutline);
- TDDXOutlineNode
procedure ChangeLevelBy(Value: TChangeRange);
procedure Collapse;
procedure Expand;
procedure FullExpand;
function GetDisplayWidth: Integer;
function GetFirstChild: LongInt;
function GetLastChild: LongInt;
function GetNextChild(Value: LongInt): LongInt;
function GetPrevChild(Value: LongInt): LongInt;
procedure MoveTo(Destination: LongInt; AttachMode: TAttachMode);
function AddNode(Value: TDDXOutlineNode): LongInt;
destructor Destroy;
BitmapHandle := FOutline.
function GetDataItem(Value: Pointer): LongInt;
function GetNodeAtIndex(TargetIndex: LongInt): TDDXOutlineNode;
Quick exit if we are lucky
function GetRowOfNode(TargetNode: TDDXOutlineNode;
var RowCount: Longint): Boolean;
function GetTextItem(const Value: string): LongInt;
function GetVisibleNode(TargetCount: LongInt): TDDXOutlineNode;
function HasAsParent(Value: TDDXOutlineNode): Boolean;
function InsertNode(Index: LongInt; Value: TDDXOutlineNode): LongInt;
procedure Remove(Value: TDDXOutlineNode);
procedure WriteNode(Buffer: PChar; Stream: TStream);
procedure ChangeExpandedCount(Value: LongInt);
function TDDXOutlineNode.
procedure Clear;
procedure CloseNode;
procedure Error(ErrorStringID: Word);
function GetExpandedNodeCount: LongInt;
function GetFullPath: string;
function GetIndex: LongInt;
function GetLastIndex: LongInt;
function GetLevel: Cardinal;
function GetList: TList;
function GetMaxDisplayWidth(Value: Cardinal): Cardinal;
function GetNode(Index: LongInt): TDDXOutlineNode;
function GetText: string;
function GetBmpHandle : HBitmap;
function GetTopItem: Longint;
function GetVisibleParent: TDDXOutlineNode;
function HasChildren: Boolean;
function HasVisibleParent: Boolean;
procedure ReIndex(StartNode, EndNode: TDDXOutlineNode; NewIndex: LongInt;
IncludeStart: Boolean);
procedure Repaint;
function Resync(var NewIndex: LongInt; EndNode: TDDXOutlineNode): Boolean;
procedure SetBmpHandle(theBmpHandle : HBitmap);
procedure SetExpandedState(Value: Boolean);
procedure SetGoodIndex;
procedure SetHorzScrollBar;
Node.
procedure SetLevel(Level: Cardinal);
procedure SetText(const Value: string);
property BitmapHandle : HBitmap
property Data : Pointer
property Expanded : Boolean
property FullPath : string
property HasItems : Boolean
property Index : LongInt
property IsVisible : Boolean
property Level : Cardinal
property Parent : TDDXOutlineNode
property Text : string
property TopItem : Longint
property ExpandCount : LongInt
property Items : TDDXOutlineNode
property List : TList
property Outline : TDDXCustomOutline
FBmpHandle : HBitmap;
FData : Pointer;
FExpandCount : LongInt;
FIndex : LongInt;
FList : TList;
FOutline : TDDXCustomOutline;
FParent : TDDXOutlineNode;
FState : Boolean;
FText : PString;
constructor Create(AOwner: TDDXCustomOutline);
TDDXOutlineNode
procedure ChangeLevelBy(Value: TChangeRange);
procedure Collapse;
procedure Expand;
procedure FullExpand;
function GetDisplayWidth: Integer;
function GetFirstChild: LongInt;
function GetLastChild: LongInt;
function GetNextChild(Value: LongInt): LongInt;
function GetPrevChild(Value: LongInt): LongInt;
procedure MoveTo(Destination: LongInt; AttachMode: TAttachMode);
function AddNode(Value: TDDXOutlineNode): LongInt;
destructor Destroy;
BitmapHandle := FOutline.PictureLeaf.Handle;
function GetDataItem(Value: Pointer): LongInt;
function GetNodeAtIndex(TargetIndex: LongInt): TDDXOutlineNode;
Quick exit if we are lucky
function GetRowOfNode(TargetNode: TDDXOutlineNode;
var RowCount: Longint): Boolean;
function GetTextItem(const Value: string): LongInt;
function GetVisibleNode(TargetCount: LongInt): TDDXOutlineNode;
function HasAsParent(Value: TDDXOutlineNode): Boolean;
function InsertNode(Index: LongInt; Value: TDDXOutlineNode): LongInt;
procedure Remove(Value: TDDXOutlineNode);
procedure WriteNode(Buffer: PChar; Stream: TStream);
procedure ChangeExpandedCount(Value: LongInt);
function TDDXOutlineNode.GetBmpHandle: HBitmap;
begin
Result := FBmpHandle
end;
procedure Clear;
procedure CloseNode;
procedure Error(ErrorStringID: Word);
function GetExpandedNodeCount: LongInt;
function GetFullPath: string;
function GetIndex: LongInt;
function GetLastIndex: LongInt;
function GetLevel: Cardinal;
function GetList: TList;
function GetMaxDisplayWidth(Value: Cardinal): Cardinal;
function GetNode(Index: LongInt): TDDXOutlineNode;
function GetText: string;
function GetBmpHandle : HBitmap;
function GetTopItem: Longint;
function GetVisibleParent: TDDXOutlineNode;
function HasChildren: Boolean;
function HasVisibleParent: Boolean;
procedure ReIndex(StartNode, EndNode: TDDXOutlineNode; NewIndex: LongInt;
IncludeStart: Boolean);
procedure Repaint;
function Resync(var NewIndex: LongInt; EndNode: TDDXOutlineNode): Boolean;
procedure SetBmpHandle(theBmpHandle : HBitmap);
procedure SetExpandedState(Value: Boolean);
procedure SetGoodIndex;
procedure SetHorzScrollBar;
Node.FBmp.Free;
procedure SetLevel(Level: Cardinal);
procedure SetText(const Value: string);
property BitmapHandle : HBitmap
property Data : Pointer
property Expanded : Boolean
property FullPath : string
property HasItems : Boolean
property Index : LongInt
property IsVisible : Boolean
property Level : Cardinal
property Parent : TDDXOutlineNode
property Text : string
property TopItem : Longint
property ExpandCount : LongInt
property Items : TDDXOutlineNode
property List : TList
property Outline : TDDXCustomOutline
FBmpHandle : HBitmap;
FData : Pointer;
FExpandCount : LongInt;
FIndex : LongInt;
FList : TList;
FOutline : TDDXCustomOutline;
FParent : TDDXOutlineNode;
FState : Boolean;
FText : PString;