1 | unit uVA508CPRSCompatibility;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | SysUtils, Windows, Classes, Controls, Forms, StdCtrls;
|
---|
7 |
|
---|
8 | procedure QuickCopyWith508Msg(AFrom, ATo: TObject; docType: string = '');
|
---|
9 | procedure QuickAddWith508Msg(AFrom, ATo: TObject; docType: string = '');
|
---|
10 | procedure FastAssignWith508Msg(source, destination: TStrings; docType: string = '');
|
---|
11 |
|
---|
12 | procedure SpeakTextInserted(docType: string = '');
|
---|
13 | function GetTabText: string;
|
---|
14 | procedure SpeakPatient;
|
---|
15 | procedure SpeakTabAndPatient;
|
---|
16 |
|
---|
17 | implementation
|
---|
18 |
|
---|
19 | uses VA508AccessibilityRouter, VA508AccessibilityManager, ORFn, uDlgComponents,
|
---|
20 | VA508DelphiCompatibility, ORCtrls, fReminderDialog, fTemplateDialog, fFrame,
|
---|
21 | uCore, ORCtrlsVA508Compatibility, mTemplateFieldButton, VA508AccessibilityConst;
|
---|
22 |
|
---|
23 | type
|
---|
24 | TCPRSParentDialogCheckBox508Manager = class(TORCheckBox508Manager)
|
---|
25 | public
|
---|
26 | constructor Create; override;
|
---|
27 | function GetCaption(Component: TWinControl): string; override;
|
---|
28 | end;
|
---|
29 |
|
---|
30 | TCPRSBaseDialogComponent508Manager = class(TVA508ManagedComponentClass)
|
---|
31 | public
|
---|
32 | function GetCaption(Component: TWinControl): string; override;
|
---|
33 | end;
|
---|
34 |
|
---|
35 | { TCPRSDialogStaticLabel508Manager = class(TVA508StaticTextManager)
|
---|
36 | public
|
---|
37 | constructor Create; override;
|
---|
38 | function GetCaption(Component: TWinControl): string; override;
|
---|
39 | end;
|
---|
40 | }
|
---|
41 |
|
---|
42 | TCPRSDialogEdit508Manager = class(TCPRSBaseDialogComponent508Manager)
|
---|
43 | public
|
---|
44 | constructor Create; override;
|
---|
45 | end;
|
---|
46 |
|
---|
47 | TCPRSDialogFieldComboBox508Manager = class(TCPRSBaseDialogComponent508Manager)
|
---|
48 | public
|
---|
49 | constructor Create; override;
|
---|
50 | end;
|
---|
51 |
|
---|
52 | TCPRSDialogDateBox508Manager = class(TCPRSBaseDialogComponent508Manager)
|
---|
53 | public
|
---|
54 | constructor Create; override;
|
---|
55 | end;
|
---|
56 |
|
---|
57 | TCPRSDialogCheckBox508Manager = class(TORCheckBox508Manager)
|
---|
58 | public
|
---|
59 | constructor Create; override;
|
---|
60 | function GetCaption(Component: TWinControl): string; override;
|
---|
61 | end;
|
---|
62 |
|
---|
63 | TCPRSDialogRichEdit508Manager = class(TCPRSBaseDialogComponent508Manager)
|
---|
64 | public
|
---|
65 | constructor Create; override;
|
---|
66 | end;
|
---|
67 |
|
---|
68 | TCPRSDialogLabel508Manager = class(TCPRSBaseDialogComponent508Manager)
|
---|
69 | public
|
---|
70 | constructor Create; override;
|
---|
71 | function GetValue(Component: TWinControl): string; override;
|
---|
72 | end;
|
---|
73 |
|
---|
74 | TCPRSDialogHyperlink508Manager = class(TCPRSBaseDialogComponent508Manager)
|
---|
75 | public
|
---|
76 | constructor Create; override;
|
---|
77 | function GetValue(Component: TWinControl): string; override;
|
---|
78 | function GetInstructions(Component: TWinControl): string; override;
|
---|
79 | end;
|
---|
80 |
|
---|
81 | TCPRSDialogNumberComplexManager = class(TVA508ComplexComponentManager)
|
---|
82 | public
|
---|
83 | constructor Create;
|
---|
84 | procedure Refresh(Component: TWinControl;
|
---|
85 | AccessibilityManager: TVA508AccessibilityManager); override;
|
---|
86 | end;
|
---|
87 |
|
---|
88 | TCPRSDialogYearEdit508Manager = class(TVA508ManagedComponentClass)
|
---|
89 | public
|
---|
90 | constructor Create; override;
|
---|
91 | function Redirect(Component: TWinControl; var ManagedType: TManagedType): TWinControl; override;
|
---|
92 | end;
|
---|
93 |
|
---|
94 | TCPRSNumberField508Manager = class(TVA508ManagedComponentClass)
|
---|
95 | public
|
---|
96 | constructor Create; override;
|
---|
97 | function GetCaption(Component: TWinControl): string; override;
|
---|
98 | end;
|
---|
99 |
|
---|
100 | TCPRSDialogDateCombo508Manager = class(TCPRSBaseDialogComponent508Manager)
|
---|
101 | public
|
---|
102 | constructor Create; override;
|
---|
103 | end;
|
---|
104 |
|
---|
105 | TfraTemplateFieldButtonComplexManager = class(TVA508ComplexComponentManager)
|
---|
106 | public
|
---|
107 | constructor Create;
|
---|
108 | procedure Refresh(Component: TWinControl;
|
---|
109 | AccessibilityManager: TVA508AccessibilityManager); override;
|
---|
110 | end;
|
---|
111 |
|
---|
112 | TfraTemplateFieldButton508Manager = class(TVA508ManagedComponentClass)
|
---|
113 | public
|
---|
114 | constructor Create; override;
|
---|
115 | function GetValue(Component: TWinControl): string; override;
|
---|
116 | function GetCaption(Component: TWinControl): string; override;
|
---|
117 | function GetComponentName(Component: TWinControl): string; override;
|
---|
118 | function GetInstructions(Component: TWinControl): string; override;
|
---|
119 | end;
|
---|
120 |
|
---|
121 | TMentalHealthMemo508Manager = class(TVA508ManagedComponentClass)
|
---|
122 | public
|
---|
123 | constructor Create; override;
|
---|
124 | function GetComponentName(Component: TWinControl): string; override;
|
---|
125 | function GetInstructions(Component: TWinControl): string; override;
|
---|
126 | end;
|
---|
127 |
|
---|
128 | procedure SpeakTextInserted(docType: string = '');
|
---|
129 | begin
|
---|
130 | if docType = '' then
|
---|
131 | GetScreenReader.Speak('text inserted')
|
---|
132 | else
|
---|
133 | GetScreenReader.Speak('text inserted in to ' + docType);
|
---|
134 | end;
|
---|
135 |
|
---|
136 | procedure QuickCopyWith508Msg(AFrom, ATo: TObject; docType: string = '');
|
---|
137 | begin
|
---|
138 | QuickCopy(AFrom, ATo);
|
---|
139 | if (AFrom is TStrings) and (TStrings(AFrom).Count > 0) then
|
---|
140 | SpeakTextInserted(docType);
|
---|
141 | end;
|
---|
142 |
|
---|
143 | procedure QuickAddWith508Msg(AFrom, ATo: TObject; docType: string = '');
|
---|
144 | begin
|
---|
145 | QuickAdd(AFrom, ATo);
|
---|
146 | if (AFrom is TStrings) and (TStrings(AFrom).Count > 0) then
|
---|
147 | SpeakTextInserted(docType);
|
---|
148 | end;
|
---|
149 |
|
---|
150 | procedure FastAssignWith508Msg(source, destination: TStrings; docType: string = '');
|
---|
151 | begin
|
---|
152 | FastAssign(source, destination);
|
---|
153 | if source.Count > 0 then
|
---|
154 | SpeakTextInserted(docType);
|
---|
155 | end;
|
---|
156 |
|
---|
157 | procedure ControlShiftTOverride; forward;
|
---|
158 | procedure ControlTabOverride; forward;
|
---|
159 | procedure ControlShiftTabOverride; forward;
|
---|
160 |
|
---|
161 | type
|
---|
162 | TVA508RegistrationScreenReader = class(TVA508ScreenReader);
|
---|
163 |
|
---|
164 | procedure Register508CompatibilityChanges;
|
---|
165 | begin
|
---|
166 | with GetScreenReader do
|
---|
167 | begin
|
---|
168 | RegisterDictionaryChange('<unknown>','unknown');
|
---|
169 | RegisterDictionaryChange('VistA','Vist a');
|
---|
170 | RegisterDictionaryChange('VA','V A');
|
---|
171 | RegisterDictionaryChange('VHA','V H A');
|
---|
172 | RegisterDictionaryChange('HealtheVet','Health E Vet');
|
---|
173 | end;
|
---|
174 | RegisterManagedComponentClass(TCPRSParentDialogCheckBox508Manager.Create);
|
---|
175 | // RegisterManagedComponentClass(TCPRSDialogStaticLabel508Manager.Create);
|
---|
176 | RegisterManagedComponentClass(TCPRSDialogEdit508Manager.Create);
|
---|
177 | RegisterManagedComponentClass(TCPRSDialogFieldComboBox508Manager.Create);
|
---|
178 | RegisterManagedComponentClass(TCPRSDialogCheckBox508Manager.Create);
|
---|
179 | RegisterManagedComponentClass(TCPRSDialogRichEdit508Manager.Create);
|
---|
180 | RegisterManagedComponentClass(TCPRSDialogLabel508Manager.Create);
|
---|
181 | RegisterManagedComponentClass(TCPRSNumberField508Manager.Create);
|
---|
182 | RegisterManagedComponentClass(TCPRSDialogHyperlink508Manager.Create);
|
---|
183 | RegisterManagedComponentClass(TfraTemplateFieldButton508Manager.Create);
|
---|
184 | RegisterManagedComponentClass(TCPRSDialogDateBox508Manager.Create);
|
---|
185 | RegisterManagedComponentClass(TCPRSDialogDateCombo508Manager.Create);
|
---|
186 | RegisterManagedComponentClass(TCPRSDialogYearEdit508Manager.Create);
|
---|
187 | RegisterManagedComponentClass(TMentalHealthMemo508Manager.Create);
|
---|
188 |
|
---|
189 | RegisterComplexComponentManager(TCPRSDialogNumberComplexManager.Create);
|
---|
190 |
|
---|
191 | GetScreenReader.RegisterCustomKeyMapping('Control+Tab', ControlTabOverride,
|
---|
192 | 'Advances to the next tab in a tab control',
|
---|
193 | 'advances to the next tab in a tab control, when you are inside a control with tabs');
|
---|
194 | GetScreenReader.RegisterCustomKeyMapping('Control+Shift+Tab', ControlShiftTabOverride,
|
---|
195 | 'Advances to the previous tab in a tab control',
|
---|
196 | 'advances to the previous tab in a tab control, when you are inside a control with tabs');
|
---|
197 | GetScreenReader.RegisterCustomKeyMapping('Control+Shift+T', ControlShiftTOverride,
|
---|
198 | 'Announces Chart Tab and Patient Name',
|
---|
199 | 'Announces the current CPRS Chart tab and the current patient');
|
---|
200 |
|
---|
201 | with TVA508RegistrationScreenReader(GetScreenReader) do
|
---|
202 | begin
|
---|
203 | RegisterCustomClassBehavior(TCPRSDialogParentCheckBox.ClassName, CLASS_BEHAVIOR_CHECK_BOX);
|
---|
204 | RegisterCustomClassBehavior(TCPRSDialogCheckBox.ClassName, CLASS_BEHAVIOR_CHECK_BOX);
|
---|
205 | RegisterCustomClassBehavior(TCPRSDialogRichEdit.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
206 | RegisterCustomClassBehavior(TCPRSDialogFieldEdit.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
207 | RegisterCustomClassBehavior(TCPRSDialogComboBox.ClassName, CLASS_BEHAVIOR_EDIT_COMBO);
|
---|
208 | RegisterCustomClassBehavior(TCPRSDialogButton.ClassName, CLASS_BEHAVIOR_BUTTON);
|
---|
209 | RegisterCustomClassBehavior(TCPRSDialogDateBox.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
210 | RegisterCustomClassBehavior(TCPRSDialogNumber.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
211 | RegisterCustomClassBehavior(TCPRSNumberField.ClassName, CLASS_BEHAVIOR_EDIT);
|
---|
212 | end;
|
---|
213 |
|
---|
214 | end;
|
---|
215 |
|
---|
216 | { TCPRSDialogCheckBox }
|
---|
217 |
|
---|
218 | constructor TCPRSParentDialogCheckBox508Manager.Create;
|
---|
219 | begin
|
---|
220 | inherited Create(TCPRSDialogParentCheckBox, [mtCaption, mtComponentName, mtInstructions, mtState, mtStateChange]);
|
---|
221 | end;
|
---|
222 |
|
---|
223 | function TCPRSParentDialogCheckBox508Manager.GetCaption(Component: TWinControl): string;
|
---|
224 | begin
|
---|
225 | Result := TCPRSDialogParentCheckBox(Component).AccessText;
|
---|
226 | end;
|
---|
227 |
|
---|
228 | type
|
---|
229 | ExposedControl = class(TWinControl);
|
---|
230 |
|
---|
231 | // CQ #14984
|
---|
232 | procedure ControlTabOverride;
|
---|
233 | begin
|
---|
234 | if assigned(Screen.ActiveControl) and (Screen.ActiveControl is TCustomMemo) then
|
---|
235 | ExposedControl(Screen.FocusedForm).SelectNext(Screen.ActiveControl, TRUE, TRUE)
|
---|
236 | else
|
---|
237 | begin
|
---|
238 | keybd_event(VK_TAB, 0, 0, VK_CONTROL);
|
---|
239 | keybd_event(VK_TAB, 0, KEYEVENTF_KEYUP, VK_CONTROL);
|
---|
240 | end;
|
---|
241 | end;
|
---|
242 |
|
---|
243 | procedure ControlShiftTabOverride;
|
---|
244 | begin
|
---|
245 | if assigned(Screen.ActiveControl) and (Screen.ActiveControl is TCustomMemo) then
|
---|
246 | ExposedControl(Screen.FocusedForm).SelectNext(Screen.ActiveControl, FALSE, TRUE)
|
---|
247 | else
|
---|
248 | begin
|
---|
249 | keybd_event(VK_TAB, 0, 0, (VK_SHIFT * 256) + VK_CONTROL);
|
---|
250 | keybd_event(VK_TAB, 0, KEYEVENTF_KEYUP, (VK_SHIFT * 256) + VK_CONTROL);
|
---|
251 | end;
|
---|
252 | end;
|
---|
253 |
|
---|
254 | procedure ControlShiftTOverride;
|
---|
255 | begin
|
---|
256 | SpeakTabAndPatient;
|
---|
257 | end;
|
---|
258 |
|
---|
259 | function GetTabText: string;
|
---|
260 | var
|
---|
261 | idx: integer;
|
---|
262 | begin
|
---|
263 | Result := '';
|
---|
264 | if assigned(frmFrame) and assigned(frmFrame.tabPage) then
|
---|
265 | begin
|
---|
266 | idx := frmFrame.tabPage.TabIndex;
|
---|
267 | if (idx >= 0) and (idx < uTabList.Count) then
|
---|
268 | begin
|
---|
269 | Result := frmFrame.tabPage.Tabs[idx];
|
---|
270 | if Result = 'D/C Summ' then
|
---|
271 | Result := 'Discharge Summary';
|
---|
272 | end;
|
---|
273 | end;
|
---|
274 | end;
|
---|
275 |
|
---|
276 | procedure SpeakPatient;
|
---|
277 | begin
|
---|
278 | //CQ #17491: Associating 508 change that allows JAWS to dictate the patient status indicator along with the name.
|
---|
279 | if assigned(Patient) and (Patient.Name <> '') and (Patient.Status <> '') then
|
---|
280 | GetScreenReader.Speak(Patient.Name + Patient.Status);
|
---|
281 | end;
|
---|
282 |
|
---|
283 | procedure SpeakTabAndPatient;
|
---|
284 | var
|
---|
285 | text: string;
|
---|
286 | begin
|
---|
287 | text := GetTabText;
|
---|
288 | if text <> '' then
|
---|
289 | text := text + ' tab';
|
---|
290 | if text <> '' then
|
---|
291 | text := text + ', ';
|
---|
292 | //CQ #17491: Associating 508 change that allows JAWS to dictate the patient status indicator along with the name.
|
---|
293 | if assigned(Patient) and (Patient.Name <> '') and (Patient.Status <> '') then
|
---|
294 | text := text + Patient.Name + Patient.Status
|
---|
295 | else
|
---|
296 | text := text + 'no patient selected';
|
---|
297 | if text <> '' then
|
---|
298 | GetScreenReader.Speak(text);
|
---|
299 | end;
|
---|
300 |
|
---|
301 | { TCPRSDialogComponent508Manager }
|
---|
302 |
|
---|
303 | function TCPRSBaseDialogComponent508Manager.GetCaption(
|
---|
304 | Component: TWinControl): string;
|
---|
305 | begin
|
---|
306 | if Supports(Component, ICPRSDialogComponent) then
|
---|
307 | begin
|
---|
308 | Result := (Component as ICPRSDialogComponent).AccessText;
|
---|
309 | end
|
---|
310 | else
|
---|
311 | Result := '';
|
---|
312 | end;
|
---|
313 |
|
---|
314 | (*
|
---|
315 | { TCPRSDialogStaticLabel508Manager }
|
---|
316 |
|
---|
317 | constructor TCPRSDialogStaticLabel508Manager.Create;
|
---|
318 | begin
|
---|
319 | inherited Create(TCPRSDialogStaticLabel, [mtCaption]);
|
---|
320 | end;
|
---|
321 |
|
---|
322 | function TCPRSDialogStaticLabel508Manager.GetCaption(
|
---|
323 | Component: TWinControl): string;
|
---|
324 | var
|
---|
325 | txt: string;
|
---|
326 | begin
|
---|
327 | if Supports(Component, ICPRSDialogComponent) then
|
---|
328 | begin
|
---|
329 | Result := (Component as ICPRSDialogComponent).AccessText;
|
---|
330 | end
|
---|
331 | else
|
---|
332 | Result := '';
|
---|
333 | txt := inherited GetCaption(Component);
|
---|
334 | if txt <> '' then
|
---|
335 | begin
|
---|
336 | if Result <> '' then
|
---|
337 | Result := Result + ' ';
|
---|
338 | Result := Result + txt;
|
---|
339 | end;
|
---|
340 | end;
|
---|
341 | *)
|
---|
342 |
|
---|
343 | { TCPRSTemplateFieldEdit508Manager }
|
---|
344 |
|
---|
345 | constructor TCPRSDialogEdit508Manager.Create;
|
---|
346 | begin
|
---|
347 | inherited Create(TCPRSDialogFieldEdit, [mtCaption]);
|
---|
348 | end;
|
---|
349 |
|
---|
350 | { TCPRSTemplateFieldComboBox508Manager }
|
---|
351 |
|
---|
352 | constructor TCPRSDialogFieldComboBox508Manager.Create;
|
---|
353 | begin
|
---|
354 | inherited Create(TCPRSDialogComboBox, [mtCaption]);
|
---|
355 | end;
|
---|
356 |
|
---|
357 | { TCPRSTemplateFieldCheckBox508Manager }
|
---|
358 |
|
---|
359 | constructor TCPRSDialogCheckBox508Manager.Create;
|
---|
360 | begin
|
---|
361 | inherited Create(TCPRSDialogCheckBox, [mtCaption, mtComponentName, mtInstructions, mtState, mtStateChange]);
|
---|
362 | end;
|
---|
363 |
|
---|
364 | function TCPRSDialogCheckBox508Manager.GetCaption(
|
---|
365 | Component: TWinControl): string;
|
---|
366 | begin
|
---|
367 | if Supports(Component, ICPRSDialogComponent) then
|
---|
368 | begin
|
---|
369 | Result := (Component as ICPRSDialogComponent).AccessText;
|
---|
370 | end
|
---|
371 | else
|
---|
372 | Result := '';
|
---|
373 | Result := Result + ' ' + TCheckBox(Component).Caption;
|
---|
374 | end;
|
---|
375 |
|
---|
376 | { TCPRSTemplateFieldRichEdit508Manager }
|
---|
377 |
|
---|
378 | constructor TCPRSDialogRichEdit508Manager.Create;
|
---|
379 | begin
|
---|
380 | inherited Create(TCPRSDialogRichEdit, [mtCaption]);
|
---|
381 | end;
|
---|
382 |
|
---|
383 | { TCPRSTemplateFieldDateCombo508Manager }
|
---|
384 |
|
---|
385 | constructor TCPRSDialogLabel508Manager.Create;
|
---|
386 | begin
|
---|
387 | inherited Create(TCPRSTemplateFieldLabel, [mtCaption, mtValue]);
|
---|
388 | end;
|
---|
389 |
|
---|
390 | function TCPRSDialogLabel508Manager.GetValue(
|
---|
391 | Component: TWinControl): string;
|
---|
392 | begin
|
---|
393 | Result := TCPRSTemplateFieldLabel(Component).Caption;
|
---|
394 | end;
|
---|
395 |
|
---|
396 | { TCPRSTemplateFieldWebLabel508Manager }
|
---|
397 |
|
---|
398 | constructor TCPRSDialogHyperlink508Manager.Create;
|
---|
399 | begin
|
---|
400 | inherited Create(TCPRSDialogHyperlinkLabel, [mtCaption, mtValue, mtInstructions]);
|
---|
401 | end;
|
---|
402 |
|
---|
403 | function TCPRSDialogHyperlink508Manager.GetInstructions(
|
---|
404 | Component: TWinControl): string;
|
---|
405 | begin
|
---|
406 | Result := 'To activate press space bar';
|
---|
407 | end;
|
---|
408 |
|
---|
409 | function TCPRSDialogHyperlink508Manager.GetValue(
|
---|
410 | Component: TWinControl): string;
|
---|
411 | begin
|
---|
412 | Result := TCPRSDialogHyperlinkLabel(Component).Caption;
|
---|
413 | end;
|
---|
414 |
|
---|
415 | { TCPRSTemplateFieldNumberComplexManager }
|
---|
416 |
|
---|
417 | constructor TCPRSDialogNumberComplexManager.Create;
|
---|
418 | begin
|
---|
419 | inherited Create(TCPRSDialogNumber);
|
---|
420 | end;
|
---|
421 |
|
---|
422 | procedure TCPRSDialogNumberComplexManager.Refresh(Component: TWinControl;
|
---|
423 | AccessibilityManager: TVA508AccessibilityManager);
|
---|
424 | begin
|
---|
425 | with TCPRSDialogNumber(Component) do
|
---|
426 | begin
|
---|
427 | ClearSubControls(Component);
|
---|
428 | if assigned(Edit) then
|
---|
429 | AddSubControl(Component, Edit, AccessibilityManager);
|
---|
430 | end;
|
---|
431 | end;
|
---|
432 |
|
---|
433 | { TCPRSNumberField508Manager }
|
---|
434 |
|
---|
435 | constructor TCPRSNumberField508Manager.Create;
|
---|
436 | begin
|
---|
437 | inherited Create(TCPRSNumberField, [mtCaption]);
|
---|
438 | end;
|
---|
439 |
|
---|
440 | function TCPRSNumberField508Manager.GetCaption(Component: TWinControl): string;
|
---|
441 | begin
|
---|
442 | if assigned(Component.Owner) and Supports(Component.Owner, ICPRSDialogComponent) then
|
---|
443 | begin
|
---|
444 | Result := (Component.Owner as ICPRSDialogComponent).AccessText;
|
---|
445 | end
|
---|
446 | else
|
---|
447 | Result := '';
|
---|
448 | end;
|
---|
449 |
|
---|
450 | { TfraTemplateFieldButtonComplexManager }
|
---|
451 |
|
---|
452 | constructor TfraTemplateFieldButtonComplexManager.Create;
|
---|
453 | begin
|
---|
454 | inherited Create(TfraTemplateFieldButton);
|
---|
455 | end;
|
---|
456 |
|
---|
457 | procedure TfraTemplateFieldButtonComplexManager.Refresh(Component: TWinControl;
|
---|
458 | AccessibilityManager: TVA508AccessibilityManager);
|
---|
459 | begin
|
---|
460 | with TfraTemplateFieldButton(Component) do
|
---|
461 | begin
|
---|
462 | ClearSubControls(Component);
|
---|
463 | AddSubControl(Component, pnlBtn, AccessibilityManager);
|
---|
464 | end;
|
---|
465 | end;
|
---|
466 |
|
---|
467 | { TfraTemplateFieldButton508Manager }
|
---|
468 |
|
---|
469 | constructor TfraTemplateFieldButton508Manager.Create;
|
---|
470 | begin
|
---|
471 | inherited Create(TfraTemplateFieldButton, [mtComponentName, mtCaption, mtInstructions, mtValue]);
|
---|
472 | end;
|
---|
473 |
|
---|
474 | function TfraTemplateFieldButton508Manager.GetCaption(
|
---|
475 | Component: TWinControl): string;
|
---|
476 | begin
|
---|
477 | if assigned(Component) and Supports(Component, ICPRSDialogComponent) then
|
---|
478 | begin
|
---|
479 | Result := (Component as ICPRSDialogComponent).AccessText;
|
---|
480 | end
|
---|
481 | else
|
---|
482 | Result := '';
|
---|
483 | end;
|
---|
484 |
|
---|
485 | function TfraTemplateFieldButton508Manager.GetComponentName(
|
---|
486 | Component: TWinControl): string;
|
---|
487 | begin
|
---|
488 | Result := 'multi value button';
|
---|
489 | end;
|
---|
490 |
|
---|
491 | function TfraTemplateFieldButton508Manager.GetInstructions(
|
---|
492 | Component: TWinControl): string;
|
---|
493 | begin
|
---|
494 | Result := 'to cycle through values press space bar';
|
---|
495 | end;
|
---|
496 |
|
---|
497 | function TfraTemplateFieldButton508Manager.GetValue(
|
---|
498 | Component: TWinControl): string;
|
---|
499 | begin
|
---|
500 | Result := TfraTemplateFieldButton(Component).ButtonText;
|
---|
501 | if Trim(Result) = '' then
|
---|
502 | Result := 'blank';
|
---|
503 | end;
|
---|
504 |
|
---|
505 | { TCPRSTemplateFieldDateBox508Manager }
|
---|
506 |
|
---|
507 | constructor TCPRSDialogDateBox508Manager.Create;
|
---|
508 | begin
|
---|
509 | inherited Create(TCPRSDialogDateBox, [mtCaption]);
|
---|
510 | end;
|
---|
511 |
|
---|
512 | { TCPRSDialogYearEdit508Manager }
|
---|
513 |
|
---|
514 | constructor TCPRSDialogYearEdit508Manager.Create;
|
---|
515 | begin
|
---|
516 | inherited Create(TCPRSDialogYearEdit, [mtComponentRedirect]);
|
---|
517 | end;
|
---|
518 |
|
---|
519 | function TCPRSDialogYearEdit508Manager.Redirect(Component: TWinControl;
|
---|
520 | var ManagedType: TManagedType): TWinControl;
|
---|
521 | begin
|
---|
522 | ManagedType := mtCaption;
|
---|
523 | Result := TWinControl(Component.Owner);
|
---|
524 | end;
|
---|
525 |
|
---|
526 | { TCPRSDialogDateCombo508Manager }
|
---|
527 |
|
---|
528 | constructor TCPRSDialogDateCombo508Manager.Create;
|
---|
529 | begin
|
---|
530 | inherited Create(TCPRSDialogDateCombo, [mtCaption]);
|
---|
531 | end;
|
---|
532 |
|
---|
533 | { TMentalHealthMemo508Manager }
|
---|
534 |
|
---|
535 | constructor TMentalHealthMemo508Manager.Create;
|
---|
536 | begin
|
---|
537 | inherited Create(TMentalHealthMemo, [mtComponentName, mtInstructions]);
|
---|
538 | end;
|
---|
539 |
|
---|
540 | function TMentalHealthMemo508Manager.GetComponentName(
|
---|
541 | Component: TWinControl): string;
|
---|
542 | begin
|
---|
543 | Result := ' ';
|
---|
544 | end;
|
---|
545 |
|
---|
546 | function TMentalHealthMemo508Manager.GetInstructions(
|
---|
547 | Component: TWinControl): string;
|
---|
548 | begin
|
---|
549 | Result := ' ';
|
---|
550 | end;
|
---|
551 |
|
---|
552 | initialization
|
---|
553 | Register508CompatibilityChanges;
|
---|
554 |
|
---|
555 |
|
---|
556 | end.
|
---|