2 {*****************************************************************************}
4 { Tnt Delphi Unicode Controls }
5 { http://www.tntware.com/delphicontrols/unicode/ }
8 { Copyright (c) 2002-2007, Troy Wolbrink (troy.wolbrink@tntware.com) }
10 {*****************************************************************************}
14 {$INCLUDE TntCompilers.inc}
19 Classes
, TntActnList
, ListActns
;
22 {TNT-WARN TCustomListAction}
23 TTntCustomListAction
= class(TCustomListAction
{TNT-ALLOW TCustomListAction}, ITntAction
)
25 function GetCaption
: WideString
;
26 procedure SetCaption(const Value
: WideString
);
27 function GetHint
: WideString
;
28 procedure SetHint(const Value
: WideString
);
30 procedure DefineProperties(Filer
: TFiler
); override;
32 procedure Assign(Source
: TPersistent
); override;
34 property Caption
: WideString read GetCaption write SetCaption
;
35 property Hint
: WideString read GetHint write SetHint
;
38 {TNT-WARN TStaticListAction}
39 TTntStaticListAction
= class(TStaticListAction
{TNT-ALLOW TStaticListAction}, ITntAction
)
41 function GetCaption
: WideString
;
42 procedure SetCaption(const Value
: WideString
);
43 function GetHint
: WideString
;
44 procedure SetHint(const Value
: WideString
);
46 procedure DefineProperties(Filer
: TFiler
); override;
48 procedure Assign(Source
: TPersistent
); override;
50 property Caption
: WideString read GetCaption write SetCaption
;
51 property Hint
: WideString read GetHint write SetHint
;
54 {TNT-WARN TVirtualListAction}
55 TTntVirtualListAction
= class(TVirtualListAction
{TNT-ALLOW TVirtualListAction}, ITntAction
)
57 function GetCaption
: WideString
;
58 procedure SetCaption(const Value
: WideString
);
59 function GetHint
: WideString
;
60 procedure SetHint(const Value
: WideString
);
62 procedure DefineProperties(Filer
: TFiler
); override;
64 procedure Assign(Source
: TPersistent
); override;
66 property Caption
: WideString read GetCaption write SetCaption
;
67 property Hint
: WideString read GetHint write SetHint
;
77 type TAccessCustomListAction
= class(TCustomListAction
);
79 procedure TntListActn_AfterInherited_Assign(Action
: TCustomAction
{TNT-ALLOW TCustomAction}; Source
: TPersistent
);
81 TntAction_AfterInherited_Assign(Action
, Source
);
83 if (Action
is TCustomListAction
) and (Source
is TCustomListAction
) then begin
84 TAccessCustomListAction(Action
).Images
:= TAccessCustomListAction(Source
).Images
;
85 TAccessCustomListAction(Action
).OnGetItemCount
:= TAccessCustomListAction(Source
).OnGetItemCount
;
86 TAccessCustomListAction(Action
).OnItemSelected
:= TAccessCustomListAction(Source
).OnItemSelected
;
87 TAccessCustomListAction(Action
).Active
:= TAccessCustomListAction(Source
).Active
;
88 TAccessCustomListAction(Action
).ItemIndex
:= TAccessCustomListAction(Source
).ItemIndex
;
91 if (Action
is TStaticListAction
) and (Source
is TStaticListAction
) then begin
92 TStaticListAction(Action
).Items
:= TStaticListAction(Source
).Items
;
93 TStaticListAction(Action
).OnGetItem
:= TStaticListAction(Source
).OnGetItem
;
96 if (Action
is TVirtualListAction
) and (Source
is TVirtualListAction
) then begin
97 TVirtualListAction(Action
).OnGetItem
:= TVirtualListAction(Source
).OnGetItem
;
101 //-------------------------
103 //-------------------------
105 { TTntCustomListAction }
107 procedure TTntCustomListAction
.Assign(Source
: TPersistent
);
110 TntListActn_AfterInherited_Assign(Self
, Source
);
113 procedure TTntCustomListAction
.DefineProperties(Filer
: TFiler
);
116 TntPersistent_AfterInherited_DefineProperties(Filer
, Self
);
119 function TTntCustomListAction
.GetCaption
: WideString
;
121 Result
:= TntAction_GetCaption(Self
);
124 procedure TTntCustomListAction
.SetCaption(const Value
: WideString
);
126 TntAction_SetCaption(Self
, Value
);
129 function TTntCustomListAction
.GetHint
: WideString
;
131 Result
:= TntAction_GetHint(Self
);
134 procedure TTntCustomListAction
.SetHint(const Value
: WideString
);
136 TntAction_SetHint(Self
, Value
);
139 { TTntStaticListAction }
141 procedure TTntStaticListAction
.Assign(Source
: TPersistent
);
144 TntListActn_AfterInherited_Assign(Self
, Source
);
147 procedure TTntStaticListAction
.DefineProperties(Filer
: TFiler
);
150 TntPersistent_AfterInherited_DefineProperties(Filer
, Self
);
153 function TTntStaticListAction
.GetCaption
: WideString
;
155 Result
:= TntAction_GetCaption(Self
);
158 procedure TTntStaticListAction
.SetCaption(const Value
: WideString
);
160 TntAction_SetCaption(Self
, Value
);
163 function TTntStaticListAction
.GetHint
: WideString
;
165 Result
:= TntAction_GetHint(Self
);
168 procedure TTntStaticListAction
.SetHint(const Value
: WideString
);
170 TntAction_SetHint(Self
, Value
);
173 { TTntVirtualListAction }
175 procedure TTntVirtualListAction
.Assign(Source
: TPersistent
);
178 TntListActn_AfterInherited_Assign(Self
, Source
);
181 procedure TTntVirtualListAction
.DefineProperties(Filer
: TFiler
);
184 TntPersistent_AfterInherited_DefineProperties(Filer
, Self
);
187 function TTntVirtualListAction
.GetCaption
: WideString
;
189 Result
:= TntAction_GetCaption(Self
);
192 procedure TTntVirtualListAction
.SetCaption(const Value
: WideString
);
194 TntAction_SetCaption(Self
, Value
);
197 function TTntVirtualListAction
.GetHint
: WideString
;
199 Result
:= TntAction_GetHint(Self
);
202 procedure TTntVirtualListAction
.SetHint(const Value
: WideString
);
204 TntAction_SetHint(Self
, Value
);