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

  1. unit XGraph_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 1:17:04 from Type Library described below.
  16.  
  17. // ************************************************************************  //
  18. // Type Lib: C:\Program Files\Borland\Delphi6\Projects\Programs\GraphX\XGraph.tlb (1)
  19. // LIBID: {1237B507-B4EF-409F-8F76-4AEE9FAA063E}
  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.   XGraphMajorVersion = 1;
  46.   XGraphMinorVersion = 0;
  47.  
  48.   LIBID_XGraph: TGUID = '{1237B507-B4EF-409F-8F76-4AEE9FAA063E}';
  49.  
  50.   IID_IGraphX: TGUID = '{DB417CEF-4155-40BE-B920-FE408EFE1367}';
  51.   DIID_IGraphXEvents: TGUID = '{1CE19F3B-0E1B-415D-B9C2-89A4882CCAAC}';
  52.   CLASS_GraphX: TGUID = '{2E8636E6-9564-40B8-9505-6F8F77D5743D}';
  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.   IGraphX = interface;
  95.   IGraphXDisp = dispinterface;
  96.   IGraphXEvents = dispinterface;
  97.  
  98. // *********************************************************************//
  99. // Declaration of CoClasses defined in Type Library                       
  100. // (NOTE: Here we map each CoClass to its Default Interface)              
  101. // *********************************************************************//
  102.   GraphX = IGraphX;
  103.  
  104.  
  105. // *********************************************************************//
  106. // Declaration of structures, unions and aliases.                         
  107. // *********************************************************************//
  108.   PPUserType1 = ^IFontDisp; {*}
  109.  
  110.  
  111. // *********************************************************************//
  112. // Interface: IGraphX
  113. // Flags:     (4416) Dual OleAutomation Dispatchable
  114. // GUID:      {DB417CEF-4155-40BE-B920-FE408EFE1367}
  115. // *********************************************************************//
  116.   IGraphX = interface(IDispatch)
  117.     ['{DB417CEF-4155-40BE-B920-FE408EFE1367}']
  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_Detailization: Integer; safecall;
  160.     procedure Set_Detailization(Value: Integer); safecall;
  161.     function  Get_XMaxValue: Integer; safecall;
  162.     procedure Set_XMaxValue(Value: Integer); safecall;
  163.     function  Get_YMaxValue: Integer; safecall;
  164.     procedure Set_YMaxValue(Value: Integer); safecall;
  165.     function  Get_PenWidth: Integer; safecall;
  166.     procedure Set_PenWidth(Value: Integer); safecall;
  167.     function  Get_Text: WideString; safecall;
  168.     procedure Set_Text(const Value: WideString); safecall;
  169.     property Visible: WordBool read Get_Visible write Set_Visible;
  170.     property AutoScroll: WordBool read Get_AutoScroll write Set_AutoScroll;
  171.     property AutoSize: WordBool read Get_AutoSize write Set_AutoSize;
  172.     property AxBorderStyle: TxActiveFormBorderStyle read Get_AxBorderStyle write Set_AxBorderStyle;
  173.     property Caption: WideString read Get_Caption write Set_Caption;
  174.     property Color: OLE_COLOR read Get_Color write Set_Color;
  175.     property Font: IFontDisp read Get_Font write Set_Font;
  176.     property KeyPreview: WordBool read Get_KeyPreview write Set_KeyPreview;
  177.     property PixelsPerInch: Integer read Get_PixelsPerInch write Set_PixelsPerInch;
  178.     property PrintScale: TxPrintScale read Get_PrintScale write Set_PrintScale;
  179.     property Scaled: WordBool read Get_Scaled write Set_Scaled;
  180.     property Active: WordBool read Get_Active;
  181.     property DropTarget: WordBool read Get_DropTarget write Set_DropTarget;
  182.     property HelpFile: WideString read Get_HelpFile write Set_HelpFile;
  183.     property DoubleBuffered: WordBool read Get_DoubleBuffered write Set_DoubleBuffered;
  184.     property AlignDisabled: WordBool read Get_AlignDisabled;
  185.     property VisibleDockClientCount: Integer read Get_VisibleDockClientCount;
  186.     property Enabled: WordBool read Get_Enabled write Set_Enabled;
  187.     property Cursor: Smallint read Get_Cursor write Set_Cursor;
  188.     property HelpType: TxHelpType read Get_HelpType write Set_HelpType;
  189.     property HelpKeyword: WideString read Get_HelpKeyword write Set_HelpKeyword;
  190.     property Detailization: Integer read Get_Detailization write Set_Detailization;
  191.     property XMaxValue: Integer read Get_XMaxValue write Set_XMaxValue;
  192.     property YMaxValue: Integer read Get_YMaxValue write Set_YMaxValue;
  193.     property PenWidth: Integer read Get_PenWidth write Set_PenWidth;
  194.     property Text: WideString read Get_Text write Set_Text;
  195.   end;
  196.  
  197. // *********************************************************************//
  198. // DispIntf:  IGraphXDisp
  199. // Flags:     (4416) Dual OleAutomation Dispatchable
  200. // GUID:      {DB417CEF-4155-40BE-B920-FE408EFE1367}
  201. // *********************************************************************//
  202.   IGraphXDisp = dispinterface
  203.     ['{DB417CEF-4155-40BE-B920-FE408EFE1367}']
  204.     property Visible: WordBool dispid 1;
  205.     property AutoScroll: WordBool dispid 2;
  206.     property AutoSize: WordBool dispid 3;
  207.     property AxBorderStyle: TxActiveFormBorderStyle dispid 4;
  208.     property Caption: WideString dispid -518;
  209.     property Color: OLE_COLOR dispid -501;
  210.     property Font: IFontDisp dispid -512;
  211.     property KeyPreview: WordBool dispid 5;
  212.     property PixelsPerInch: Integer dispid 6;
  213.     property PrintScale: TxPrintScale dispid 7;
  214.     property Scaled: WordBool dispid 8;
  215.     property Active: WordBool readonly dispid 9;
  216.     property DropTarget: WordBool dispid 10;
  217.     property HelpFile: WideString dispid 11;
  218.     property DoubleBuffered: WordBool dispid 12;
  219.     property AlignDisabled: WordBool readonly dispid 13;
  220.     property VisibleDockClientCount: Integer readonly dispid 14;
  221.     property Enabled: WordBool dispid -514;
  222.     property Cursor: Smallint dispid 15;
  223.     property HelpType: TxHelpType dispid 16;
  224.     property HelpKeyword: WideString dispid 17;
  225.     procedure AboutBox; dispid -552;
  226.     property Detailization: Integer dispid 18;
  227.     property XMaxValue: Integer dispid 19;
  228.     property YMaxValue: Integer dispid 20;
  229.     property PenWidth: Integer dispid 21;
  230.     property Text: WideString dispid 22;
  231.   end;
  232.  
  233. // *********************************************************************//
  234. // DispIntf:  IGraphXEvents
  235. // Flags:     (4096) Dispatchable
  236. // GUID:      {1CE19F3B-0E1B-415D-B9C2-89A4882CCAAC}
  237. // *********************************************************************//
  238.   IGraphXEvents = dispinterface
  239.     ['{1CE19F3B-0E1B-415D-B9C2-89A4882CCAAC}']
  240.     procedure OnActivate; dispid 1;
  241.     procedure OnClick; dispid 2;
  242.     procedure OnCreate; dispid 3;
  243.     procedure OnDblClick; dispid 5;
  244.     procedure OnDestroy; dispid 6;
  245.     procedure OnDeactivate; dispid 7;
  246.     procedure OnKeyPress(var Key: Smallint); dispid 11;
  247.     procedure OnPaint; dispid 16;
  248.   end;
  249.  
  250.  
  251. // *********************************************************************//
  252. // OLE Control Proxy class declaration
  253. // Control Name     : TGraphX
  254. // Help String      : GraphX Control
  255. // Default Interface: IGraphX
  256. // Def. Intf. DISP? : No
  257. // Event   Interface: IGraphXEvents
  258. // TypeFlags        : (34) CanCreate Control
  259. // *********************************************************************//
  260.   TGraphXOnKeyPress = procedure(Sender: TObject; var Key: Smallint) of object;
  261.  
  262.   TGraphX = class(TOleControl)
  263.   private
  264.     FOnActivate: TNotifyEvent;
  265.     FOnClick: TNotifyEvent;
  266.     FOnCreate: TNotifyEvent;
  267.     FOnDblClick: TNotifyEvent;
  268.     FOnDestroy: TNotifyEvent;
  269.     FOnDeactivate: TNotifyEvent;
  270.     FOnKeyPress: TGraphXOnKeyPress;
  271.     FOnPaint: TNotifyEvent;
  272.     FIntf: IGraphX;
  273.     function  GetControlInterface: IGraphX;
  274.   protected
  275.     procedure CreateControl;
  276.     procedure InitControlData; override;
  277.   public
  278.     procedure AboutBox;
  279.     property  ControlInterface: IGraphX read GetControlInterface;
  280.     property  DefaultInterface: IGraphX read GetControlInterface;
  281.     property Visible: WordBool index 1 read GetWordBoolProp write SetWordBoolProp;
  282.     property Active: WordBool index 9 read GetWordBoolProp;
  283.     property DropTarget: WordBool index 10 read GetWordBoolProp write SetWordBoolProp;
  284.     property HelpFile: WideString index 11 read GetWideStringProp write SetWideStringProp;
  285.     property DoubleBuffered: WordBool index 12 read GetWordBoolProp write SetWordBoolProp;
  286.     property AlignDisabled: WordBool index 13 read GetWordBoolProp;
  287.     property VisibleDockClientCount: Integer index 14 read GetIntegerProp;
  288.     property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp;
  289.   published
  290.     property AutoScroll: WordBool index 2 read GetWordBoolProp write SetWordBoolProp stored False;
  291.     property AutoSize: WordBool index 3 read GetWordBoolProp write SetWordBoolProp stored False;
  292.     property AxBorderStyle: TOleEnum index 4 read GetTOleEnumProp write SetTOleEnumProp stored False;
  293.     property Caption: WideString index -518 read GetWideStringProp write SetWideStringProp stored False;
  294.     property Color: TColor index -501 read GetTColorProp write SetTColorProp stored False;
  295.     property Font: TFont index -512 read GetTFontProp write _SetTFontProp stored False;
  296.     property KeyPreview: WordBool index 5 read GetWordBoolProp write SetWordBoolProp stored False;
  297.     property PixelsPerInch: Integer index 6 read GetIntegerProp write SetIntegerProp stored False;
  298.     property PrintScale: TOleEnum index 7 read GetTOleEnumProp write SetTOleEnumProp stored False;
  299.     property Scaled: WordBool index 8 read GetWordBoolProp write SetWordBoolProp stored False;
  300.     property Cursor: Smallint index 15 read GetSmallintProp write SetSmallintProp stored False;
  301.     property HelpType: TOleEnum index 16 read GetTOleEnumProp write SetTOleEnumProp stored False;
  302.     property HelpKeyword: WideString index 17 read GetWideStringProp write SetWideStringProp stored False;
  303.     property Detailization: Integer index 18 read GetIntegerProp write SetIntegerProp stored False;
  304.     property XMaxValue: Integer index 19 read GetIntegerProp write SetIntegerProp stored False;
  305.     property YMaxValue: Integer index 20 read GetIntegerProp write SetIntegerProp stored False;
  306.     property PenWidth: Integer index 21 read GetIntegerProp write SetIntegerProp stored False;
  307.     property Text: WideString index 22 read GetWideStringProp write SetWideStringProp 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: TGraphXOnKeyPress 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 TGraphX.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: '{2E8636E6-9564-40B8-9505-6F8F77D5743D}';
  336.     EventIID: '{1CE19F3B-0E1B-415D-B9C2-89A4882CCAAC}';
  337.     EventCount: 8;
  338.     EventDispIDs: @CEventDispIDs;
  339.     LicenseKey: nil (*HR:$80040154*);
  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 TGraphX.CreateControl;
  350.  
  351.   procedure DoCreate;
  352.   begin
  353.     FIntf := IUnknown(OleObject) as IGraphX;
  354.   end;
  355.  
  356. begin
  357.   if FIntf = nil then DoCreate;
  358. end;
  359.  
  360. function TGraphX.GetControlInterface: IGraphX;
  361. begin
  362.   CreateControl;
  363.   Result := FIntf;
  364. end;
  365.  
  366. procedure TGraphX.AboutBox;
  367. begin
  368.   DefaultInterface.AboutBox;
  369. end;
  370.  
  371. procedure Register;
  372. begin
  373.   RegisterComponents('ActiveX',[TGraphX]);
  374. end;
  375.  
  376. end.
  377.