⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 supergridviewlib_tlb.pas

📁 GIS开发源代码。 SuperMax5.0+Delphi,用Delphi编写的控件工具包
💻 PAS
字号:
unit SuperGridViewLib_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 2005-2-25 10:06:06 from Type Library described below.

// ************************************************************************  //
// Type Lib: D:\Program Files\SuperMap\5.0.2\SuperGridView.ocx (1)
// LIBID: {AB69DB6A-F6B5-4BCD-BF57-170D7A3F41F5}
// LCID: 0
// Helpfile: d:\Program Files\SuperMap\SuperMap Objects 5.0\help\SmProRef.chm
// HelpString: SuperMap Objects 5.0 GridView Control
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\system32\STDOLE2.TLB)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;
  


// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  SuperGridViewLibMajorVersion = 5;
  SuperGridViewLibMinorVersion = 0;

  LIBID_SuperGridViewLib: TGUID = '{AB69DB6A-F6B5-4BCD-BF57-170D7A3F41F5}';

  DIID__DSuperGridView: TGUID = '{1444E320-5476-4026-A5C9-60DF0C410169}';
  DIID__DSuperGridViewEvents: TGUID = '{9B03150B-F33E-441F-A5F4-595AD197EF47}';
  CLASS_SuperGridView: TGUID = '{E237A8B8-03FF-4260-87E9-45DA43BE4DF2}';

// *********************************************************************//
// Declaration of Enumerations defined in Type Library                    
// *********************************************************************//
// Constants for enum seViewType
type
  seViewType = TOleEnum;
const
  scvGridView = $00000000;
  scvPropertyView = $00000001;

type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  _DSuperGridView = dispinterface;
  _DSuperGridViewEvents = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  SuperGridView = _DSuperGridView;


// *********************************************************************//
// DispIntf:  _DSuperGridView
// Flags:     (4112) Hidden Dispatchable
// GUID:      {1444E320-5476-4026-A5C9-60DF0C410169}
// *********************************************************************//
  _DSuperGridView = dispinterface
    ['{1444E320-5476-4026-A5C9-60DF0C410169}']
    function GetSelectedColMax: Integer; dispid 24;
    function Update: WordBool; dispid 11;
    function GetSelectedColMin: Integer; dispid 23;
    function IsRowSelected(nRow: Integer): WordBool; dispid 25;
    function GetSelectedRowMax: Integer; dispid 22;
    function MoveTo(nPosition: Integer): WordBool; dispid 13;
    function Disconnect: WordBool; dispid 12;
    function SeekID(ID: Integer): WordBool; dispid 14;
    function PrintGrid(const strDocTitle: WideString): WordBool; dispid 10;
    function Connect(const objRecordset: IDispatch): WordBool; dispid 9;
    function MoveLast: WordBool; dispid 18;
    function MovePrev: WordBool; dispid 15;
    function GetSelectedRowMin: Integer; dispid 21;
    function GetItemValue(nRow: Integer; nCol: Integer): WideString; dispid 19;
    function GetCurRow: Integer; dispid 20;
    function IsCellSelected(nRow: Integer; nCol: Integer): WordBool; dispid 27;
    procedure AboutBox; dispid -552;
    function IsColSelected(nCol: Integer): WordBool; dispid 26;
    function MoveNext: WordBool; dispid 16;
    function MoveFirst: WordBool; dispid 17;
    property SysFieldVisible: WordBool dispid 8;
    property ViewType: seViewType dispid 7;
    property UpdateImmediately: WordBool dispid 6;
    property ReadOnly: WordBool dispid 5;
    property ReadOnlyItemColor: OLE_COLOR dispid 4;
    property ReadOnlyItemBkColor: OLE_COLOR dispid 3;
    property EditableItemColor: OLE_COLOR dispid 2;
    property EditableItemBkColor: OLE_COLOR dispid 1;
  end;

// *********************************************************************//
// DispIntf:  _DSuperGridViewEvents
// Flags:     (4096) Dispatchable
// GUID:      {9B03150B-F33E-441F-A5F4-595AD197EF47}
// *********************************************************************//
  _DSuperGridViewEvents = dispinterface
    ['{9B03150B-F33E-441F-A5F4-595AD197EF47}']
    procedure ItemSelected(nObjID: Integer); dispid 1;
  end;


// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name     : TSuperGridView
// Help String      : SuperGridView Control
// Default Interface: _DSuperGridView
// Def. Intf. DISP? : Yes
// Event   Interface: _DSuperGridViewEvents
// TypeFlags        : (34) CanCreate Control
// *********************************************************************//
  TSuperGridViewItemSelected = procedure(ASender: TObject; nObjID: Integer) of object;

  TSuperGridView = class(TOleControl)
  private
    FOnItemSelected: TSuperGridViewItemSelected;
    FIntf: _DSuperGridView;
    function  GetControlInterface: _DSuperGridView;
  protected
    procedure CreateControl;
    procedure InitControlData; override;
  public
    function GetSelectedColMax: Integer;
    function Update: WordBool;
    function GetSelectedColMin: Integer;
    function IsRowSelected(nRow: Integer): WordBool;
    function GetSelectedRowMax: Integer;
    function MoveTo(nPosition: Integer): WordBool;
    function Disconnect: WordBool;
    function SeekID(ID: Integer): WordBool;
    function PrintGrid(const strDocTitle: WideString): WordBool;
    function Connect(const objRecordset: IDispatch): WordBool;
    function MoveLast: WordBool;
    function MovePrev: WordBool;
    function GetSelectedRowMin: Integer;
    function GetItemValue(nRow: Integer; nCol: Integer): WideString;
    function GetCurRow: Integer;
    function IsCellSelected(nRow: Integer; nCol: Integer): WordBool;
    procedure AboutBox;
    function IsColSelected(nCol: Integer): WordBool;
    function MoveNext: WordBool;
    function MoveFirst: WordBool;
    property  ControlInterface: _DSuperGridView read GetControlInterface;
    property  DefaultInterface: _DSuperGridView read GetControlInterface;
  published
    property Anchors;
    property  TabStop;
    property  Align;
    property  DragCursor;
    property  DragMode;
    property  ParentShowHint;
    property  PopupMenu;
    property  ShowHint;
    property  TabOrder;
    property  Visible;
    property  OnDragDrop;
    property  OnDragOver;
    property  OnEndDrag;
    property  OnEnter;
    property  OnExit;
    property  OnStartDrag;
    property SysFieldVisible: WordBool index 8 read GetWordBoolProp write SetWordBoolProp stored False;
    property ViewType: TOleEnum index 7 read GetTOleEnumProp write SetTOleEnumProp stored False;
    property UpdateImmediately: WordBool index 6 read GetWordBoolProp write SetWordBoolProp stored False;
    property ReadOnly: WordBool index 5 read GetWordBoolProp write SetWordBoolProp stored False;
    property ReadOnlyItemColor: TColor index 4 read GetTColorProp write SetTColorProp stored False;
    property ReadOnlyItemBkColor: TColor index 3 read GetTColorProp write SetTColorProp stored False;
    property EditableItemColor: TColor index 2 read GetTColorProp write SetTColorProp stored False;
    property EditableItemBkColor: TColor index 1 read GetTColorProp write SetTColorProp stored False;
    property OnItemSelected: TSuperGridViewItemSelected read FOnItemSelected write FOnItemSelected;
  end;

procedure Register;

resourcestring
  dtlServerPage = 'ActiveX';

  dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

procedure TSuperGridView.InitControlData;
const
  CEventDispIDs: array [0..0] of DWORD = (
    $00000001);
  CControlData: TControlData2 = (
    ClassID: '{E237A8B8-03FF-4260-87E9-45DA43BE4DF2}';
    EventIID: '{9B03150B-F33E-441F-A5F4-595AD197EF47}';
    EventCount: 1;
    EventDispIDs: @CEventDispIDs;
    LicenseKey: nil (*HR:$80004005*);
    Flags: $00000000;
    Version: 401);
begin
  ControlData := @CControlData;
  TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnItemSelected) - Cardinal(Self);
end;

procedure TSuperGridView.CreateControl;

  procedure DoCreate;
  begin
    FIntf := IUnknown(OleObject) as _DSuperGridView;
  end;

begin
  if FIntf = nil then DoCreate;
end;

function TSuperGridView.GetControlInterface: _DSuperGridView;
begin
  CreateControl;
  Result := FIntf;
end;

function TSuperGridView.GetSelectedColMax: Integer;
begin
  Result := DefaultInterface.GetSelectedColMax;
end;

function TSuperGridView.Update: WordBool;
begin
  Result := DefaultInterface.Update;
end;

function TSuperGridView.GetSelectedColMin: Integer;
begin
  Result := DefaultInterface.GetSelectedColMin;
end;

function TSuperGridView.IsRowSelected(nRow: Integer): WordBool;
begin
  Result := DefaultInterface.IsRowSelected(nRow);
end;

function TSuperGridView.GetSelectedRowMax: Integer;
begin
  Result := DefaultInterface.GetSelectedRowMax;
end;

function TSuperGridView.MoveTo(nPosition: Integer): WordBool;
begin
  Result := DefaultInterface.MoveTo(nPosition);
end;

function TSuperGridView.Disconnect: WordBool;
begin
  Result := DefaultInterface.Disconnect;
end;

function TSuperGridView.SeekID(ID: Integer): WordBool;
begin
  Result := DefaultInterface.SeekID(ID);
end;

function TSuperGridView.PrintGrid(const strDocTitle: WideString): WordBool;
begin
  Result := DefaultInterface.PrintGrid(strDocTitle);
end;

function TSuperGridView.Connect(const objRecordset: IDispatch): WordBool;
begin
  Result := DefaultInterface.Connect(objRecordset);
end;

function TSuperGridView.MoveLast: WordBool;
begin
  Result := DefaultInterface.MoveLast;
end;

function TSuperGridView.MovePrev: WordBool;
begin
  Result := DefaultInterface.MovePrev;
end;

function TSuperGridView.GetSelectedRowMin: Integer;
begin
  Result := DefaultInterface.GetSelectedRowMin;
end;

function TSuperGridView.GetItemValue(nRow: Integer; nCol: Integer): WideString;
begin
  Result := DefaultInterface.GetItemValue(nRow, nCol);
end;

function TSuperGridView.GetCurRow: Integer;
begin
  Result := DefaultInterface.GetCurRow;
end;

function TSuperGridView.IsCellSelected(nRow: Integer; nCol: Integer): WordBool;
begin
  Result := DefaultInterface.IsCellSelected(nRow, nCol);
end;

procedure TSuperGridView.AboutBox;
begin
  DefaultInterface.AboutBox;
end;

function TSuperGridView.IsColSelected(nCol: Integer): WordBool;
begin
  Result := DefaultInterface.IsColSelected(nCol);
end;

function TSuperGridView.MoveNext: WordBool;
begin
  Result := DefaultInterface.MoveNext;
end;

function TSuperGridView.MoveFirst: WordBool;
begin
  Result := DefaultInterface.MoveFirst;
end;

procedure Register;
begin
  RegisterComponents(dtlOcxPage, [TSuperGridView]);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -