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 | if assigned(Patient) and (Patient.Name <> '') then
|
---|
279 | GetScreenReader.Speak(Patient.Name);
|
---|
280 | end;
|
---|
281 |
|
---|
282 | procedure SpeakTabAndPatient;
|
---|
283 | var
|
---|
284 | text: string;
|
---|
285 | begin
|
---|
286 | text := GetTabText;
|
---|
287 | if text <> '' then
|
---|
288 | text := text + ' tab';
|
---|
289 | if text <> '' then
|
---|
290 | text := text + ', ';
|
---|
291 | if assigned(Patient) and (Patient.Name <> '') then
|
---|
292 | text := text + Patient.Name
|
---|
293 | else
|
---|
294 | text := text + 'no patient selected';
|
---|
295 | if text <> '' then
|
---|
296 | GetScreenReader.Speak(text);
|
---|
297 | end;
|
---|
298 |
|
---|
299 | { TCPRSDialogComponent508Manager }
|
---|
300 |
|
---|
301 | function TCPRSBaseDialogComponent508Manager.GetCaption(
|
---|
302 | Component: TWinControl): string;
|
---|
303 | begin
|
---|
304 | if Supports(Component, ICPRSDialogComponent) then
|
---|
305 | begin
|
---|
306 | Result := (Component as ICPRSDialogComponent).AccessText;
|
---|
307 | end
|
---|
308 | else
|
---|
309 | Result := '';
|
---|
310 | end;
|
---|
311 |
|
---|
312 | (*
|
---|
313 | { TCPRSDialogStaticLabel508Manager }
|
---|
314 |
|
---|
315 | constructor TCPRSDialogStaticLabel508Manager.Create;
|
---|
316 | begin
|
---|
317 | inherited Create(TCPRSDialogStaticLabel, [mtCaption]);
|
---|
318 | end;
|
---|
319 |
|
---|
320 | function TCPRSDialogStaticLabel508Manager.GetCaption(
|
---|
321 | Component: TWinControl): string;
|
---|
322 | var
|
---|
323 | txt: string;
|
---|
324 | begin
|
---|
325 | if Supports(Component, ICPRSDialogComponent) then
|
---|
326 | begin
|
---|
327 | Result := (Component as ICPRSDialogComponent).AccessText;
|
---|
328 | end
|
---|
329 | else
|
---|
330 | Result := '';
|
---|
331 | txt := inherited GetCaption(Component);
|
---|
332 | if txt <> '' then
|
---|
333 | begin
|
---|
334 | if Result <> '' then
|
---|
335 | Result := Result + ' ';
|
---|
336 | Result := Result + txt;
|
---|
337 | end;
|
---|
338 | end;
|
---|
339 | *)
|
---|
340 |
|
---|
341 | { TCPRSTemplateFieldEdit508Manager }
|
---|
342 |
|
---|
343 | constructor TCPRSDialogEdit508Manager.Create;
|
---|
344 | begin
|
---|
345 | inherited Create(TCPRSDialogFieldEdit, [mtCaption]);
|
---|
346 | end;
|
---|
347 |
|
---|
348 | { TCPRSTemplateFieldComboBox508Manager }
|
---|
349 |
|
---|
350 | constructor TCPRSDialogFieldComboBox508Manager.Create;
|
---|
351 | begin
|
---|
352 | inherited Create(TCPRSDialogComboBox, [mtCaption]);
|
---|
353 | end;
|
---|
354 |
|
---|
355 | { TCPRSTemplateFieldCheckBox508Manager }
|
---|
356 |
|
---|
357 | constructor TCPRSDialogCheckBox508Manager.Create;
|
---|
358 | begin
|
---|
359 | inherited Create(TCPRSDialogCheckBox, [mtCaption, mtComponentName, mtInstructions, mtState, mtStateChange]);
|
---|
360 | end;
|
---|
361 |
|
---|
362 | function TCPRSDialogCheckBox508Manager.GetCaption(
|
---|
363 | Component: TWinControl): string;
|
---|
364 | begin
|
---|
365 | if Supports(Component, ICPRSDialogComponent) then
|
---|
366 | begin
|
---|
367 | Result := (Component as ICPRSDialogComponent).AccessText;
|
---|
368 | end
|
---|
369 | else
|
---|
370 | Result := '';
|
---|
371 | Result := Result + ' ' + TCheckBox(Component).Caption;
|
---|
372 | end;
|
---|
373 |
|
---|
374 | { TCPRSTemplateFieldRichEdit508Manager }
|
---|
375 |
|
---|
376 | constructor TCPRSDialogRichEdit508Manager.Create;
|
---|
377 | begin
|
---|
378 | inherited Create(TCPRSDialogRichEdit, [mtCaption]);
|
---|
379 | end;
|
---|
380 |
|
---|
381 | { TCPRSTemplateFieldDateCombo508Manager }
|
---|
382 |
|
---|
383 | constructor TCPRSDialogLabel508Manager.Create;
|
---|
384 | begin
|
---|
385 | inherited Create(TCPRSTemplateFieldLabel, [mtCaption, mtValue]);
|
---|
386 | end;
|
---|
387 |
|
---|
388 | function TCPRSDialogLabel508Manager.GetValue(
|
---|
389 | Component: TWinControl): string;
|
---|
390 | begin
|
---|
391 | Result := TCPRSTemplateFieldLabel(Component).Caption;
|
---|
392 | end;
|
---|
393 |
|
---|
394 | { TCPRSTemplateFieldWebLabel508Manager }
|
---|
395 |
|
---|
396 | constructor TCPRSDialogHyperlink508Manager.Create;
|
---|
397 | begin
|
---|
398 | inherited Create(TCPRSDialogHyperlinkLabel, [mtCaption, mtValue, mtInstructions]);
|
---|
399 | end;
|
---|
400 |
|
---|
401 | function TCPRSDialogHyperlink508Manager.GetInstructions(
|
---|
402 | Component: TWinControl): string;
|
---|
403 | begin
|
---|
404 | Result := 'To activate press space bar';
|
---|
405 | end;
|
---|
406 |
|
---|
407 | function TCPRSDialogHyperlink508Manager.GetValue(
|
---|
408 | Component: TWinControl): string;
|
---|
409 | begin
|
---|
410 | Result := TCPRSDialogHyperlinkLabel(Component).Caption;
|
---|
411 | end;
|
---|
412 |
|
---|
413 | { TCPRSTemplateFieldNumberComplexManager }
|
---|
414 |
|
---|
415 | constructor TCPRSDialogNumberComplexManager.Create;
|
---|
416 | begin
|
---|
417 | inherited Create(TCPRSDialogNumber);
|
---|
418 | end;
|
---|
419 |
|
---|
420 | procedure TCPRSDialogNumberComplexManager.Refresh(Component: TWinControl;
|
---|
421 | AccessibilityManager: TVA508AccessibilityManager);
|
---|
422 | begin
|
---|
423 | with TCPRSDialogNumber(Component) do
|
---|
424 | begin
|
---|
425 | ClearSubControls(Component);
|
---|
426 | if assigned(Edit) then
|
---|
427 | AddSubControl(Component, Edit, AccessibilityManager);
|
---|
428 | end;
|
---|
429 | end;
|
---|
430 |
|
---|
431 | { TCPRSNumberField508Manager }
|
---|
432 |
|
---|
433 | constructor TCPRSNumberField508Manager.Create;
|
---|
434 | begin
|
---|
435 | inherited Create(TCPRSNumberField, [mtCaption]);
|
---|
436 | end;
|
---|
437 |
|
---|
438 | function TCPRSNumberField508Manager.GetCaption(Component: TWinControl): string;
|
---|
439 | begin
|
---|
440 | if assigned(Component.Owner) and Supports(Component.Owner, ICPRSDialogComponent) then
|
---|
441 | begin
|
---|
442 | Result := (Component.Owner as ICPRSDialogComponent).AccessText;
|
---|
443 | end
|
---|
444 | else
|
---|
445 | Result := '';
|
---|
446 | end;
|
---|
447 |
|
---|
448 | { TfraTemplateFieldButtonComplexManager }
|
---|
449 |
|
---|
450 | constructor TfraTemplateFieldButtonComplexManager.Create;
|
---|
451 | begin
|
---|
452 | inherited Create(TfraTemplateFieldButton);
|
---|
453 | end;
|
---|
454 |
|
---|
455 | procedure TfraTemplateFieldButtonComplexManager.Refresh(Component: TWinControl;
|
---|
456 | AccessibilityManager: TVA508AccessibilityManager);
|
---|
457 | begin
|
---|
458 | with TfraTemplateFieldButton(Component) do
|
---|
459 | begin
|
---|
460 | ClearSubControls(Component);
|
---|
461 | AddSubControl(Component, pnlBtn, AccessibilityManager);
|
---|
462 | end;
|
---|
463 | end;
|
---|
464 |
|
---|
465 | { TfraTemplateFieldButton508Manager }
|
---|
466 |
|
---|
467 | constructor TfraTemplateFieldButton508Manager.Create;
|
---|
468 | begin
|
---|
469 | inherited Create(TfraTemplateFieldButton, [mtComponentName, mtCaption, mtInstructions, mtValue]);
|
---|
470 | end;
|
---|
471 |
|
---|
472 | function TfraTemplateFieldButton508Manager.GetCaption(
|
---|
473 | Component: TWinControl): string;
|
---|
474 | begin
|
---|
475 | if assigned(Component) and Supports(Component, ICPRSDialogComponent) then
|
---|
476 | begin
|
---|
477 | Result := (Component as ICPRSDialogComponent).AccessText;
|
---|
478 | end
|
---|
479 | else
|
---|
480 | Result := '';
|
---|
481 | end;
|
---|
482 |
|
---|
483 | function TfraTemplateFieldButton508Manager.GetComponentName(
|
---|
484 | Component: TWinControl): string;
|
---|
485 | begin
|
---|
486 | Result := 'multi value button';
|
---|
487 | end;
|
---|
488 |
|
---|
489 | function TfraTemplateFieldButton508Manager.GetInstructions(
|
---|
490 | Component: TWinControl): string;
|
---|
491 | begin
|
---|
492 | Result := 'to cycle through values press space bar';
|
---|
493 | end;
|
---|
494 |
|
---|
495 | function TfraTemplateFieldButton508Manager.GetValue(
|
---|
496 | Component: TWinControl): string;
|
---|
497 | begin
|
---|
498 | Result := TfraTemplateFieldButton(Component).ButtonText;
|
---|
499 | if Trim(Result) = '' then
|
---|
500 | Result := 'blank';
|
---|
501 | end;
|
---|
502 |
|
---|
503 | { TCPRSTemplateFieldDateBox508Manager }
|
---|
504 |
|
---|
505 | constructor TCPRSDialogDateBox508Manager.Create;
|
---|
506 | begin
|
---|
507 | inherited Create(TCPRSDialogDateBox, [mtCaption]);
|
---|
508 | end;
|
---|
509 |
|
---|
510 | { TCPRSDialogYearEdit508Manager }
|
---|
511 |
|
---|
512 | constructor TCPRSDialogYearEdit508Manager.Create;
|
---|
513 | begin
|
---|
514 | inherited Create(TCPRSDialogYearEdit, [mtComponentRedirect]);
|
---|
515 | end;
|
---|
516 |
|
---|
517 | function TCPRSDialogYearEdit508Manager.Redirect(Component: TWinControl;
|
---|
518 | var ManagedType: TManagedType): TWinControl;
|
---|
519 | begin
|
---|
520 | ManagedType := mtCaption;
|
---|
521 | Result := TWinControl(Component.Owner);
|
---|
522 | end;
|
---|
523 |
|
---|
524 | { TCPRSDialogDateCombo508Manager }
|
---|
525 |
|
---|
526 | constructor TCPRSDialogDateCombo508Manager.Create;
|
---|
527 | begin
|
---|
528 | inherited Create(TCPRSDialogDateCombo, [mtCaption]);
|
---|
529 | end;
|
---|
530 |
|
---|
531 | { TMentalHealthMemo508Manager }
|
---|
532 |
|
---|
533 | constructor TMentalHealthMemo508Manager.Create;
|
---|
534 | begin
|
---|
535 | inherited Create(TMentalHealthMemo, [mtComponentName, mtInstructions]);
|
---|
536 | end;
|
---|
537 |
|
---|
538 | function TMentalHealthMemo508Manager.GetComponentName(
|
---|
539 | Component: TWinControl): string;
|
---|
540 | begin
|
---|
541 | Result := ' ';
|
---|
542 | end;
|
---|
543 |
|
---|
544 | function TMentalHealthMemo508Manager.GetInstructions(
|
---|
545 | Component: TWinControl): string;
|
---|
546 | begin
|
---|
547 | Result := ' ';
|
---|
548 | end;
|
---|
549 |
|
---|
550 | initialization
|
---|
551 | Register508CompatibilityChanges;
|
---|
552 |
|
---|
553 |
|
---|
554 | end.
|
---|