home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / delphi / kompon / d6 / YPPARSER.ZIP / DrawX / XDraw_TLB.pas < prev    next >
Pascal/Delphi Source File  |  2002-04-07  |  17KB  |  392 lines

  1. unit XDraw_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                    
  5. // -------                                                                    
  6. // The types declared in this file were generated from data read from a       
  7. // Type Library. If this type library is explicitly or indirectly (via        
  8. // another type library referring to this type library) re-imported, or the   
  9. // 'Refresh' command of the Type Library Editor activated while editing the   
  10. // Type Library, the contents of this file will be regenerated and all        
  11. // manual modifications will be lost.                                         
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.130  $
  15. // File generated on 07.04.2002 13:32:55 from Type Library described below.
  16.  
  17. // ************************************************************************  //
  18. // Type Lib: C:\Program Files\Borland\Delphi6\Projects\Programs\DrawX\XDraw.tlb (1)
  19. // LIBID: {35AA254A-9AF5-4134-8516-9DBFCC933745}
  20. // LCID: 0
  21. // Helpfile: 
  22. // DepndLst: 
  23. //   (1) v2.0 stdole, (C:\WINDOWS\SYSTEM\stdole2.tlb)
  24. //   (2) v4.0 StdVCL, (C:\WINDOWS\SYSTEM\STDVCL40.DLL)
  25. // ************************************************************************ //
  26. {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
  27. {$WARN SYMBOL_PLATFORM OFF}
  28. {$WRITEABLECONST ON}
  29.  
  30. interface
  31.  
  32. uses ActiveX, Classes, Graphics, OleCtrls, StdVCL, Variants, Windows;
  33.   
  34.  
  35.  
  36. // *********************************************************************//
  37. // GUIDS declared in the TypeLibrary. Following prefixes are used:        
  38. //   Type Libraries     : LIBID_xxxx                                      
  39. //   CoClasses          : CLASS_xxxx                                      
  40. //   DISPInterfaces     : DIID_xxxx                                       
  41. //   Non-DISP interfaces: IID_xxxx                                        
  42. // *********************************************************************//
  43. const
  44.   // TypeLibrary Major and minor versions
  45.   XDrawMajorVersion = 1;
  46.   XDrawMinorVersion = 0;
  47.  
  48.   LIBID_XDraw: TGUID = '{35AA254A-9AF5-4134-8516-9DBFCC933745}';
  49.  
  50.   IID_IDrawX: TGUID = '{3A528B29-87DB-42AD-9DDF-1C1A9A24A40D}';
  51.   DIID_IDrawXEvents: TGUID = '{73A35D31-D73B-43E3-8627-A53B572BBE22}';
  52.   CLASS_DrawX: TGUID = '{C0F9849B-9E8E-47DB-8C9F-437EC7B1A8F0}';
  53.  
  54. // *********************************************************************//
  55. // Declaration of Enumerations defined in Type Library                    
  56. // *********************************************************************//
  57. // Constants for enum TxActiveFormBorderStyle
  58. type
  59.   TxActiveFormBorderStyle = TOleEnum;
  60. const
  61.   afbNone = $00000000;
  62.   afbSingle = $00000001;
  63.   afbSunken = $00000002;
  64.   afbRaised = $00000003;
  65.  
  66. // Constants for enum TxPrintScale
  67. type
  68.   TxPrintScale = TOleEnum;
  69. const
  70.   poNone = $00000000;
  71.   poProportional = $00000001;
  72.   poPrintToFit = $00000002;
  73.  
  74. // Constants for enum TxMouseButton
  75. type
  76.   TxMouseButton = TOleEnum;
  77. const
  78.   mbLeft = $00000000;
  79.   mbRight = $00000001;
  80.   mbMiddle = $00000002;
  81.  
  82. // Constants for enum TxHelpType
  83. type
  84.   TxHelpType = TOleEnum;
  85. const
  86.   htKeyword = $00000000;
  87.   htContext = $00000001;
  88.  
  89. type
  90.  
  91. // *********************************************************************//
  92. // Forward declaration of types defined in TypeLibrary                    
  93. // *********************************************************************//
  94.   IDrawX = interface;
  95.   IDrawXDisp = dispinterface;
  96.   IDrawXEvents = dispinterface;
  97.  
  98. // *********************************************************************//
  99. // Declaration of CoClasses defined in Type Library                       
  100. // (NOTE: Here we map each CoClass to its Default Interface)              
  101. // *********************************************************************//
  102.   DrawX = IDrawX;
  103.  
  104.  
  105. // *********************************************************************//
  106. // Declaration of structures, unions and aliases.                         
  107. // *********************************************************************//
  108.   PPUserType1 = ^IFontDisp; {*}
  109.  
  110.  
  111. // *********************************************************************//
  112. // Interface: IDrawX
  113. // Flags:     (4416) Dual OleAutomation Dispatchable
  114. // GUID:      {3A528B29-87DB-42AD-9DDF-1C1A9A24A40D}
  115. // *********************************************************************//
  116.   IDrawX = interface(IDispatch)
  117.     ['{3A528B29-87DB-42AD-9DDF-1C1A9A24A40D}']
  118.     function  Get_Visible: WordBool; safecall;
  119.     procedure Set_Visible(Value: WordBool); safecall;
  120.     function  Get_AutoScroll: WordBool; safecall;
  121.     procedure Set_AutoScroll(Value: WordBool); safecall;
  122.     function  Get_AutoSize: WordBool; safecall;
  123.     procedure Set_AutoSize(Value: WordBool); safecall;
  124.     function  Get_AxBorderStyle: TxActiveFormBorderStyle; safecall;
  125.     procedure Set_AxBorderStyle(Value: TxActiveFormBorderStyle); safecall;
  126.     function  Get_Caption: WideString; safecall;
  127.     procedure Set_Caption(const Value: WideString); safecall;
  128.     function  Get_Color: OLE_COLOR; safecall;
  129.     procedure Set_Color(Value: OLE_COLOR); safecall;
  130.     function  Get_Font: IFontDisp; safecall;
  131.     procedure Set_Font(const Value: IFontDisp); safecall;
  132.     procedure _Set_Font(var Value: IFontDisp); safecall;
  133.     function  Get_KeyPreview: WordBool; safecall;
  134.     procedure Set_KeyPreview(Value: WordBool); safecall;
  135.     function  Get_PixelsPerInch: Integer; safecall;
  136.     procedure Set_PixelsPerInch(Value: Integer); safecall;
  137.     function  Get_PrintScale: TxPrintScale; safecall;
  138.     procedure Set_PrintScale(Value: TxPrintScale); safecall;
  139.     function  Get_Scaled: WordBool; safecall;
  140.     procedure Set_Scaled(Value: WordBool); safecall;
  141.     function  Get_Active: WordBool; safecall;
  142.     function  Get_DropTarget: WordBool; safecall;
  143.     procedure Set_DropTarget(Value: WordBool); safecall;
  144.     function  Get_HelpFile: WideString; safecall;
  145.     procedure Set_HelpFile(const Value: WideString); safecall;
  146.     function  Get_DoubleBuffered: WordBool; safecall;
  147.     procedure Set_DoubleBuffered(Value: WordBool); safecall;
  148.     function  Get_AlignDisabled: WordBool; safecall;
  149.     function  Get_VisibleDockClientCount: Integer; safecall;
  150.     function  Get_Enabled: WordBool; safecall;
  151.     procedure Set_Enabled(Value: WordBool); safecall;
  152.     function  Get_Cursor: Smallint; safecall;
  153.     procedure Set_Cursor(Value: Smallint); safecall;
  154.     function  Get_HelpType: TxHelpType; safecall;
  155.     procedure Set_HelpType(Value: TxHelpType); safecall;
  156.     function  Get_HelpKeyword: WideString; safecall;
  157.     procedure Set_HelpKeyword(const Value: WideString); safecall;
  158.     procedure AboutBox; safecall;
  159.     function  Get_Lines: IStrings; safecall;
  160.     procedure Set_Lines(const Value: IStrings); safecall;
  161.     procedure Draw; safecall;
  162.     property Visible: WordBool read Get_Visible write Set_Visible;
  163.     property AutoScroll: WordBool read Get_AutoScroll write Set_AutoScroll;
  164.     property AutoSize: WordBool read Get_AutoSize write Set_AutoSize;
  165.     property AxBorderStyle: TxActiveFormBorderStyle read Get_AxBorderStyle write Set_AxBorderStyle;
  166.     property Caption: WideString read Get_Caption write Set_Caption;
  167.     property Color: OLE_COLOR read Get_Color write Set_Color;
  168.     property Font: IFontDisp read Get_Font write Set_Font;
  169.     property KeyPreview: WordBool read Get_KeyPreview write Set_KeyPreview;
  170.     property PixelsPerInch: Integer read Get_PixelsPerInch write Set_PixelsPerInch;
  171.     property PrintScale: TxPrintScale read Get_PrintScale write Set_PrintScale;
  172.     property Scaled: WordBool read Get_Scaled write Set_Scaled;
  173.     property Active: WordBool read Get_Active;
  174.     property DropTarget: WordBool read Get_DropTarget write Set_DropTarget;
  175.     property HelpFile: WideString read Get_HelpFile write Set_HelpFile;
  176.     property DoubleBuffered: WordBool read Get_DoubleBuffered write Set_DoubleBuffered;
  177.     property AlignDisabled: WordBool read Get_AlignDisabled;
  178.     property VisibleDockClientCount: Integer read Get_VisibleDockClientCount;
  179.     property Enabled: WordBool read Get_Enabled write Set_Enabled;
  180.     property Cursor: Smallint read Get_Cursor write Set_Cursor;
  181.     property HelpType: TxHelpType read Get_HelpType write Set_HelpType;
  182.     property HelpKeyword: WideString read Get_HelpKeyword write Set_HelpKeyword;
  183.     property Lines: IStrings read Get_Lines write Set_Lines;
  184.   end;
  185.  
  186. // *********************************************************************//
  187. // DispIntf:  IDrawXDisp
  188. // Flags:     (4416) Dual OleAutomation Dispatchable
  189. // GUID:      {3A528B29-87DB-42AD-9DDF-1C1A9A24A40D}
  190. // *********************************************************************//
  191.   IDrawXDisp = dispinterface
  192.     ['{3A528B29-87DB-42AD-9DDF-1C1A9A24A40D}']
  193.     property Visible: WordBool dispid 1;
  194.     property AutoScroll: WordBool dispid 2;
  195.     property AutoSize: WordBool dispid 3;
  196.     property AxBorderStyle: TxActiveFormBorderStyle dispid 4;
  197.     property Caption: WideString dispid -518;
  198.     property Color: OLE_COLOR dispid -501;
  199.     property Font: IFontDisp dispid -512;
  200.     property KeyPreview: WordBool dispid 5;
  201.     property PixelsPerInch: Integer dispid 6;
  202.     property PrintScale: TxPrintScale dispid 7;
  203.     property Scaled: WordBool dispid 8;
  204.     property Active: WordBool readonly dispid 9;
  205.     property DropTarget: WordBool dispid 10;
  206.     property HelpFile: WideString dispid 11;
  207.     property DoubleBuffered: WordBool dispid 12;
  208.     property AlignDisabled: WordBool readonly dispid 13;
  209.     property VisibleDockClientCount: Integer readonly dispid 14;
  210.     property Enabled: WordBool dispid -514;
  211.     property Cursor: Smallint dispid 15;
  212.     property HelpType: TxHelpType dispid 16;
  213.     property HelpKeyword: WideString dispid 17;
  214.     procedure AboutBox; dispid -552;
  215.     property Lines: IStrings dispid 18;
  216.     procedure Draw; dispid 19;
  217.   end;
  218.  
  219. // *********************************************************************//
  220. // DispIntf:  IDrawXEvents
  221. // Flags:     (4096) Dispatchable
  222. // GUID:      {73A35D31-D73B-43E3-8627-A53B572BBE22}
  223. // *********************************************************************//
  224.   IDrawXEvents = dispinterface
  225.     ['{73A35D31-D73B-43E3-8627-A53B572BBE22}']
  226.     procedure OnActivate; dispid 1;
  227.     procedure OnClick; dispid 2;
  228.     procedure OnCreate; dispid 3;
  229.     procedure OnDblClick; dispid 5;
  230.     procedure OnDestroy; dispid 6;
  231.     procedure OnDeactivate; dispid 7;
  232.     procedure OnKeyPress(var Key: Smallint); dispid 11;
  233.     procedure OnPaint; dispid 16;
  234.   end;
  235.  
  236.  
  237. // *********************************************************************//
  238. // OLE Control Proxy class declaration
  239. // Control Name     : TDrawX
  240. // Help String      : DrawX Control
  241. // Default Interface: IDrawX
  242. // Def. Intf. DISP? : No
  243. // Event   Interface: IDrawXEvents
  244. // TypeFlags        : (34) CanCreate Control
  245. // *********************************************************************//
  246.   TDrawXOnKeyPress = procedure(Sender: TObject; var Key: Smallint) of object;
  247.  
  248.   TDrawX = class(TOleControl)
  249.   private
  250.     FOnActivate: TNotifyEvent;
  251.     FOnClick: TNotifyEvent;
  252.     FOnCreate: TNotifyEvent;
  253.     FOnDblClick: TNotifyEvent;
  254.     FOnDestroy: TNotifyEvent;
  255.     FOnDeactivate: TNotifyEvent;
  256.     FOnKeyPress: TDrawXOnKeyPress;
  257.     FOnPaint: TNotifyEvent;
  258.     FIntf: IDrawX;
  259.     function  GetControlInterface: IDrawX;
  260.   protected
  261.     procedure CreateControl;
  262.     procedure InitControlData; override;
  263.     function  Get_Lines: IStrings;
  264.     procedure Set_Lines(const Value: IStrings);
  265.   public
  266.     procedure AboutBox;
  267.     procedure Draw;
  268.     property  ControlInterface: IDrawX read GetControlInterface;
  269.     property  DefaultInterface: IDrawX read GetControlInterface;
  270.     property Visible: WordBool index 1 read GetWordBoolProp write SetWordBoolProp;
  271.     property Active: WordBool index 9 read GetWordBoolProp;
  272.     property DropTarget: WordBool index 10 read GetWordBoolProp write SetWordBoolProp;
  273.     property HelpFile: WideString index 11 read GetWideStringProp write SetWideStringProp;
  274.     property DoubleBuffered: WordBool index 12 read GetWordBoolProp write SetWordBoolProp;
  275.     property AlignDisabled: WordBool index 13 read GetWordBoolProp;
  276.     property VisibleDockClientCount: Integer index 14 read GetIntegerProp;
  277.     property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp;
  278.   published
  279.     property  ParentColor;
  280.     property  ParentFont;
  281.     property  Align;
  282.     property  DragCursor;
  283.     property  DragMode;
  284.     property  ParentShowHint;
  285.     property  PopupMenu;
  286.     property  ShowHint;
  287.     property  TabOrder;
  288.     property  OnDragDrop;
  289.     property  OnDragOver;
  290.     property  OnEndDrag;
  291.     property  OnEnter;
  292.     property  OnExit;
  293.     property  OnStartDrag;
  294.     property AutoScroll: WordBool index 2 read GetWordBoolProp write SetWordBoolProp stored False;
  295.     property AutoSize: WordBool index 3 read GetWordBoolProp write SetWordBoolProp stored False;
  296.     property AxBorderStyle: TOleEnum index 4 read GetTOleEnumProp write SetTOleEnumProp stored False;
  297.     property Caption: WideString index -518 read GetWideStringProp write SetWideStringProp stored False;
  298.     property Color: TColor index -501 read GetTColorProp write SetTColorProp stored False;
  299.     property Font: TFont index -512 read GetTFontProp write _SetTFontProp stored False;
  300.     property KeyPreview: WordBool index 5 read GetWordBoolProp write SetWordBoolProp stored False;
  301.     property PixelsPerInch: Integer index 6 read GetIntegerProp write SetIntegerProp stored False;
  302.     property PrintScale: TOleEnum index 7 read GetTOleEnumProp write SetTOleEnumProp stored False;
  303.     property Scaled: WordBool index 8 read GetWordBoolProp write SetWordBoolProp stored False;
  304.     property Cursor: Smallint index 15 read GetSmallintProp write SetSmallintProp stored False;
  305.     property HelpType: TOleEnum index 16 read GetTOleEnumProp write SetTOleEnumProp stored False;
  306.     property HelpKeyword: WideString index 17 read GetWideStringProp write SetWideStringProp stored False;
  307.     property Lines: IStrings read Get_Lines write Set_Lines stored False;
  308.     property OnActivate: TNotifyEvent read FOnActivate write FOnActivate;
  309.     property OnClick: TNotifyEvent read FOnClick write FOnClick;
  310.     property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;
  311.     property OnDblClick: TNotifyEvent read FOnDblClick write FOnDblClick;
  312.     property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
  313.     property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate;
  314.     property OnKeyPress: TDrawXOnKeyPress read FOnKeyPress write FOnKeyPress;
  315.     property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;
  316.   end;
  317.  
  318. procedure Register;
  319.  
  320. resourcestring
  321.   dtlServerPage = 'Servers';
  322.  
  323. implementation
  324.  
  325. uses ComObj;
  326.  
  327. procedure TDrawX.InitControlData;
  328. const
  329.   CEventDispIDs: array [0..7] of DWORD = (
  330.     $00000001, $00000002, $00000003, $00000005, $00000006, $00000007,
  331.     $0000000B, $00000010);
  332.   CTFontIDs: array [0..0] of DWORD = (
  333.     $FFFFFE00);
  334.   CControlData: TControlData2 = (
  335.     ClassID: '{C0F9849B-9E8E-47DB-8C9F-437EC7B1A8F0}';
  336.     EventIID: '{73A35D31-D73B-43E3-8627-A53B572BBE22}';
  337.     EventCount: 8;
  338.     EventDispIDs: @CEventDispIDs;
  339.     LicenseKey: nil (*HR:$00000000*);
  340.     Flags: $0000001D;
  341.     Version: 401;
  342.     FontCount: 1;
  343.     FontIDs: @CTFontIDs);
  344. begin
  345.   ControlData := @CControlData;
  346.   TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnActivate) - Cardinal(Self);
  347. end;
  348.  
  349. procedure TDrawX.CreateControl;
  350.  
  351.   procedure DoCreate;
  352.   begin
  353.     FIntf := IUnknown(OleObject) as IDrawX;
  354.   end;
  355.  
  356. begin
  357.   if FIntf = nil then DoCreate;
  358. end;
  359.  
  360. function TDrawX.GetControlInterface: IDrawX;
  361. begin
  362.   CreateControl;
  363.   Result := FIntf;
  364. end;
  365.  
  366. function  TDrawX.Get_Lines: IStrings;
  367. begin
  368.   Result := DefaultInterface.Lines;
  369. end;
  370.  
  371. procedure TDrawX.Set_Lines(const Value: IStrings);
  372. begin
  373.   DefaultInterface.Lines := Value;
  374. end;
  375.  
  376. procedure TDrawX.AboutBox;
  377. begin
  378.   DefaultInterface.AboutBox;
  379. end;
  380.  
  381. procedure TDrawX.Draw;
  382. begin
  383.   DefaultInterface.Draw;
  384. end;
  385.  
  386. procedure Register;
  387. begin
  388.   RegisterComponents('ActiveX',[TDrawX]);
  389. end;
  390.  
  391. end.
  392.