home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 October
/
Chip_2001-10_cd1.bin
/
zkuste
/
delphi
/
nastroje
/
d23456
/
SPLBASE.ZIP
/
Splbase
/
Activex
/
SplBaseXControl1_TLB.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
2001-08-05
|
15KB
|
485 lines
unit SplBaseXControl1_TLB;
{ This file contains pascal declarations imported from a type library.
This file will be written during each import or refresh of the type
library editor. Changes to this file will be discarded during the
refresh process. }
{ SplBaseXControl1 Library }
{ Version 1.0 }
interface
uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
const
LIBID_SplBaseXControl1: TGUID = '{411694A0-76FD-11D5-BB64-00A0CC73AEB8}';
const
{ TxAlignment }
taLeftJustify = 0;
taRightJustify = 1;
taCenter = 2;
{ TxBiDiMode }
bdLeftToRight = 0;
bdRightToLeft = 1;
bdRightToLeftNoAlign = 2;
bdRightToLeftReadingOnly = 3;
const
{ Component class GUIDs }
Class_SplBaseX: TGUID = '{411694A5-76FD-11D5-BB64-00A0CC73AEB8}';
type
{ Forward declarations: Interfaces }
ISplBaseX = interface;
ISplBaseXDisp = dispinterface;
ISplBaseXEvents = dispinterface;
{ Forward declarations: CoClasses }
SplBaseX = ISplBaseX;
{ Forward declarations: Enums }
TxAlignment = TOleEnum;
TxBiDiMode = TOleEnum;
{ Dispatch interface for SplBaseX Control }
ISplBaseX = interface(IDispatch)
['{411694A1-76FD-11D5-BB64-00A0CC73AEB8}']
function getrec(const idx: WideString): WordBool; safecall;
function initspl: WordBool; safecall;
function releasespl: WordBool; safecall;
function initbase: WordBool; safecall;
function activedb: WordBool; safecall;
function activerec: WordBool; safecall;
function dbempty: WordBool; safecall;
function reccount: Integer; safecall;
function createspl(const splname: WideString): WordBool; safecall;
function openspl(const splname: WideString): WordBool; safecall;
function addrec(const idx: WideString): WordBool; safecall;
function setspl(const spldat: WideString): WordBool; safecall;
function addfield(const recdat: WideString; pos: Integer): WordBool; safecall;
function getfield(pos: Integer): WideString; safecall;
function delrec: WordBool; safecall;
function modrec(const idx: WideString): WordBool; safecall;
function firstrec: WordBool; safecall;
function lastrec: WordBool; safecall;
function nextrec: WordBool; safecall;
function prevrec: WordBool; safecall;
function Get_Reclimit: Integer; safecall;
procedure Set_Reclimit(Value: Integer); safecall;
function Get_CurrentDB: WideString; safecall;
procedure Set_CurrentDB(const Value: WideString); safecall;
function Get_FieldCount: Integer; safecall;
function Get_ErrorNumber: Integer; safecall;
function Get_ErrorString: WideString; safecall;
function Get_DoubleBuffered: WordBool; safecall;
procedure Set_DoubleBuffered(Value: WordBool); safecall;
procedure FlipChildren(AllLevels: WordBool); safecall;
function DrawTextBiDiModeFlags(Flags: Integer): Integer; safecall;
function DrawTextBiDiModeFlagsReadingOnly: Integer; safecall;
function Get_Enabled: WordBool; safecall;
procedure Set_Enabled(Value: WordBool); safecall;
function GetControlsAlignment: TxAlignment; safecall;
procedure InitiateAction; safecall;
function IsRightToLeft: WordBool; safecall;
function UseRightToLeftAlignment: WordBool; safecall;
function UseRightToLeftReading: WordBool; safecall;
function UseRightToLeftScrollBar: WordBool; safecall;
function Get_BiDiMode: TxBiDiMode; safecall;
procedure Set_BiDiMode(Value: TxBiDiMode); safecall;
function Get_Visible: WordBool; safecall;
procedure Set_Visible(Value: WordBool); safecall;
function Get_Cursor: Smallint; safecall;
procedure Set_Cursor(Value: Smallint); safecall;
function ClassNameIs(const Name: WideString): WordBool; safecall;
property Reclimit: Integer read Get_Reclimit write Set_Reclimit;
property CurrentDB: WideString read Get_CurrentDB write Set_CurrentDB;
property FieldCount: Integer read Get_FieldCount;
property ErrorNumber: Integer read Get_ErrorNumber;
property ErrorString: WideString read Get_ErrorString;
property DoubleBuffered: WordBool read Get_DoubleBuffered write Set_DoubleBuffered;
property Enabled: WordBool read Get_Enabled write Set_Enabled;
property BiDiMode: TxBiDiMode read Get_BiDiMode write Set_BiDiMode;
property Visible: WordBool read Get_Visible write Set_Visible;
property Cursor: Smallint read Get_Cursor write Set_Cursor;
end;
{ DispInterface declaration for Dual Interface ISplBaseX }
ISplBaseXDisp = dispinterface
['{411694A1-76FD-11D5-BB64-00A0CC73AEB8}']
function getrec(const idx: WideString): WordBool; dispid 1;
function initspl: WordBool; dispid 2;
function releasespl: WordBool; dispid 3;
function initbase: WordBool; dispid 4;
function activedb: WordBool; dispid 5;
function activerec: WordBool; dispid 6;
function dbempty: WordBool; dispid 7;
function reccount: Integer; dispid 8;
function createspl(const splname: WideString): WordBool; dispid 9;
function openspl(const splname: WideString): WordBool; dispid 10;
function addrec(const idx: WideString): WordBool; dispid 11;
function setspl(const spldat: WideString): WordBool; dispid 12;
function addfield(const recdat: WideString; pos: Integer): WordBool; dispid 13;
function getfield(pos: Integer): WideString; dispid 14;
function delrec: WordBool; dispid 15;
function modrec(const idx: WideString): WordBool; dispid 16;
function firstrec: WordBool; dispid 17;
function lastrec: WordBool; dispid 18;
function nextrec: WordBool; dispid 19;
function prevrec: WordBool; dispid 20;
property Reclimit: Integer dispid 21;
property CurrentDB: WideString dispid 22;
property FieldCount: Integer readonly dispid 23;
property ErrorNumber: Integer readonly dispid 24;
property ErrorString: WideString readonly dispid 25;
property DoubleBuffered: WordBool dispid 28;
procedure FlipChildren(AllLevels: WordBool); dispid 29;
function DrawTextBiDiModeFlags(Flags: Integer): Integer; dispid 32;
function DrawTextBiDiModeFlagsReadingOnly: Integer; dispid 33;
property Enabled: WordBool dispid -514;
function GetControlsAlignment: TxAlignment; dispid 34;
procedure InitiateAction; dispid 36;
function IsRightToLeft: WordBool; dispid 37;
function UseRightToLeftAlignment: WordBool; dispid 42;
function UseRightToLeftReading: WordBool; dispid 43;
function UseRightToLeftScrollBar: WordBool; dispid 44;
property BiDiMode: TxBiDiMode dispid 45;
property Visible: WordBool dispid 46;
property Cursor: Smallint dispid 47;
function ClassNameIs(const Name: WideString): WordBool; dispid 51;
end;
{ Events interface for SplBaseX Control }
ISplBaseXEvents = dispinterface
['{411694A3-76FD-11D5-BB64-00A0CC73AEB8}']
procedure OnCreateError; dispid 1;
procedure OnOpenError; dispid 2;
procedure OnReadError; dispid 3;
procedure OnWriteError; dispid 4;
end;
{ SplBaseX Control }
TSplBaseX = class(TOleControl)
private
FOnCreateError: TNotifyEvent;
FOnOpenError: TNotifyEvent;
FOnReadError: TNotifyEvent;
FOnWriteError: TNotifyEvent;
FIntf: ISplBaseX;
function GetControlInterface: ISplBaseX;
protected
procedure CreateControl;
procedure InitControlData; override;
function GetTOleEnumProp(Index: Integer): TOleEnum;
procedure SetTOleEnumProp(Index: Integer; Value: TOleEnum);
public
function getrec(const idx: WideString): WordBool;
function initspl: WordBool;
function releasespl: WordBool;
function initbase: WordBool;
function activedb: WordBool;
function activerec: WordBool;
function dbempty: WordBool;
function reccount: Integer;
function createspl(const splname: WideString): WordBool;
function openspl(const splname: WideString): WordBool;
function addrec(const idx: WideString): WordBool;
function setspl(const spldat: WideString): WordBool;
function addfield(const recdat: WideString; pos: Integer): WordBool;
function getfield(pos: Integer): WideString;
function delrec: WordBool;
function modrec(const idx: WideString): WordBool;
function firstrec: WordBool;
function lastrec: WordBool;
function nextrec: WordBool;
function prevrec: WordBool;
procedure FlipChildren(AllLevels: WordBool);
function DrawTextBiDiModeFlags(Flags: Integer): Integer;
function DrawTextBiDiModeFlagsReadingOnly: Integer;
function GetControlsAlignment: TxAlignment;
procedure InitiateAction;
function IsRightToLeft: WordBool;
function UseRightToLeftAlignment: WordBool;
function UseRightToLeftReading: WordBool;
function UseRightToLeftScrollBar: WordBool;
function ClassNameIs(const Name: WideString): WordBool;
property ControlInterface: ISplBaseX read GetControlInterface;
property FieldCount: Integer index 23 read GetIntegerProp;
property ErrorNumber: Integer index 24 read GetIntegerProp;
property ErrorString: WideString index 25 read GetWideStringProp;
property DoubleBuffered: WordBool index 28 read GetWordBoolProp write SetWordBoolProp;
property Enabled: WordBool index -514 read GetWordBoolProp write SetWordBoolProp;
property BiDiMode: TxBiDiMode index 45 read GetTOleEnumProp write SetTOleEnumProp;
property Visible: WordBool index 46 read GetWordBoolProp write SetWordBoolProp;
published
property TabStop;
property Align;
property DragCursor;
property DragMode;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnStartDrag;
property Reclimit: Integer index 21 read GetIntegerProp write SetIntegerProp stored False;
property CurrentDB: WideString index 22 read GetWideStringProp write SetWideStringProp stored False;
property Cursor: Smallint index 47 read GetSmallintProp write SetSmallintProp stored False;
property OnCreateError: TNotifyEvent read FOnCreateError write FOnCreateError;
property OnOpenError: TNotifyEvent read FOnOpenError write FOnOpenError;
property OnReadError: TNotifyEvent read FOnReadError write FOnReadError;
property OnWriteError: TNotifyEvent read FOnWriteError write FOnWriteError;
end;
procedure Register;
implementation
uses ComObj;
procedure TSplBaseX.InitControlData;
const
CEventDispIDs: array[0..3] of Integer = (
$00000001, $00000002, $00000003, $00000004);
CControlData: TControlData = (
ClassID: '{411694A5-76FD-11D5-BB64-00A0CC73AEB8}';
EventIID: '{411694A3-76FD-11D5-BB64-00A0CC73AEB8}';
EventCount: 4;
EventDispIDs: @CEventDispIDs;
LicenseKey: nil;
Flags: $00000008;
Version: 300);
begin
ControlData := @CControlData;
end;
procedure TSplBaseX.CreateControl;
procedure DoCreate;
begin
FIntf := IUnknown(OleObject) as ISplBaseX;
end;
begin
if FIntf = nil then DoCreate;
end;
function TSplBaseX.GetControlInterface: ISplBaseX;
begin
CreateControl;
Result := FIntf;
end;
function TSplBaseX.GetTOleEnumProp(Index: Integer): TOleEnum;
begin
Result := GetIntegerProp(Index);
end;
procedure TSplBaseX.SetTOleEnumProp(Index: Integer; Value: TOleEnum);
begin
SetIntegerProp(Index, Value);
end;
function TSplBaseX.getrec(const idx: WideString): WordBool;
begin
CreateControl;
Result := FIntf.getrec(idx);
end;
function TSplBaseX.initspl: WordBool;
begin
CreateControl;
Result := FIntf.initspl;
end;
function TSplBaseX.releasespl: WordBool;
begin
CreateControl;
Result := FIntf.releasespl;
end;
function TSplBaseX.initbase: WordBool;
begin
CreateControl;
Result := FIntf.initbase;
end;
function TSplBaseX.activedb: WordBool;
begin
CreateControl;
Result := FIntf.activedb;
end;
function TSplBaseX.activerec: WordBool;
begin
CreateControl;
Result := FIntf.activerec;
end;
function TSplBaseX.dbempty: WordBool;
begin
CreateControl;
Result := FIntf.dbempty;
end;
function TSplBaseX.reccount: Integer;
begin
CreateControl;
Result := FIntf.reccount;
end;
function TSplBaseX.createspl(const splname: WideString): WordBool;
begin
CreateControl;
Result := FIntf.createspl(splname);
end;
function TSplBaseX.openspl(const splname: WideString): WordBool;
begin
CreateControl;
Result := FIntf.openspl(splname);
end;
function TSplBaseX.addrec(const idx: WideString): WordBool;
begin
CreateControl;
Result := FIntf.addrec(idx);
end;
function TSplBaseX.setspl(const spldat: WideString): WordBool;
begin
CreateControl;
Result := FIntf.setspl(spldat);
end;
function TSplBaseX.addfield(const recdat: WideString; pos: Integer): WordBool;
begin
CreateControl;
Result := FIntf.addfield(recdat, pos);
end;
function TSplBaseX.getfield(pos: Integer): WideString;
begin
CreateControl;
Result := FIntf.getfield(pos);
end;
function TSplBaseX.delrec: WordBool;
begin
CreateControl;
Result := FIntf.delrec;
end;
function TSplBaseX.modrec(const idx: WideString): WordBool;
begin
CreateControl;
Result := FIntf.modrec(idx);
end;
function TSplBaseX.firstrec: WordBool;
begin
CreateControl;
Result := FIntf.firstrec;
end;
function TSplBaseX.lastrec: WordBool;
begin
CreateControl;
Result := FIntf.lastrec;
end;
function TSplBaseX.nextrec: WordBool;
begin
CreateControl;
Result := FIntf.nextrec;
end;
function TSplBaseX.prevrec: WordBool;
begin
CreateControl;
Result := FIntf.prevrec;
end;
procedure TSplBaseX.FlipChildren(AllLevels: WordBool);
begin
CreateControl;
FIntf.FlipChildren(AllLevels);
end;
function TSplBaseX.DrawTextBiDiModeFlags(Flags: Integer): Integer;
begin
CreateControl;
Result := FIntf.DrawTextBiDiModeFlags(Flags);
end;
function TSplBaseX.DrawTextBiDiModeFlagsReadingOnly: Integer;
begin
CreateControl;
Result := FIntf.DrawTextBiDiModeFlagsReadingOnly;
end;
function TSplBaseX.GetControlsAlignment: TxAlignment;
begin
CreateControl;
Result := FIntf.GetControlsAlignment;
end;
procedure TSplBaseX.InitiateAction;
begin
CreateControl;
FIntf.InitiateAction;
end;
function TSplBaseX.IsRightToLeft: WordBool;
begin
CreateControl;
Result := FIntf.IsRightToLeft;
end;
function TSplBaseX.UseRightToLeftAlignment: WordBool;
begin
CreateControl;
Result := FIntf.UseRightToLeftAlignment;
end;
function TSplBaseX.UseRightToLeftReading: WordBool;
begin
CreateControl;
Result := FIntf.UseRightToLeftReading;
end;
function TSplBaseX.UseRightToLeftScrollBar: WordBool;
begin
CreateControl;
Result := FIntf.UseRightToLeftScrollBar;
end;
function TSplBaseX.ClassNameIs(const Name: WideString): WordBool;
begin
CreateControl;
Result := FIntf.ClassNameIs(Name);
end;
procedure Register;
begin
RegisterComponents('ActiveX', [TSplBaseX]);
end;
end.