1 | unit ORCtrlsVA508Compatibility;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Forms, Controls, StdCtrls, SysUtils, Windows, VA508AccessibilityManager;
|
---|
7 |
|
---|
8 | type
|
---|
9 | TORCheckBox508Manager = class(TVA508ManagedComponentClass)
|
---|
10 | public
|
---|
11 | constructor Create; override;
|
---|
12 | function GetComponentName(Component: TWinControl): string; override;
|
---|
13 | function GetInstructions(Component: TWinControl): string; override;
|
---|
14 | function GetState(Component: TWinControl): string; override;
|
---|
15 | end;
|
---|
16 |
|
---|
17 | TLBMgr = class
|
---|
18 | private
|
---|
19 | function GetIdx(Component: TWinControl): integer;
|
---|
20 | public
|
---|
21 | function GetComponentName(Component: TWinControl): string; virtual; abstract;
|
---|
22 | function GetState(Component: TWinControl): string; virtual; abstract;
|
---|
23 | function GetItemInstructions(Component: TWinControl): string; virtual; abstract;
|
---|
24 | end;
|
---|
25 |
|
---|
26 | TORListBox508Manager = class(TVA508ManagedComponentClass)
|
---|
27 | var
|
---|
28 | FCheckBoxes: TLBMgr;
|
---|
29 | FMultiSelect: TLBMgr;
|
---|
30 | FStandard: TLBMgr;
|
---|
31 | FCurrent: TLBMgr;
|
---|
32 | function GetCurrent(Component: TWinControl): TLBMgr;
|
---|
33 | public
|
---|
34 | constructor Create; override;
|
---|
35 | destructor Destroy; override;
|
---|
36 | function GetComponentName(Component: TWinControl): string; override;
|
---|
37 | function GetState(Component: TWinControl): string; override;
|
---|
38 | function GetItem(Component: TWinControl): TObject; override;
|
---|
39 | function GetItemInstructions(Component: TWinControl): string; override;
|
---|
40 | function GetValue(Component: TWinControl): string; override;
|
---|
41 | end;
|
---|
42 |
|
---|
43 | TVA508TORDateComboComplexManager = class(TVA508ComplexComponentManager)
|
---|
44 | public
|
---|
45 | constructor Create;
|
---|
46 | procedure Refresh(Component: TWinControl;
|
---|
47 | AccessibilityManager: TVA508AccessibilityManager); override;
|
---|
48 | end;
|
---|
49 |
|
---|
50 | // TVA508TORComboBoxComplexManager = class(TVA508ComplexComponentManager)
|
---|
51 | // public
|
---|
52 | // constructor Create;
|
---|
53 | // procedure Refresh(Component: TWinControl;
|
---|
54 | // AccessibilityManager: TVA508AccessibilityManager); override;
|
---|
55 | // end;
|
---|
56 |
|
---|
57 | { TVA508TORDateBoxComplexManager = class(TVA508ComplexComponentManager)
|
---|
58 | public
|
---|
59 | constructor Create;
|
---|
60 | procedure Refresh(Component: TWinControl;
|
---|
61 | AccessibilityManager: TVA508AccessibilityManager); override;
|
---|
62 | end;}
|
---|
63 |
|
---|
64 | TORComboBox508Manager = class(TVA508ManagedComponentClass)
|
---|
65 | public
|
---|
66 | constructor Create; override;
|
---|
67 | function GetValue(Component: TWinControl): string; override;
|
---|
68 | end;
|
---|
69 |
|
---|
70 | TORDayCombo508Manager = class(TORComboBox508Manager)
|
---|
71 | public
|
---|
72 | constructor Create; override;
|
---|
73 | function GetCaption(Component: TWinControl): string; override;
|
---|
74 | end;
|
---|
75 |
|
---|
76 | TORMonthCombo508Manager = class(TORComboBox508Manager)
|
---|
77 | public
|
---|
78 | constructor Create; override;
|
---|
79 | function GetCaption(Component: TWinControl): string; override;
|
---|
80 | end;
|
---|
81 |
|
---|
82 | TORYearEdit508Manager = class(TVA508ManagedComponentClass)
|
---|
83 | public
|
---|
84 | constructor Create; override;
|
---|
85 | function GetCaption(Component: TWinControl): string; override;
|
---|
86 | end;
|
---|
87 |
|
---|
88 | TORDateButton508Manager = class(TVA508ManagedComponentClass)
|
---|
89 | public
|
---|
90 | constructor Create; override;
|
---|
91 | function GetCaption(Component: TWinControl): string; override;
|
---|
92 | end;
|
---|
93 |
|
---|
94 | // TORComboEdit508Manager = class(TVA508ManagedComponentClass)
|
---|
95 | // public
|
---|
96 | // constructor Create; override;
|
---|
97 | // function Redirect(Component: TWinControl; var ManagedType: TManagedType): TWinControl; override;
|
---|
98 | // end;
|
---|
99 |
|
---|
100 | implementation
|
---|
101 |
|
---|
102 | uses VA508DelphiCompatibility, ORCtrls, ORDtTm, VA508AccessibilityRouter,
|
---|
103 | VA508AccessibilityConst, ORDtTmRng;
|
---|
104 |
|
---|
105 | function GetEditBox(ComboBox: TORComboBox): TORComboEdit;
|
---|
106 | var
|
---|
107 | i: integer;
|
---|
108 |
|
---|
109 | begin
|
---|
110 | Result := nil;
|
---|
111 | for i := 0 to ComboBox.ControlCount - 1 do
|
---|
112 | begin
|
---|
113 | if ComboBox.Controls[i] is TORComboEdit then
|
---|
114 | begin
|
---|
115 | Result := TORComboEdit(ComboBox.Controls[i]);
|
---|
116 | exit;
|
---|
117 | end;
|
---|
118 | end;
|
---|
119 | end;
|
---|
120 |
|
---|
121 | function ORComboBoxAlternateHandle(Component: TWinControl): HWnd;
|
---|
122 | var
|
---|
123 | eBox: TORComboEdit;
|
---|
124 | cBox: TORComboBox;
|
---|
125 |
|
---|
126 | begin
|
---|
127 | cBox := TORComboBox(Component);
|
---|
128 | eBox := GetEditBox(cBox);
|
---|
129 | if assigned(eBox) then
|
---|
130 | Result := eBox.Handle
|
---|
131 | else
|
---|
132 | Result := cBox.Handle;
|
---|
133 | end;
|
---|
134 |
|
---|
135 | type
|
---|
136 | TVA508RegistrationScreenReader = class(TVA508ScreenReader);
|
---|
137 | { Registration }
|
---|
138 |
|
---|
139 | procedure RegisterORComponents;
|
---|
140 | begin
|
---|
141 | RegisterAlternateHandleComponent(TORComboBox, ORComboBoxAlternateHandle);
|
---|
142 |
|
---|
143 | RegisterManagedComponentClass(TORCheckBox508Manager.Create);
|
---|
144 | RegisterManagedComponentClass(TORComboBox508Manager.Create);
|
---|
145 | RegisterManagedComponentClass(TORListBox508Manager.Create);
|
---|
146 | RegisterManagedComponentClass(TORDayCombo508Manager.Create);
|
---|
147 | RegisterManagedComponentClass(TORMonthCombo508Manager.Create);
|
---|
148 | RegisterManagedComponentClass(TORYearEdit508Manager.Create);
|
---|
149 | RegisterManagedComponentClass(TORDateButton508Manager.Create);
|
---|
150 | // RegisterManagedComponentClass(TORComboEdit508Manager.Create);
|
---|
151 |
|
---|
152 | RegisterComplexComponentManager(TVA508TORDateComboComplexManager.Create);
|
---|
153 | // RegisterComplexComponentManager(TVA508TORComboBoxComplexManager.Create);
|
---|
154 | // RegisterComplexComponentManager(TVA508TORDateBoxComplexManager.Create);
|
---|
155 |
|
---|
156 |
|
---|
157 | with TVA508RegistrationScreenReader(GetScreenReader) do
|
---|
158 | begin
|
---|
159 | //---TORCalendar ???
|
---|
160 | //---TORPopupMenu ???
|
---|
161 | //---TORMenuItem ???
|
---|
162 |
|
---|
163 | RegisterCustomClassBehavior(TORTreeView.ClassName, CLASS_BEHAVIOR_TREE_VIEW);
|
---|
164 | RegisterCustomClassBehavior(TORAlignEdit.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
165 | RegisterCustomClassBehavior(TORAlignButton.ClassName, CLASS_BEHAVIOR_BUTTON);
|
---|
166 | RegisterCustomClassBehavior(TORAlignSpeedButton.ClassName, CLASS_BEHAVIOR_BUTTON);
|
---|
167 | RegisterCustomClassBehavior(TORCheckBox.ClassName, CLASS_BEHAVIOR_CHECK_BOX);
|
---|
168 | RegisterCustomClassBehavior(TKeyClickPanel.ClassName, CLASS_BEHAVIOR_BUTTON);
|
---|
169 | RegisterCustomClassBehavior(TKeyClickRadioGroup.ClassName, CLASS_BEHAVIOR_GROUP_BOX);
|
---|
170 | RegisterCustomClassBehavior(TCaptionTreeView.ClassName, CLASS_BEHAVIOR_TREE_VIEW);
|
---|
171 | RegisterCustomClassBehavior(TCaptionMemo.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
172 | RegisterCustomClassBehavior(TCaptionEdit.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
173 | RegisterCustomClassBehavior(TCaptionRichEdit.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
174 | RegisterCustomClassBehavior(TOROffsetLabel.ClassName, CLASS_BEHAVIOR_STATIC_TEXT);
|
---|
175 |
|
---|
176 | RegisterCustomClassBehavior(TCaptionComboBox.ClassName, CLASS_BEHAVIOR_COMBO_BOX);
|
---|
177 | RegisterCustomClassBehavior(TORComboEdit.ClassName, CLASS_BEHAVIOR_EDIT_COMBO);
|
---|
178 | RegisterCustomClassBehavior(TORComboBox.ClassName, CLASS_BEHAVIOR_COMBO_BOX);
|
---|
179 | RegisterCustomClassBehavior(TORListBox.ClassName, CLASS_BEHAVIOR_LIST_BOX);
|
---|
180 | RegisterCustomClassBehavior(TCaptionCheckListBox.ClassName, CLASS_BEHAVIOR_LIST_BOX);
|
---|
181 | RegisterCustomClassBehavior(TCaptionStringGrid.ClassName, CLASS_BEHAVIOR_LIST_BOX);
|
---|
182 |
|
---|
183 | RegisterCustomClassBehavior(TORDateEdit.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
184 | RegisterCustomClassBehavior(TORDayCombo.ClassName, CLASS_BEHAVIOR_COMBO_BOX);
|
---|
185 | RegisterCustomClassBehavior(TORMonthCombo.ClassName, CLASS_BEHAVIOR_COMBO_BOX);
|
---|
186 | RegisterCustomClassBehavior(TORYearEdit.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
187 | RegisterCustomClassBehavior(TORDateBox.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
188 | RegisterCustomClassBehavior(TORDateCombo.ClassName, CLASS_BEHAVIOR_GROUP_BOX);
|
---|
189 |
|
---|
190 | RegisterCustomClassBehavior(TORListView.ClassName, CLASS_BEHAVIOR_LIST_VIEW);
|
---|
191 | RegisterCustomClassBehavior(TCaptionListView.ClassName, CLASS_BEHAVIOR_LIST_VIEW);
|
---|
192 | RegisterCustomClassBehavior(TCaptionListBox.ClassName, CLASS_BEHAVIOR_LIST_BOX);
|
---|
193 |
|
---|
194 | RegisterCustomClassBehavior(TORDateRangeDlg.ClassName, CLASS_BEHAVIOR_DIALOG);
|
---|
195 | RegisterCustomClassBehavior(TORfrmDtTm.ClassName, CLASS_BEHAVIOR_DIALOG);//called by TORDateTimeDlg
|
---|
196 | end;
|
---|
197 | end;
|
---|
198 |
|
---|
199 | { TORCheckBox508Manager }
|
---|
200 |
|
---|
201 | constructor TORCheckBox508Manager.Create;
|
---|
202 | begin
|
---|
203 | inherited Create(TORCheckBox, [mtComponentName, mtInstructions, mtState, mtStateChange], TRUE);
|
---|
204 | end;
|
---|
205 |
|
---|
206 | function TORCheckBox508Manager.GetComponentName(Component: TWinControl): string;
|
---|
207 | begin
|
---|
208 | with TORCheckBox(Component) do
|
---|
209 | begin
|
---|
210 | if RadioStyle then
|
---|
211 | Result := 'radio button'
|
---|
212 | else
|
---|
213 | Result := VA508DelphiCompatibility.GetCheckBoxComponentName(AllowGrayed);
|
---|
214 | end;
|
---|
215 | end;
|
---|
216 |
|
---|
217 | function TORCheckBox508Manager.GetInstructions(Component: TWinControl): string;
|
---|
218 | begin
|
---|
219 | Result := VA508DelphiCompatibility.GetCheckBoxInstructionMessage(TORCheckBox(Component).Checked);
|
---|
220 | end;
|
---|
221 |
|
---|
222 | function TORCheckBox508Manager.GetState(Component: TWinControl): string;
|
---|
223 | var
|
---|
224 | cb: TORCheckBox;
|
---|
225 | begin
|
---|
226 | Application.ProcessMessages; // <<< needed to allow messages that set state to process
|
---|
227 | Result := '';
|
---|
228 | cb := TORCheckBox(Component);
|
---|
229 | if (cb.State = cbGrayed) and (cb.GrayedStyle in [gsQuestionMark, gsBlueQuestionMark]) then
|
---|
230 | Result := 'Question Mark'
|
---|
231 | else
|
---|
232 | Result := VA508DelphiCompatibility.GetCheckBoxStateText(cb.State);
|
---|
233 | end;
|
---|
234 |
|
---|
235 | { TORListBox508Manager }
|
---|
236 |
|
---|
237 | type
|
---|
238 | TORListBoxCheckBoxes508Manager = class(TLBMgr)
|
---|
239 | public
|
---|
240 | function GetComponentName(Component: TWinControl): string; override;
|
---|
241 | function GetState(Component: TWinControl): string; override;
|
---|
242 | function GetItemInstructions(Component: TWinControl): string; override;
|
---|
243 | end;
|
---|
244 |
|
---|
245 | TORListBoxMultiSelect508Manager = class(TLBMgr)
|
---|
246 | public
|
---|
247 | function GetComponentName(Component: TWinControl): string; override;
|
---|
248 | function GetState(Component: TWinControl): string; override;
|
---|
249 | function GetItemInstructions(Component: TWinControl): string; override;
|
---|
250 | end;
|
---|
251 |
|
---|
252 | TORListBoxStandard508Manager = class(TLBMgr)
|
---|
253 | public
|
---|
254 | function GetComponentName(Component: TWinControl): string; override;
|
---|
255 | function GetState(Component: TWinControl): string; override;
|
---|
256 | function GetItemInstructions(Component: TWinControl): string; override;
|
---|
257 | end;
|
---|
258 |
|
---|
259 | constructor TORListBox508Manager.Create;
|
---|
260 | begin
|
---|
261 | inherited Create(TORListBox, [mtComponentName, mtValue, mtState, mtStateChange,
|
---|
262 | mtItemChange, mtItemInstructions]);
|
---|
263 | end;
|
---|
264 |
|
---|
265 | destructor TORListBox508Manager.Destroy;
|
---|
266 | begin
|
---|
267 | FCurrent := nil;
|
---|
268 | if assigned(FCheckBoxes) then
|
---|
269 | FreeAndNil(FCheckBoxes);
|
---|
270 | if assigned(FMultiSelect) then
|
---|
271 | FreeAndNil(FMultiSelect);
|
---|
272 | if assigned(FStandard) then
|
---|
273 | FreeAndNil(FStandard);
|
---|
274 | inherited;
|
---|
275 | end;
|
---|
276 |
|
---|
277 | function TORListBox508Manager.GetComponentName(Component: TWinControl): string;
|
---|
278 | begin
|
---|
279 | Result := GetCurrent(Component).GetComponentName(Component);
|
---|
280 | end;
|
---|
281 |
|
---|
282 | function TORListBox508Manager.GetItem(Component: TWinControl): TObject;
|
---|
283 | var
|
---|
284 | lb : TORListBox;
|
---|
285 | max, id: integer;
|
---|
286 | begin
|
---|
287 | GetCurrent(Component);
|
---|
288 | lb := TORListBox(Component);
|
---|
289 | max := lb.items.Count + 2;
|
---|
290 | if max < 10000 then
|
---|
291 | max := 10000;
|
---|
292 | id := (lb.items.Count * max) + (lb.FocusIndex + 2);
|
---|
293 | if lb.FocusIndex < 0 then dec(id);
|
---|
294 | Result := TObject(id);
|
---|
295 | end;
|
---|
296 |
|
---|
297 | function TORListBox508Manager.GetItemInstructions(
|
---|
298 | Component: TWinControl): string;
|
---|
299 | begin
|
---|
300 | Result := GetCurrent(Component).GetItemInstructions(Component);
|
---|
301 | end;
|
---|
302 |
|
---|
303 | function TORListBox508Manager.GetState(Component: TWinControl): string;
|
---|
304 | begin
|
---|
305 | Result := GetCurrent(Component).GetState(Component);
|
---|
306 | end;
|
---|
307 |
|
---|
308 | function TORListBox508Manager.GetValue(Component: TWinControl): string;
|
---|
309 | var idx: integer;
|
---|
310 | lb: TORListBox;
|
---|
311 | begin
|
---|
312 | lb := TORListBox(Component);
|
---|
313 | idx := lb.FocusIndex;
|
---|
314 | if idx < 0 then
|
---|
315 | idx := 0;
|
---|
316 | Result := lb.DisplayText[idx];
|
---|
317 | end;
|
---|
318 |
|
---|
319 | function TORListBox508Manager.GetCurrent(Component: TWinControl): TLBMgr;
|
---|
320 | var
|
---|
321 | lb : TORListBox;
|
---|
322 |
|
---|
323 | begin
|
---|
324 | lb := TORListBox(Component);
|
---|
325 | if lb.CheckBoxes then
|
---|
326 | begin
|
---|
327 | if not assigned(FCheckBoxes) then
|
---|
328 | FCheckBoxes := TORListBoxCheckBoxes508Manager.Create;
|
---|
329 | FCurrent := FCheckBoxes;
|
---|
330 | end
|
---|
331 | else if lb.MultiSelect then
|
---|
332 | begin
|
---|
333 | if not assigned(FMultiSelect) then
|
---|
334 | FMultiSelect := TORListBoxMultiSelect508Manager.Create;
|
---|
335 | FCurrent := FMultiSelect;
|
---|
336 | end
|
---|
337 | else
|
---|
338 | begin
|
---|
339 | if not assigned(FStandard) then
|
---|
340 | FStandard := TORListBoxStandard508Manager.Create;
|
---|
341 | FCurrent := FStandard;
|
---|
342 | end;
|
---|
343 | Result := FCurrent;
|
---|
344 | end;
|
---|
345 |
|
---|
346 | { TORListBoxCheckBoxes508Manager }
|
---|
347 |
|
---|
348 | function TORListBoxCheckBoxes508Manager.GetComponentName(
|
---|
349 | Component: TWinControl): string;
|
---|
350 | begin
|
---|
351 | Result := 'Check List Box'
|
---|
352 | end;
|
---|
353 |
|
---|
354 | function TORListBoxCheckBoxes508Manager.GetItemInstructions(
|
---|
355 | Component: TWinControl): string;
|
---|
356 | var
|
---|
357 | lb: TORListBox;
|
---|
358 | idx: integer;
|
---|
359 | begin
|
---|
360 | Result := '';
|
---|
361 | lb := TORListBox(Component);
|
---|
362 | idx := GetIdx(Component);
|
---|
363 | if (idx >= 0) then
|
---|
364 | Result := VA508DelphiCompatibility.GetCheckBoxInstructionMessage(lb.Checked[idx])
|
---|
365 | else
|
---|
366 | Result := '';
|
---|
367 | end;
|
---|
368 |
|
---|
369 | function TORListBoxCheckBoxes508Manager.GetState(
|
---|
370 | Component: TWinControl): string;
|
---|
371 | var
|
---|
372 | lb: TORListBox;
|
---|
373 | idx: integer;
|
---|
374 | begin
|
---|
375 | lb := TORListBox(Component);
|
---|
376 | idx := GetIdx(Component);
|
---|
377 | if (idx >= 0) then
|
---|
378 | begin
|
---|
379 | Result := GetCheckBoxStateText(lb.CheckedState[idx]);
|
---|
380 | if lb.FocusIndex < 0 then
|
---|
381 | Result := 'not selected ' + Result;
|
---|
382 | end
|
---|
383 | else
|
---|
384 | Result := '';
|
---|
385 | end;
|
---|
386 |
|
---|
387 | { TORListBoxMultiSelect508Manager }
|
---|
388 |
|
---|
389 | function TORListBoxMultiSelect508Manager.GetComponentName(
|
---|
390 | Component: TWinControl): string;
|
---|
391 | begin
|
---|
392 | Result := 'Multi Select List Box'
|
---|
393 | end;
|
---|
394 |
|
---|
395 | function TORListBoxMultiSelect508Manager.GetItemInstructions(
|
---|
396 | Component: TWinControl): string;
|
---|
397 | var
|
---|
398 | lb: TORListBox;
|
---|
399 | idx: integer;
|
---|
400 | begin
|
---|
401 | Result := '';
|
---|
402 | lb := TORListBox(Component);
|
---|
403 | idx := GetIdx(Component);
|
---|
404 | if (idx >= 0) then
|
---|
405 | begin
|
---|
406 | if not lb.Selected[idx] then
|
---|
407 | Result := 'to select press space bar'
|
---|
408 | else
|
---|
409 | Result := 'to un select press space bar';
|
---|
410 | end;
|
---|
411 | end;
|
---|
412 |
|
---|
413 | function TORListBoxMultiSelect508Manager.GetState(
|
---|
414 | Component: TWinControl): string;
|
---|
415 | var
|
---|
416 | lb: TORListBox;
|
---|
417 | idx: Integer;
|
---|
418 | begin
|
---|
419 | lb := TORListBox(Component);
|
---|
420 | idx := GetIdx(Component);
|
---|
421 | if (idx >= 0) then
|
---|
422 | begin
|
---|
423 | if lb.Selected[idx] then
|
---|
424 | Result := 'Selected'
|
---|
425 | else
|
---|
426 | Result := 'Not Selected';
|
---|
427 | end
|
---|
428 | else
|
---|
429 | Result := '';
|
---|
430 | end;
|
---|
431 |
|
---|
432 | { TORListBoxStandard508Manager }
|
---|
433 |
|
---|
434 | function TORListBoxStandard508Manager.GetComponentName(
|
---|
435 | Component: TWinControl): string;
|
---|
436 | begin
|
---|
437 | Result := 'List Box';
|
---|
438 | end;
|
---|
439 |
|
---|
440 | function TORListBoxStandard508Manager.GetItemInstructions(
|
---|
441 | Component: TWinControl): string;
|
---|
442 | begin
|
---|
443 | Result := '';
|
---|
444 | end;
|
---|
445 |
|
---|
446 | function TORListBoxStandard508Manager.GetState(Component: TWinControl): string;
|
---|
447 | var
|
---|
448 | lb: TORListBox;
|
---|
449 | begin
|
---|
450 | lb := TORListBox(Component);
|
---|
451 | if (lb.FocusIndex < 0) then
|
---|
452 | Result := 'Not Selected'
|
---|
453 | else
|
---|
454 | Result := '';
|
---|
455 | end;
|
---|
456 |
|
---|
457 | { TLBMgr }
|
---|
458 |
|
---|
459 | function TLBMgr.GetIdx(Component: TWinControl): integer;
|
---|
460 | begin
|
---|
461 | Result := TORListBox(Component).FocusIndex;
|
---|
462 | if (Result < 0) and (TORListBox(Component).Count > 0) then
|
---|
463 | Result := 0;
|
---|
464 | end;
|
---|
465 |
|
---|
466 | { TVA508TORDateComboComplexManager }
|
---|
467 |
|
---|
468 | constructor TVA508TORDateComboComplexManager.Create;
|
---|
469 | begin
|
---|
470 | inherited Create(TORDateCombo);
|
---|
471 | end;
|
---|
472 |
|
---|
473 | type
|
---|
474 | TORDateComboFriend = class(TORDateCombo);
|
---|
475 |
|
---|
476 | procedure TVA508TORDateComboComplexManager.Refresh(Component: TWinControl;
|
---|
477 | AccessibilityManager: TVA508AccessibilityManager);
|
---|
478 | begin
|
---|
479 | with TORDateComboFriend(Component) do
|
---|
480 | begin
|
---|
481 | ClearSubControls(Component);
|
---|
482 | // if assigned(CalBtn) then
|
---|
483 | // CalBtn.TabStop := TRUE;
|
---|
484 | // if IncludeBtn then
|
---|
485 | // AddSubControl(CalBtn, AccessibilityManager);
|
---|
486 | AddSubControl(Component, YearEdit, AccessibilityManager);
|
---|
487 | // AddSubControl(YearUD, AccessibilityManager);
|
---|
488 | if IncludeMonth then
|
---|
489 | AddSubControl(Component, MonthCombo, AccessibilityManager);
|
---|
490 | if IncludeDay then
|
---|
491 | AddSubControl(Component, DayCombo, AccessibilityManager);
|
---|
492 | end;
|
---|
493 | end;
|
---|
494 |
|
---|
495 | { TORDayCombo508Manager }
|
---|
496 |
|
---|
497 | constructor TORDayCombo508Manager.Create;
|
---|
498 | begin
|
---|
499 | inherited Create(TORDayCombo, [mtCaption, mtValue]);
|
---|
500 | end;
|
---|
501 |
|
---|
502 | function TORDayCombo508Manager.GetCaption(Component: TWinControl): string;
|
---|
503 | begin
|
---|
504 | Result := 'Day';
|
---|
505 | end;
|
---|
506 |
|
---|
507 | { TORMonthCombo508Manager }
|
---|
508 |
|
---|
509 | constructor TORMonthCombo508Manager.Create;
|
---|
510 | begin
|
---|
511 | inherited Create(TORMonthCombo, [mtCaption, mtValue]);
|
---|
512 | end;
|
---|
513 |
|
---|
514 | function TORMonthCombo508Manager.GetCaption(Component: TWinControl): string;
|
---|
515 | begin
|
---|
516 | Result := 'Month';
|
---|
517 | end;
|
---|
518 |
|
---|
519 | { TORYearEdit508Manager }
|
---|
520 |
|
---|
521 | constructor TORYearEdit508Manager.Create;
|
---|
522 | begin
|
---|
523 | inherited Create(TORYearEdit, [mtCaption]);
|
---|
524 | end;
|
---|
525 |
|
---|
526 | function TORYearEdit508Manager.GetCaption(Component: TWinControl): string;
|
---|
527 | begin
|
---|
528 | Result := 'Year';
|
---|
529 | end;
|
---|
530 |
|
---|
531 | { TORDateButton508Manager }
|
---|
532 |
|
---|
533 | constructor TORDateButton508Manager.Create;
|
---|
534 | begin
|
---|
535 | inherited Create(TORDateButton, [mtCaption]);
|
---|
536 | end;
|
---|
537 |
|
---|
538 | function TORDateButton508Manager.GetCaption(Component: TWinControl): string;
|
---|
539 | begin
|
---|
540 | Result := 'Date';
|
---|
541 | end;
|
---|
542 |
|
---|
543 | (*
|
---|
544 | { TVA508TORDateBoxComplexManager }
|
---|
545 |
|
---|
546 | constructor TVA508TORDateBoxComplexManager.Create;
|
---|
547 | begin
|
---|
548 | inherited Create(TORDateBox);
|
---|
549 | end;
|
---|
550 |
|
---|
551 | type
|
---|
552 | TORDateBoxFriend = class(TORDateBox);
|
---|
553 |
|
---|
554 | procedure TVA508TORDateBoxComplexManager.Refresh(Component: TWinControl;
|
---|
555 | AccessibilityManager: TVA508AccessibilityManager);
|
---|
556 | begin
|
---|
557 | with TORDateBoxFriend(Component) do
|
---|
558 | begin
|
---|
559 | ClearSubControls;
|
---|
560 | if assigned(DateButton) then
|
---|
561 | begin
|
---|
562 | DateButton.TabStop := TRUE;
|
---|
563 | AddSubControl(DateButton, AccessibilityManager);
|
---|
564 | end;
|
---|
565 | end;
|
---|
566 | end;
|
---|
567 | *)
|
---|
568 |
|
---|
569 | { TVA508ORComboManager }
|
---|
570 |
|
---|
571 | constructor TORComboBox508Manager.Create;
|
---|
572 | begin
|
---|
573 | inherited Create(TORComboBox, [mtValue], TRUE);
|
---|
574 | end;
|
---|
575 |
|
---|
576 | function TORComboBox508Manager.GetValue(Component: TWinControl): string;
|
---|
577 | begin
|
---|
578 | Result := TORComboBox(Component).Text;
|
---|
579 | end;
|
---|
580 |
|
---|
581 | { TORComboEdit508Manager }
|
---|
582 |
|
---|
583 | //constructor TORComboEdit508Manager.Create;
|
---|
584 | //begin
|
---|
585 | // inherited Create(TORComboEdit, [mtComponentRedirect]);
|
---|
586 | //end;
|
---|
587 | //
|
---|
588 | //function TORComboEdit508Manager.Redirect(Component: TWinControl;
|
---|
589 | // var ManagedType: TManagedType): TWinControl;
|
---|
590 | //begin
|
---|
591 | // ManagedType := mtCaption;
|
---|
592 | // Result := TWinControl(Component.Owner);
|
---|
593 | //end;
|
---|
594 |
|
---|
595 | { TVA508TORComboBoxComplexManager }
|
---|
596 |
|
---|
597 | //constructor TVA508TORComboBoxComplexManager.Create;
|
---|
598 | //begin
|
---|
599 | // inherited Create(TORComboBox);
|
---|
600 | //end;
|
---|
601 | //
|
---|
602 | //procedure TVA508TORComboBoxComplexManager.Refresh(Component: TWinControl;
|
---|
603 | // AccessibilityManager: TVA508AccessibilityManager);
|
---|
604 | //var
|
---|
605 | // eBox: TORComboEdit;
|
---|
606 | //begin
|
---|
607 | // begin
|
---|
608 | // ClearSubControls;
|
---|
609 | // eBox := GetEditBox(TORComboBox(Component));
|
---|
610 | // if assigned(eBox) then
|
---|
611 | // AddSubControl(eBox, AccessibilityManager);
|
---|
612 | // end;
|
---|
613 | //end;
|
---|
614 |
|
---|
615 | initialization
|
---|
616 | RegisterORComponents;
|
---|
617 |
|
---|
618 | end.
|
---|