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

Contents of /dao/DelphiScanner/Components/tpsystools_4.04/source/StNVList.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: 3782 byte(s)
Added tpsystools component
1 // Upgraded to Delphi 2009: Sebastian Zierer
2
3
4 (* ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1
6 *
7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
11 *
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 * for the specific language governing rights and limitations under the
15 * License.
16 *
17 * The Original Code is TurboPower SysTools
18 *
19 * The Initial Developer of the Original Code is
20 * TurboPower Software
21 *
22 * Portions created by the Initial Developer are Copyright (C) 1996-2002
23 * the Initial Developer. All Rights Reserved.
24 *
25 * Contributor(s):
26 *
27 * ***** END LICENSE BLOCK ***** *)
28
29 {*********************************************************}
30 {* SysTools: StNVList.pas 4.04 *}
31 {*********************************************************}
32 {* SysTools: non visual component for TStList *}
33 {*********************************************************}
34
35 {$I StDefine.inc}
36
37 unit StNVList;
38
39 interface
40
41 uses
42 Windows, Classes,
43 StBase, StList, StNVCont;
44
45 type
46 TStNVList = class(TStNVContainerBase)
47 {.Z+}
48 protected {private}
49 {property variables}
50 FContainer : TStList; {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 : TStList
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 {*** TStNVList ***}
91
92 constructor TStNVList.Create(AOwner : TComponent);
93 begin
94 inherited Create(AOwner);
95
96 {defaults}
97
98 if Classes.GetClass(TStList.ClassName) = nil then
99 RegisterClass(TStList);
100 if Classes.GetClass(TStListNode.ClassName) = nil then
101 RegisterClass(TStListNode);
102
103 FContainer := TStList.Create(TStListNode);
104 end;
105
106 destructor TStNVList.Destroy;
107 begin
108 FContainer.Free;
109 FContainer := nil;
110
111 inherited Destroy;
112 end;
113
114 function TStNVList.GetOnCompare : TStCompareEvent;
115 begin
116 Result := FContainer.OnCompare;
117 end;
118
119 function TStNVList.GetOnDisposeData : TStDisposeDataEvent;
120 begin
121 Result := FContainer.OnDisposeData;
122 end;
123
124 function TStNVList.GetOnLoadData : TStLoadDataEvent;
125 begin
126 Result := FContainer.OnLoadData;
127 end;
128
129 function TStNVList.GetOnStoreData : TStStoreDataEvent;
130 begin
131 Result := FContainer.OnStoreData;
132 end;
133
134 procedure TStNVList.SetOnCompare(Value : TStCompareEvent);
135 begin
136 FContainer.OnCompare := Value;
137 end;
138
139 procedure TStNVList.SetOnDisposeData(Value : TStDisposeDataEvent);
140 begin
141 FContainer.OnDisposeData := Value;
142 end;
143
144 procedure TStNVList.SetOnLoadData(Value : TStLoadDataEvent);
145 begin
146 FContainer.OnLoadData := Value;
147 end;
148
149 procedure TStNVList.SetOnStoreData(Value : TStStoreDataEvent);
150 begin
151 FContainer.OnStoreData := Value;
152 end;
153
154
155
156 end.

  ViewVC Help
Powered by ViewVC 1.1.20