diff options
author | Andrew Haines <andrewd207@aol.com> | 2015-02-01 23:17:27 -0500 |
---|---|---|
committer | Andrew Haines <andrewd207@aol.com> | 2015-02-01 23:17:27 -0500 |
commit | d351655a167dc6afe70ed659561ef8b3a4019305 (patch) | |
tree | 3843e8f137929b13a74ba787ec6f9f5541fc2427 /src/gui/fpg_tree.pas | |
parent | c7fc66e330b4665843e195436e7e5095de5dbdfc (diff) | |
parent | 0955cc8f881782e1565447f04a0afb774e1237aa (diff) | |
download | fpGUI-d351655a167dc6afe70ed659561ef8b3a4019305.tar.xz |
Merge branch 'develop' of https://github.com/graemeg/fpGUI into develop
Fixed xml conflicts of lpi's manually
Conflicts:
examples/gui/filedialog/filedialog.lpi
examples/gui/modalforms/modalforms.lpi
Diffstat (limited to 'src/gui/fpg_tree.pas')
-rw-r--r-- | src/gui/fpg_tree.pas | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/gui/fpg_tree.pas b/src/gui/fpg_tree.pas index 5e1008c2..6c929b5e 100644 --- a/src/gui/fpg_tree.pas +++ b/src/gui/fpg_tree.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2011 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -84,7 +84,6 @@ type FText: TfpgString; FTextColor: TfpgColor; FHasChildren: Boolean; - FTree: TfpgTreeView; procedure SetCollapsed(const AValue: boolean); procedure SetInactSelColor(const AValue: TfpgColor); procedure SetInactSelTextColor(const AValue: TfpgColor); @@ -97,8 +96,11 @@ type procedure SetHasChildren(const AValue: Boolean); procedure DoTreeCheck(ANode: TfpgTreeNode); procedure SetStateImageIndex(const AValue: integer); + protected + FTree: TfpgTreeView; public - constructor Create; + constructor Create; overload; + constructor Create(ATreeView: TfpgTreeView; AText: TfpgString); overload; destructor Destroy; override; // node related function AppendText(AText: TfpgString): TfpgTreeNode; @@ -133,6 +135,7 @@ type property Parent: TfpgTreeNode read FParent write SetParent; property Prev: TfpgTreeNode read FPrev write FPrev; property Text: TfpgString read FText write SetText; + property TreeView: TfpgTreeView read FTree; { determines the + or - image in the treeview } property HasChildren: Boolean read FHasChildren write SetHasChildren; // color settings @@ -264,8 +267,10 @@ type property TreeLineColor: TfpgColor read FTreeLineColor write SetTreeLineColor default clShadow1; property TreeLineStyle: TfpgLineStyle read FTreeLineStyle write SetTreeLineStyle default lsDot; property OnChange: TNotifyEvent read FOnChange write FOnChange; - property OnExpand: TfpgTreeExpandEvent read FOnExpand write FOnExpand; property OnDoubleClick; + property OnExpand: TfpgTreeExpandEvent read FOnExpand write FOnExpand; + property OnKeyChar; + property OnKeyPress; property OnShowHint; property OnStateImageClicked: TfpgStateImageClickedEvent read FOnStateImageClicked write FOnStateImageClicked; end; @@ -394,7 +399,8 @@ begin FData := nil; FFirstSubNode := nil; FLastSubNode := nil; - FText := ''; + FText := ''; + FTree := nil; FImageIndex := -1; FStateImageIndex := -1; FCollapsed := True; @@ -411,6 +417,13 @@ begin FInactSelTextColor := clUnset; end; +constructor TfpgTreeNode.Create(ATreeView: TfpgTreeView; AText: TfpgString); +begin + Create; + FText := AText; + FTree := ATreeView; +end; + destructor TfpgTreeNode.Destroy; begin if FParent <> nil then |