/[projects]/dao/DelphiScanner/Components/tpsystools_4.04/source/StNVTree.pas
ViewVC logotype

Contents of /dao/DelphiScanner/Components/tpsystools_4.04/source/StNVTree.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2671 - (show annotations) (download)
Tue Aug 25 18:15:15 2015 UTC (8 years, 9 months ago) by torben
File size: 3783 byte(s)
Added tpsystools component
1 // Upgraded to Delphi 2009: Sebastian Zierer
2
3 (* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * The Original Code is TurboPower SysTools
17 *
18 * The Initial Developer of the Original Code is
19 * TurboPower Software
20 *
21 * Portions created by the Initial Developer are Copyright (C) 1996-2002
22 * the Initial Developer. All Rights Reserved.
23 *
24 * Contributor(s):
25 *
26 * ***** END LICENSE BLOCK ***** *)
27
28 {*********************************************************}
29 {* SysTools: StNVTree.pas 4.04 *}
30 {*********************************************************}
31 {* SysTools: non visual component for TStTree *}
32 {*********************************************************}
33
34 {$I StDefine.inc}
35
36 unit StNVTree;
37
38 interface
39
40 uses
41 Windows,
42 Classes,
43 StBase, StTree, StNVCont;
44
45 type
46 TStNVTree = class(TStNVContainerBase)
47 {.Z+}
48 protected {private}
49 {property variables}
50 FContainer : TStTree; {instance of the container}
51
52 protected
53 function GetOnCompare : TStCompareEvent;
54 override;
55 function GetOnDisposeData : TStDisposeDataEvent;
56 override;
57 function GetOnLoadData : TStLoadDataEvent;
58 override;
59 function GetOnStoreData : TStStoreDataEvent;
60 override;
61 procedure SetOnCompare(Value : TStCompareEvent);
62 override;
63 procedure SetOnDisposeData(Value : TStDisposeDataEvent);
64 override;
65 procedure SetOnLoadData(Value : TStLoadDataEvent);
66 override;
67 procedure SetOnStoreData(Value : TStStoreDataEvent);
68 override;
69
70 public
71 constructor Create(AOwner : TComponent);
72 override;
73 destructor Destroy;
74 override;
75 {.Z-}
76
77 property Container : TStTree
78 read FContainer;
79
80 published
81 property OnCompare;
82 property OnDisposeData;
83 property OnLoadData;
84 property OnStoreData;
85 end;
86
87
88 implementation
89
90 {*** TStNVTree ***}
91
92 constructor TStNVTree.Create(AOwner : TComponent);
93 begin
94 inherited Create(AOwner);
95
96 {defaults}
97
98 if Classes.GetClass(TStTree.ClassName) = nil then
99 RegisterClass(TStTree);
100 if Classes.GetClass(TStTreeNode.ClassName) = nil then
101 RegisterClass(TStTreeNode);
102
103 FContainer := TStTree.Create(TStTreeNode);
104 end;
105
106 destructor TStNVTree.Destroy;
107 begin
108 FContainer.Free;
109 FContainer := nil;
110
111 inherited Destroy;
112 end;
113
114 function TStNVTree.GetOnCompare : TStCompareEvent;
115 begin
116 Result := FContainer.OnCompare;
117 end;
118
119 function TStNVTree.GetOnDisposeData : TStDisposeDataEvent;
120 begin
121 Result := FContainer.OnDisposeData;
122 end;
123
124 function TStNVTree.GetOnLoadData : TStLoadDataEvent;
125 begin
126 Result := FContainer.OnLoadData;
127 end;
128
129 function TStNVTree.GetOnStoreData : TStStoreDataEvent;
130 begin
131 Result := FContainer.OnStoreData;
132 end;
133
134 procedure TStNVTree.SetOnCompare(Value : TStCompareEvent);
135 begin
136 FContainer.OnCompare := Value;
137 end;
138
139 procedure TStNVTree.SetOnDisposeData(Value : TStDisposeDataEvent);
140 begin
141 FContainer.OnDisposeData := Value;
142 end;
143
144 procedure TStNVTree.SetOnLoadData(Value : TStLoadDataEvent);
145 begin
146 FContainer.OnLoadData := Value;
147 end;
148
149 procedure TStNVTree.SetOnStoreData(Value : TStStoreDataEvent);
150 begin
151 FContainer.OnStoreData := Value;
152 end;
153
154
155
156 end.

  ViewVC Help
Powered by ViewVC 1.1.20