source: cprs/trunk/CPRS-Chart/uDlgComponents.pas@ 924

Last change on this file since 924 was 830, checked in by Kevin Toppenberg, 14 years ago

Upgrading to version 27

File size: 20.5 KB
RevLine 
[830]1unit uDlgComponents;
2
3interface
4
5uses
6 SysUtils, Windows, Messages, Classes, Controls, StdCtrls, ComCtrls, ExtCtrls, uReminders,
7 TypInfo, StrUtils, ORCtrls, ORDtTm, Forms, Graphics, Dialogs, RTLConsts, Buttons,
8 VA508AccessibilityManager;
9
10type
11 ICPRSDialogComponent = interface(IInterface)
12 ['{C4DBA10A-2A8D-4F71-AE20-5BA350D48551}']
13 function Component: TControl;
14 function GetBeforeText: string;
15 procedure SetBeforeText(Value: string);
16 function GetAfterText: string;
17 procedure SetAfterText(value: string);
18 function GetRequiredField: boolean;
19 procedure SetRequiredField(Value: boolean);
20 function AccessText: string;
21 function GetSRBreak: boolean;
22 procedure SetSRBreak(Value: boolean);
23 property BeforeText: string read GetBeforeText write SetBeforeText;
24 property AfterText: string read GetAfterText write SetAfterText;
25 property SRBreak: boolean read GetSRBreak write SetSRBreak;
26 property RequiredField: boolean read GetRequiredField write SetRequiredField;
27 end;
28
29 TCPRSDialogComponent = class(TInterfacedObject, ICPRSDialogComponent)
30 private
31 FRequiredField: boolean;
32 FComponent: TControl;
33 FBeforeText: string;
34 FAfterText: string;
35 FSRBreak: boolean;
36 FComponentName: string;
37 FFollowOnCaption: string;
38 public
39 constructor Create(AComponent: TControl; AComponentName: string;
40 FollowOnCaption: string = '');
41 function Component: TControl;
42 function GetBeforeText: string;
43 procedure SetBeforeText(Value: string);
44 function GetAfterText: string;
45 procedure SetAfterText(value: string);
46 function GetRequiredField: boolean;
47 procedure SetRequiredField(Value: boolean);
48 function AccessText: string;
49 function GetSRBreak: boolean;
50 procedure SetSRBreak(Value: boolean);
51 property BeforeText: string read GetBeforeText write SetBeforeText;
52 property AfterText: string read GetAfterText write SetAfterText;
53 property SRBreak: boolean read GetSRBreak write SetSRBreak;
54 property RequiredField: boolean read GetRequiredField write SetRequiredField;
55 end;
56
57 TCPRSDialogStaticLabel = class(TVA508StaticText);
58
59 TCPRSDialogParentCheckBox = class(TORCheckBox)
60 private
61 FAccessText: string;
62 public
63 property AccessText: string read FAccessText write FAccessText;
64 end;
65
66 TCPRSDialogFieldEdit = class(TEdit, ICPRSDialogComponent)
67 private
68 FCPRSDialogData: ICPRSDialogComponent;
69 public
70 constructor Create(AOwner: TComponent); override;
71 destructor Destroy; override;
72 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogData implements ICPRSDialogComponent;
73 end;
74
75 TCPRSDialogComboBox = class(TORComboBox, ICPRSDialogComponent)
76 private
77 FCPRSDialogData: ICPRSDialogComponent;
78 public
79 constructor Create(AOwner: TComponent); override;
80 destructor Destroy; override;
81 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogData implements ICPRSDialogComponent;
82 end;
83
84 TCPRSDialogCheckBox = class(TORCheckBox, ICPRSDialogComponent)
85 private
86 FCPRSDialogData: ICPRSDialogComponent;
87 public
88 constructor Create(AOwner: TComponent); override;
89 destructor Destroy; override;
90 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogData implements ICPRSDialogComponent;
91 end;
92
93 TCPRSDialogButton = class(TButton, ICPRSDialogComponent)
94 private
95 FCPRSDialogData: ICPRSDialogComponent;
96 public
97 constructor Create(AOwner: TComponent); override;
98 destructor Destroy; override;
99 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogData implements ICPRSDialogComponent;
100 end;
101
102 TCPRSDialogYearEdit = class(TORYearEdit);
103
104 TCPRSDialogDateCombo = class(TORDateCombo, ICPRSDialogComponent)
105 private
106 FCPRSDialogInfo: ICPRSDialogComponent;
107 protected
108 public
109 constructor Create(AOwner: TComponent); override;
110 destructor Destroy; override;
111 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogInfo implements ICPRSDialogComponent;
112 end;
113
114 TCPRSDialogDateBox = class(TORDateBox, ICPRSDialogComponent)
115 private
116 FCPRSDialogInfo: ICPRSDialogComponent;
117 public
118 constructor Create(AOwner: TComponent); override;
119 destructor Destroy; override;
120 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogInfo implements ICPRSDialogComponent;
121 end;
122
123 TCPRSNumberField = class(TEdit);
124
125 TCPRSDialogNumber = class(TPanel, ICPRSDialogComponent)
126 private
127 FCPRSDialogInfo: ICPRSDialogComponent;
128 FEdit: TCPRSNumberField;
129 FUpDown: TUpDown;
130 public
131 constructor CreatePanel(AOwner: TComponent);
132 destructor Destroy; override;
133 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogInfo implements ICPRSDialogComponent;
134 property Edit: TCPRSNumberField read FEdit;
135 property UpDown: TUpDown read FUpDown;
136 end;
137
138 TCPRSTemplateFieldLabel = class(TCPRSDialogStaticLabel)
139 private
140 FExclude: boolean;
141 public
142 property Exclude: boolean read FExclude write FExclude;
143 end;
144
145 TCPRSDialogHyperlinkLabel = class(TCPRSTemplateFieldLabel, ICPRSDialogComponent)
146 private
147 FURL: string;
148 FCPRSDialogInfo: ICPRSDialogComponent;
149 protected
150 procedure Clicked(Sender: TObject);
151 procedure KeyPressed(Sender: TObject; var Key: Char);
152 public
153 constructor Create(AOwner: TComponent); override;
154 destructor Destroy; override;
155 procedure Init(Addr: string);
156 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogInfo implements ICPRSDialogComponent;
157 end;
158
159 TCPRSDialogRichEdit = class(TRichEdit, ICPRSDialogComponent)
160 private
161 FCPRSDialogData: ICPRSDialogComponent;
162 public
163 constructor Create(AOwner: TComponent); override;
164 destructor Destroy; override;
165 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogData implements ICPRSDialogComponent;
166 end;
167
168{This is the panel associated with child items in template and reminders dialogs}
169 TDlgFieldPanel = class(TPanel)
170 private
171 FOnDestroy: TNotifyEvent;
172 FCanvas: TControlCanvas; {used to draw focus rect}
173 FCurrentPos: TPoint;
174 FChildren: TInterfaceList;
175 function GetFocus: boolean;
176 procedure SetTheFocus(const Value: boolean);
177 protected {used to draw focus rect}
178 procedure Paint; override; {used to draw focus rect}
179 public
180 constructor Create(AOwner: TComponent); override;
181 destructor Destroy; override;
182 function GetFirstComponent: ICPRSDialogComponent;
183 function GetNextComponent: ICPRSDialogComponent;
184 property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
185 property Focus: boolean read GetFocus write SetTheFocus; {to draw focus rect}
186 property OnKeyPress; {to click the checkbox when spacebar is pressed}
187 end;
188
189 TVitalComboBox = class;
190
191 TVitalEdit = class(TEdit, ICPRSDialogComponent)
192 private
193 FLinkedCombo: TVitalComboBox;
194 FCPRSDialogInfo: ICPRSDialogComponent;
195 public
196 constructor Create(AOwner: TComponent); override;
197 destructor Destroy; override;
198 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogInfo implements ICPRSDialogComponent;
199 property LinkedCombo: TVitalComboBox read FLinkedCombo write FLinkedCombo;
200 end;
201
202 TVitalComboBox = class(TComboBox, ICPRSDialogComponent)
203 private
204 FLinkedEdit: TVitalEdit;
205 FCPRSDialogInfo: ICPRSDialogComponent;
206 public
207 constructor Create(AOwner: TComponent); override;
208 destructor Destroy; override;
209 procedure SelectByID(Value: string);
210 property LinkedEdit: TVitalEdit read FLinkedEdit write FLinkedEdit;
211 property CPRSDialogData: ICPRSDialogComponent read FCPRSDialogInfo implements ICPRSDialogComponent;
212 end;
213
214 TMentalHealthMemo = class(TMemo);
215
216procedure ScreenReaderSystem_CurrentCheckBox(CheckBox: TCPRSDialogParentCheckBox);
217procedure ScreenReaderSystem_CurrentLabel(lbl: TCPRSDialogStaticLabel);
218procedure ScreenReaderSystem_CurrentComponent(component: ICPRSDialogComponent);
219procedure ScreenReaderSystem_AddText(text: string);
220procedure ScreenReaderSystem_Continue;
221procedure ScreenReaderSystem_Stop;
222procedure ScreenReaderSystem_Clear;
223//function ScreenReaderSystem_GetPendingText: string;
224
225const
226// Screen Reader will stop reading in a TDlgFieldPanel at all classes except these:
227 ReminderScreenReaderReadThroughClasses: array[1..3] of TClass =
228 (TUpDown, TLabel, TVitalComboBox);
229
230implementation
231
232uses uCore, ORClasses, ORFn, VA508AccessibilityRouter, uTemplateFields;
233
234var
235 SRCheckBox: TCPRSDialogParentCheckBox = nil;
236 SRLabel: TCPRSDialogStaticLabel = nil;
237 SRComp: ICPRSDialogComponent = nil;
238 SRText: string = '';
239 SRContinuePending: boolean = FALSE;
240
241procedure UpdatePending;
242begin
243 if SRContinuePending then
244 begin
245 if assigned(SRComp) then
246 begin
247 SRComp.AfterText := SRText;
248 SRText := '';
249 if assigned(SRLabel) then
250 begin
251 SRLabel.TabStop := FALSE;
252 SRLabel := nil;
253 end;
254 end;
255 SRComp := nil;
256 SRContinuePending := FALSE;
257 end;
258end;
259
260procedure UpdateCheckBox;
261begin
262 if assigned(SRCheckBox) then
263 begin
264 SRCheckBox.AccessText := SRText;
265 SRText := '';
266 if assigned(SRLabel) then
267 SRLabel.TabStop := false;
268 SRLabel := nil;
269 SRCheckBox := nil;
270 end;
271end;
272
273procedure ScreenReaderSystem_CurrentCheckBox(CheckBox: TCPRSDialogParentCheckBox);
274begin
275 ScreenReaderSystem_Stop;
276 SRCheckBox := CheckBox;
277end;
278
279procedure ScreenReaderSystem_CurrentLabel(lbl: TCPRSDialogStaticLabel);
280begin
281 if assigned(SRLabel) then
282 ScreenReaderSystem_Stop;
283 SRLabel := lbl;
284end;
285
286procedure ScreenReaderSystem_CurrentComponent(component: ICPRSDialogComponent);
287begin
288 UpdateCheckBox;
289 UpdatePending;
290 if component.RequiredField then
291 begin
292 if SRText <> '' then
293 SRText := SRText + ' ';
294 SRText := SRText + 'required field';
295 end;
296 if (SRText <> '') and (component.Component is TCPRSDialogCheckBox) then
297 ScreenReaderSystem_Stop;
298 SRComp := component;
299 if SRText = '' then
300 SRComp.BeforeText := ' '
301 else
302 SRComp.BeforeText := SRText;
303 SRText := '';
304 if assigned(SRLabel) then
305 begin
306 SRLabel.TabStop := FALSE;
307 SRLabel := nil;
308 end;
309end;
310
311procedure ScreenReaderSystem_AddText(text: string);
312begin
313 if RightStr(Text,1) = '*' then
314 delete(text, length(text),1);
315 if Text <> '' then
316 begin
317 if SRText <> '' then
318 SRText := SRText + ' ';
319 SRText := SRText + text;
320 end;
321end;
322
323procedure ScreenReaderSystem_Continue;
324begin
325 if assigned(SRComp) then
326 SRContinuePending := TRUE
327 else
328 SRContinuePending := FALSE;
329end;
330
331procedure ScreenReaderSystem_Stop;
332begin
333 UpdateCheckBox;
334 UpdatePending;
335 ScreenReaderSystem_Clear;
336end;
337
338procedure ScreenReaderSystem_Clear;
339begin
340 SRCheckBox := nil;
341 if assigned(SRLabel) and (trim(SRLabel.Caption) = '') then
342 SRLabel.TabStop := false;
343 SRLabel := nil;
344 SRComp := nil;
345 SRText := '';
346 SRContinuePending := FALSE;
347end;
348
349function ScreenReaderSystem_GetPendingText: string;
350begin
351 Result := SRText;
352 SRText := '';
353end;
354
355function GetDialogControlText(Control: TControl): string;
356var
357 Len: Integer;
358begin
359 if Control is TButton then
360 Result := TButton(Control).Caption
361 else
362 begin
363 Len := Control.GetTextLen;
364 SetString(Result, PChar(nil), Len);
365 if Len <> 0 then Control.GetTextBuf(Pointer(Result), Len + 1);
366 end;
367end;
368
369constructor TDlgFieldPanel.Create(AOwner: TComponent);
370begin
371 inherited Create(AOwner);
372 FChildren := TInterfaceList.Create;
373end;
374
375destructor TDlgFieldPanel.Destroy;
376begin
377 if(assigned(FOnDestroy)) then
378 FOnDestroy(Self);
379 FreeAndNil(FChildren);
380 inherited;
381end;
382
383function TDlgFieldPanel.GetFirstComponent: ICPRSDialogComponent;
384begin
385 FCurrentPos := Point(-1,-1);
386 Result := GetNextComponent;
387end;
388
389function TDlgFieldPanel.GetFocus: boolean;
390begin
391 result := Focused;
392end;
393
394
395function TDlgFieldPanel.GetNextComponent: ICPRSDialogComponent;
396var
397 Comp: ICPRSDialogComponent;
398 Control: TControl;
399 i: integer;
400 MinLeft, MinTop, MinXGap, MinYGap, gap: Integer;
401 ok: boolean;
402
403begin
404 MinLeft := FCurrentPos.x;
405 MinTop := FCurrentPos.Y;
406 MinXGap := MaxInt;
407 MinYGap := MaxInt;
408 Result := nil;
409 for I := 0 to FChildren.Count - 1 do
410 begin
411 Comp := ICPRSDialogComponent(FChildren[i]);
412 try
413 Control := Comp.Component;
414 if assigned(Control) then
415 begin
416 ok := (Control.Top > MinTop);
417 if (not ok) and (Control.Top = MinTop) and (Control.Left > MinLeft) then
418 ok := TRUE;
419 if ok then
420 begin
421 ok := FALSE;
422 gap := Control.Top - MinTop;
423 if gap < MinYGap then
424 begin
425 MinYGap := gap;
426 MinXGap := Control.Left;
427 ok := true;
428 end
429 else
430 if (MinYGap = gap) and (Control.Left < MinXGap) then
431 begin
432 MinXGap := Control.Left;
433 ok := TRUE;
434 end;
435 if ok then
436 begin
437 Result := Comp;
438 end;
439 end;
440 end;
441 finally
442 Comp := nil;
443 end;
444 end;
445 if assigned(Result) then
446 begin
447 FCurrentPos.x := Result.Component.Left;
448 FCurrentPos.Y := Result.Component.Top;
449 end;
450end;
451
452procedure TDlgFieldPanel.Paint;
453var
454 DC: HDC;
455 R: TRect;
456
457begin
458 inherited;
459 if(Focused) then
460 begin
461 if(not assigned(FCanvas)) then
462 FCanvas := TControlCanvas.Create;
463 DC := GetWindowDC(Handle);
464 try
465 FCanvas.Handle := DC;
466 R := ClientRect;
467 InflateRect(R, -1, -1);
468 FCanvas.DrawFocusRect(R);
469 finally
470 ReleaseDC(Handle, DC);
471 end;
472 end;
473end;
474
475procedure TDlgFieldPanel.SetTheFocus(const Value: boolean);
476begin
477 if Value then
478 SetFocus;
479end;
480
481{ TVitalComboBox }
482
483constructor TVitalComboBox.Create(AOwner: TComponent);
484begin
485 inherited Create(AOwner);
486 FCPRSDialogInfo := TCPRSDialogComponent.Create(Self, 'Edit Combo');
487end;
488
489destructor TVitalComboBox.Destroy;
490begin
491 FCPRSDialogInfo := nil;
492 inherited;
493end;
494
495procedure TVitalComboBox.SelectByID(Value: string);
496var
497 i: integer;
498
499begin
500 for i := 0 to Items.Count-1 do
501 if(Value = Items[i]) then
502 begin
503 ItemIndex := i;
504 break;
505 end;
506end;
507
508{ TCPRSTemplateFieldEdit }
509
510constructor TCPRSDialogFieldEdit.Create(AOwner: TComponent);
511begin
512 inherited Create(AOwner);
513 FCPRSDialogData := TCPRSDialogComponent.Create(Self, 'Edit');
514end;
515
516destructor TCPRSDialogFieldEdit.Destroy;
517begin
518 FCPRSDialogData := nil;
519 inherited;
520end;
521
522{ TCPRSTemplateFieldComboBox }
523
524constructor TCPRSDialogComboBox.Create(AOwner: TComponent);
525begin
526 inherited Create(AOwner);
527 FCPRSDialogData := TCPRSDialogComponent.Create(Self, 'Edit Combo');
528end;
529
530destructor TCPRSDialogComboBox.Destroy;
531begin
532 FCPRSDialogData := nil;
533 inherited;
534end;
535
536{ TCPRSTemplateFieldCheckBox }
537
538constructor TCPRSDialogCheckBox.Create(AOwner: TComponent);
539begin
540 inherited Create(AOwner);
541 FCPRSDialogData := TCPRSDialogComponent.Create(Self, 'Check Box');
542end;
543
544destructor TCPRSDialogCheckBox.Destroy;
545begin
546 FCPRSDialogData := nil;
547 inherited;
548end;
549
550{ TCPRSDialogButton }
551
552constructor TCPRSDialogButton.Create(AOwner: TComponent);
553begin
554 inherited Create(AOwner);
555 FCPRSDialogData := TCPRSDialogComponent.Create(Self, 'Button');
556end;
557
558destructor TCPRSDialogButton.Destroy;
559begin
560 FCPRSDialogData := nil;
561 inherited;
562end;
563
564{ TCPRSTemplateFieldDateCombo }
565
566constructor TCPRSDialogDateCombo.Create(AOwner: TComponent);
567begin
568 inherited Create(AOwner);
569 ORYearEditClass := TCPRSDialogYearEdit;
570 FCPRSDialogInfo := TCPRSDialogComponent.Create(Self, 'Date Fields','Year');
571end;
572
573destructor TCPRSDialogDateCombo.Destroy;
574begin
575 FCPRSDialogInfo := nil;
576 inherited;
577end;
578
579{ TCPRSTemplateFieldDateBox }
580
581constructor TCPRSDialogDateBox.Create(AOwner: TComponent);
582//var
583// i: integer;
584// btn: TORDateButton;
585
586begin
587 inherited Create(AOwner);
588{ for i := 0 to ControlCount - 1 do
589 begin
590 if Controls[i] is TORDateButton then
591 begin
592 btn := TORDateButton(Controls[i]);
593 if ScreenReaderSystemActive then
594 btn.TabStop := TRUE;
595 break;
596 end;
597 end;}
598 FCPRSDialogInfo := TCPRSDialogComponent.Create(Self, 'Date Edit', 'Date');
599end;
600
601destructor TCPRSDialogDateBox.Destroy;
602begin
603 FCPRSDialogInfo := nil;
604 inherited;
605end;
606
607{ TCPRSTemplateFieldNumber }
608
609constructor TCPRSDialogNumber.CreatePanel(AOwner: TComponent);
610begin
611 inherited Create(AOwner);
612 FEdit := TCPRSNumberField.Create(Self);
613 FEdit.Parent := Self;
614 FEdit.BorderStyle := bsNone;
615 FEdit.Top := 0;
616 FEdit.Left := 0;
617 FEdit.AutoSelect := True;
618 FUpDown := TUpDown.Create(Self);
619 FUpDown.Parent := Self;
620 FUpDown.Associate := FEdit;
621 FUpDown.Thousands := FALSE;
622 FEdit.Tag := Integer(FUpDown);
623 FCPRSDialogInfo := TCPRSDialogComponent.Create(Self, 'Numeric Edit', 'Numeric');
624end;
625
626destructor TCPRSDialogNumber.Destroy;
627begin
628 FCPRSDialogInfo := nil;
629 inherited;
630end;
631
632{ TCPRSTemplateWebLabel }
633
634procedure TCPRSDialogHyperlinkLabel.Clicked(Sender: TObject);
635begin
636 GotoWebPage(FURL);
637end;
638
639type
640 TFontFriend = class(TFont);
641
642constructor TCPRSDialogHyperlinkLabel.Create(AOwner: TComponent);
643begin
644 inherited Create(AOwner);
645 FCPRSDialogInfo := TCPRSDialogComponent.Create(Self, 'Hyper Link', 'Hyper Link');
646 OnKeyPress := KeyPressed;
647end;
648
649destructor TCPRSDialogHyperlinkLabel.Destroy;
650begin
651 FCPRSDialogInfo := nil;
652 inherited;
653end;
654
655procedure TCPRSDialogHyperlinkLabel.Init(Addr: string);
656begin
657 FURL := Addr;
658 OnClick := Clicked;
659 StaticLabel.OnClick := Clicked;
660 Font.Assign(TORExposedControl(Parent).Font);
661 Font.Color := Get508CompliantColor(clBlue);
662 Font.Style := Font.Style + [fsUnderline];
663 TFontFriend(Font).Changed; // AdjustBounds; // make sure we have the right width
664 AutoSize := FALSE;
665 Height := Height + 1; // Courier New doesn't support underline unless it's higher
666 Cursor := crHandPoint;
667end;
668
669procedure TCPRSDialogHyperlinkLabel.KeyPressed(Sender: TObject;
670 var Key: Char);
671begin
672 if ord(Key) = VK_SPACE then
673 Clicked(Self);
674end;
675
676{ TCPRSTemplateFieldRichEdit }
677
678constructor TCPRSDialogRichEdit.Create(AOwner: TComponent);
679begin
680 inherited Create(AOwner);
681 FCPRSDialogData := TCPRSDialogComponent.Create(Self, 'Edit');
682end;
683
684destructor TCPRSDialogRichEdit.Destroy;
685begin
686 FCPRSDialogData := nil;
687 inherited;
688end;
689
690{ TCPRSDialogData }
691
692function TCPRSDialogComponent.Component: TControl;
693begin
694 Result := FComponent;
695end;
696
697constructor TCPRSDialogComponent.Create(AComponent: TControl; AComponentName: string;
698 FollowOnCaption: string = '');
699begin
700 inherited Create;
701 FComponent := AComponent;
702 FSRBreak := TRUE;
703 FComponentName := AComponentName;
704 FFollowOnCaption := FollowOnCaption;
705 FRequiredField := FALSE;
706end;
707
708function TCPRSDialogComponent.AccessText: string;
709begin
710 if FAfterText = '' then
711 Result := FBeforeText
712 else if FBeforeText = '' then
713 begin
714 if FAfterText <> '' then
715 Result := FComponentName + ', ' + FAfterText + ','
716 else
717 Result := '';
718 end
719 else
720 Result := FBeforeText + ', ' + FComponentName + ', ' + FAfterText + ',';
721 if FFollowOnCaption <> '' then
722 begin
723 if Result <> '' then
724 Result := Result + ' ';
725 Result := Result + ' ' + FFollowOnCaption;
726 end;
727end;
728
729function TCPRSDialogComponent.GetAfterText: string;
730begin
731 Result := FAfterText;
732end;
733
734function TCPRSDialogComponent.GetBeforeText: string;
735begin
736 Result := FBeforeText;
737end;
738
739function TCPRSDialogComponent.GetRequiredField: boolean;
740begin
741 Result := FRequiredField;
742end;
743
744function TCPRSDialogComponent.GetSRBreak: boolean;
745begin
746 Result := FSRBreak;
747end;
748
749procedure TCPRSDialogComponent.SetAfterText(value: string);
750begin
751 FAfterText := Value;
752end;
753
754procedure TCPRSDialogComponent.SetBeforeText(Value: string);
755begin
756 FBeforeText := Value;
757end;
758
759procedure TCPRSDialogComponent.SetRequiredField(Value: boolean);
760begin
761 FRequiredField := Value;
762end;
763
764procedure TCPRSDialogComponent.SetSRBreak(Value: boolean);
765begin
766 FSRBreak := Value;
767end;
768
769{ TVitalEdit }
770
771constructor TVitalEdit.Create(AOwner: TComponent);
772begin
773 inherited Create(AOwner);
774 FCPRSDialogInfo := TCPRSDialogComponent.Create(Self, 'Vital Edit','Vital');
775end;
776
777destructor TVitalEdit.Destroy;
778begin
779 FCPRSDialogInfo := nil;
780 inherited;
781end;
782
783initialization
784
785finalization
786 ScreenReaderSystem_Clear;
787
788end.
Note: See TracBrowser for help on using the repository browser.