home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / DELPHI / ORPHTR / OVCREG.PAS < prev    next >
Pascal/Delphi Source File  |  1995-03-29  |  6KB  |  214 lines

  1. {$B-} {Complete Boolean Evaluation}
  2. {$G+} {286 Instructions}
  3. {$I+} {Input/Output-Checking}
  4. {$N+} {Numeric Coprocessor}
  5. {$P+} {Open Parameters}
  6. {$T-} {Typed @ Operator}
  7. {$W-} {Windows Stack Frame}
  8. {$X+} {Extended Syntax}
  9.  
  10. {$C MOVEABLE,DEMANDLOAD,DISCARDABLE}
  11.  
  12. {*********************************************************}
  13. {*                   OVCREG.PAS 1.00                     *}
  14. {*         Copyright (c) TurboPower Software 1995        *}
  15. {*                 All rights reserved.                  *}
  16. {*********************************************************}
  17.  
  18. {$R OVCREG.RES}
  19.  
  20. unit OvcReg;
  21.  
  22. interface
  23.  
  24. uses
  25.   WinTypes, DsgnIntf, Classes;
  26.  
  27. type
  28.   {property editor for the virtual listbox header string property}
  29.   THeaderProperty = class(TCaptionProperty);
  30.  
  31. type
  32.   {property editor for the timer pool}
  33.   TOvcTimerPoolEditor = class(TDefaultEditor)
  34.   private
  35.   protected
  36.     procedure EditProperty(PropertyEditor : TPropertyEditor;
  37.               var Continue, FreeEditor : Boolean);
  38.       override;
  39.   public
  40.   end;
  41.  
  42. type
  43.   {component editor for the transfer component}
  44.   TOvcTransferEditor = class(TDefaultEditor)
  45.   private
  46.   protected
  47.   public
  48.     procedure ExecuteVerb(Index : Integer);
  49.       override;
  50.     function GetVerb(Index : Integer): string;
  51.       override;
  52.     function GetVerbCount : Integer;
  53.       override;
  54.   end;
  55.  
  56.  
  57.  
  58. procedure Register;
  59.  
  60. implementation
  61.  
  62. uses
  63.   WinProcs, SysUtils, Dialogs, Forms, Graphics,
  64.   OvcEf,     {base entry field class--needed for sf, pf, nf, and ae}
  65.   OvcSf,     {simple field component}
  66.   OvcSfPE,   {simple mask property editor form}
  67.   OvcPf,     {picture field component}
  68.   OvcPfPE,   {picture mask property editor form}
  69.   OvcNf,     {numeric entry field component}
  70.   OvcNfPE,   {numeric mask property editor}
  71.   OvcAe,     {array editors}
  72.   OvcVlb,    {virtual list box component}
  73.   OvcNbk,    {notebook component}
  74.   OvcNbkP0,  {property editor for the notebook pages}
  75.   OvcCal,    {calendar component}
  76.   OvcViewr,  {viewer and text file viewer components}
  77.   OvcMeter,  {meter component}
  78.   OvcSc,     {spin components}
  79.   OvcTimer,  {timer pool}
  80.   OvcRLbl,   {rotated label component}
  81.   OvcEdit,   {editor and text editor components}
  82.   {!!OvcXfer,}   {form data transfer component}
  83.   OvcFxFnt,  {fixed font class}
  84.   OvcFxFPE,  {fixed font property editor}
  85.   {!!OvcDbSf,}
  86.   OvcVer, OvcBase, OvcCmd, OvcCmdP0;  {all required}
  87.  
  88.  
  89. {*** TOvcTimerPoolEditor ***}
  90.  
  91. procedure TOvcTimerPoolEditor.EditProperty(PropertyEditor : TPropertyEditor;
  92.           var Continue, FreeEditor : Boolean);
  93. var
  94.   PropName : string;
  95. begin
  96.   PropName := PropertyEditor.GetName;
  97.   if CompareText(PropName, 'ONALLTRIGGERS') = 0 then begin
  98.     PropertyEditor.Edit;
  99.     Continue := False;
  100.   end;
  101. end;
  102.  
  103.  
  104. {*** TOvcTransferEditor ***}
  105.  
  106. procedure TOvcTransferEditor.ExecuteVerb(Index: Integer);
  107. begin
  108.   {!!}
  109. end;
  110.  
  111. function TOvcTransferEditor.GetVerb(Index: Integer): string;
  112. begin
  113.   Result := 'Generate Transfer Buffer';
  114. end;
  115.  
  116. function TOvcTransferEditor.GetVerbCount: Integer;
  117. begin
  118.   Result := 1;
  119. end;
  120.  
  121.  
  122. {*** component registration ***}
  123.  
  124. procedure Register;
  125. begin
  126.   {register property editor for the controller}
  127.   RegisterPropertyEditor(
  128.     TypeInfo(TCommandProcessor), nil, '', TOvcCommandProcessorProperty);
  129.  
  130.   {register property editor for the simple field's mask property}
  131.   RegisterPropertyEditor(
  132.     TypeInfo(Char), TOvcSimpleField, 'PictureMask', TSimpleMaskProperty);
  133.  
  134.   {register property editor for the picture field's mask property}
  135.   RegisterPropertyEditor(
  136.     TypeInfo(string), TOvcPictureField, 'PictureMask', TPictureMaskProperty);
  137.  
  138.   {register property editor for the numeric field's mask property}
  139.   RegisterPropertyEditor(
  140.     TypeInfo(string), TOvcNumericField, 'PictureMask', TNumericMaskProperty);
  141.  
  142.   {register property editor for the header of the virtual list box}
  143.   RegisterPropertyEditor(
  144.     TypeInfo(string), nil, 'Header', THeaderProperty);
  145.  
  146.   {register property editors and component editor for the notebook component}
  147.   RegisterPropertyEditor(
  148.     TypeInfo(string), TOvcNotebook, 'ActivePageName', TOvcTabPageNameProperty);
  149.   RegisterPropertyEditor(
  150.     TypeInfo(TStrings), TOvcNotebook, 'Pages', TOvcTabPageListProperty);
  151.  
  152.   {register component editor for the notebook component}
  153.   RegisterComponentEditor(TOvcNotebook, TOvcNotebookEditor);
  154.  
  155.   {register component editor for the timer pool component}
  156.   RegisterComponentEditor(TOvcTimerPool, TOvcTimerPoolEditor);
  157.  
  158.   {register property editors for the array editors}
  159.   RegisterPropertyEditor(
  160.     TypeInfo(Char), TOvcSimpleArrayEditor, 'PictureMask', TSimpleMaskProperty);
  161.   RegisterPropertyEditor(
  162.     TypeInfo(string), TOvcPictureArrayEditor, 'PictureMask', TPictureMaskProperty);
  163.   RegisterPropertyEditor(
  164.     TypeInfo(string), TOvcNumericArrayEditor, 'PictureMask', TNumericMaskProperty);
  165.  
  166. (*!!
  167.   {register property editors for the data aware entry fields}
  168.   RegisterPropertyEditor(
  169.     TypeInfo(Char), TOvcDbSimpleField, 'PictureMask', TSimpleMaskProperty);
  170. *)
  171.  
  172.   {register property editors for the fixed font class}
  173.   RegisterPropertyEditor(
  174.     TypeInfo(string), TOvcFixedFont, 'Name', TOvcFixFontNameProperty);
  175.   RegisterPropertyEditor(
  176.     TypeInfo(TOvcFixedFont), nil, '', TOvcFixFontProperty);
  177.  
  178. (*!!
  179.   {register component editor for the transfer component}
  180.   RegisterComponentEditor(TOvcTransfer, TOvcTransferEditor);
  181. *)
  182.  
  183.   {provide compatibility with eariler label class name}
  184.   RegisterClassAlias(TOvcRotatedLabel, 'TOvcRLabel');
  185.  
  186.   {register our components}
  187.   RegisterComponents(ProductName,
  188.     [TOvcSimpleField,
  189.      TOvcPictureField,
  190.      TOvcNumericField,
  191.      TOvcSimpleArrayEditor,
  192.      TOvcPictureArrayEditor,
  193.      TOvcNumericArrayEditor,
  194.      TOvcVirtualListbox,
  195.      TOvcEditor,
  196.      TOvcTextFileEditor,
  197.      TOvcFileViewer,
  198.      TOvcTextFileViewer,
  199.      TOvcNotebook,
  200.      TOvcTimerPool,
  201.      TOvcRotatedLabel,
  202.      TOvcCalendar,
  203.      TOvcMeter,
  204.      TOvcSpinner,
  205.      TOvcFourWaySpinner,
  206.      TOvcStarSpinner,
  207.      {!!TOvcDbSimpleField,}
  208.      {!!TOvcTransfer,}
  209.      TOvcController
  210.     ]);
  211. end;
  212.  
  213. end.
  214.