{***************************************************************************}
{ This source code was generated automatically by                           }
{ Pas file import tool for Scripter Studio (Pro)                            }
{                                                                           }
{ Scripter Studio and Pas file import tool for Scripter Studio              }
{ written by TMS Software                                                   }
{            copyright © 1997 - 2010                                        }
{            Email : info@tmssoftware.com                                   }
{            Web : http://www.tmssoftware.com                               }
{***************************************************************************}
unit ap_dblookup;

interface

uses
  Windows,
  Classes,
  StdCtrls,
  DB,
  Controls,
  Messages,
  SysUtils,
  Forms,
  Graphics,
  Menus,
  Buttons,
  DBGrids,
  DBTables,
  Grids,
  Dbctrls,
  dblookup,
  Variants,
  atScript;

{$WARNINGS OFF}

type
  TatdblookupLibrary = class(TatScripterLibrary)
    procedure __TDBLookupComboCreate(AMachine: TatVirtualMachine);
    procedure __TDBLookupComboDestroy(AMachine: TatVirtualMachine);
    procedure __TDBLookupComboDropDown(AMachine: TatVirtualMachine);
    procedure __TDBLookupComboCloseUp(AMachine: TatVirtualMachine);
    procedure __GetTDBLookupComboValue(AMachine: TatVirtualMachine);
    procedure __SetTDBLookupComboValue(AMachine: TatVirtualMachine);
    procedure __GetTDBLookupComboDisplayValue(AMachine: TatVirtualMachine);
    procedure __SetTDBLookupComboDisplayValue(AMachine: TatVirtualMachine);
    procedure __TDBLookupListCreate(AMachine: TatVirtualMachine);
    procedure __TDBLookupListDestroy(AMachine: TatVirtualMachine);
    procedure __GetTDBLookupListValue(AMachine: TatVirtualMachine);
    procedure __SetTDBLookupListValue(AMachine: TatVirtualMachine);
    procedure __GetTDBLookupListDisplayValue(AMachine: TatVirtualMachine);
    procedure __SetTDBLookupListDisplayValue(AMachine: TatVirtualMachine);
    procedure __TPopupGridCreate(AMachine: TatVirtualMachine);
    procedure Init; override;
    class function LibraryName: string; override;
  end;

  TDBLookupComboClass = class of TDBLookupCombo;
  TDBLookupListClass = class of TDBLookupList;
  TPopupGridClass = class of TPopupGrid;
  TComboButtonClass = class of TComboButton;



implementation



procedure TatdblookupLibrary.__TDBLookupComboCreate(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := ObjectToVar(TDBLookupComboClass(CurrentClass.ClassRef).Create(TComponent(VarToObject(GetInputArg(0)))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatdblookupLibrary.__TDBLookupComboDestroy(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    TDBLookupCombo(CurrentObject).Destroy;
  end;
end;

procedure TatdblookupLibrary.__TDBLookupComboDropDown(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    TDBLookupCombo(CurrentObject).DropDown;
  end;
end;

procedure TatdblookupLibrary.__TDBLookupComboCloseUp(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    TDBLookupCombo(CurrentObject).CloseUp;
  end;
end;

procedure TatdblookupLibrary.__GetTDBLookupComboValue(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    ReturnOutputArg(string(TDBLookupCombo(CurrentObject).Value));
  end;
end;

procedure TatdblookupLibrary.__SetTDBLookupComboValue(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    TDBLookupCombo(CurrentObject).Value:=VarToStr(GetInputArg(0));
  end;
end;

procedure TatdblookupLibrary.__GetTDBLookupComboDisplayValue(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    ReturnOutputArg(string(TDBLookupCombo(CurrentObject).DisplayValue));
  end;
end;

procedure TatdblookupLibrary.__SetTDBLookupComboDisplayValue(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    TDBLookupCombo(CurrentObject).DisplayValue:=VarToStr(GetInputArg(0));
  end;
end;

procedure TatdblookupLibrary.__TDBLookupListCreate(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := ObjectToVar(TDBLookupListClass(CurrentClass.ClassRef).Create(TComponent(VarToObject(GetInputArg(0)))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatdblookupLibrary.__TDBLookupListDestroy(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    TDBLookupList(CurrentObject).Destroy;
  end;
end;

procedure TatdblookupLibrary.__GetTDBLookupListValue(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    ReturnOutputArg(string(TDBLookupList(CurrentObject).Value));
  end;
end;

procedure TatdblookupLibrary.__SetTDBLookupListValue(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    TDBLookupList(CurrentObject).Value:=VarToStr(GetInputArg(0));
  end;
end;

procedure TatdblookupLibrary.__GetTDBLookupListDisplayValue(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    ReturnOutputArg(string(TDBLookupList(CurrentObject).DisplayValue));
  end;
end;

procedure TatdblookupLibrary.__SetTDBLookupListDisplayValue(AMachine: TatVirtualMachine);
begin
  with AMachine do
  begin
    TDBLookupList(CurrentObject).DisplayValue:=VarToStr(GetInputArg(0));
  end;
end;

procedure TatdblookupLibrary.__TPopupGridCreate(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := ObjectToVar(TPopupGridClass(CurrentClass.ClassRef).Create(TComponent(VarToObject(GetInputArg(0)))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatdblookupLibrary.Init;
begin
  With Scripter.DefineClass(TDBLookupCombo) do
  begin
    DefineMethod('Create',1,tkClass,TDBLookupCombo,__TDBLookupComboCreate,true,0,'AOwner: TComponent');
    DefineMethod('Destroy',0,tkNone,nil,__TDBLookupComboDestroy,false,0,'');
    DefineMethod('DropDown',0,tkNone,nil,__TDBLookupComboDropDown,false,0,'');
    DefineMethod('CloseUp',0,tkNone,nil,__TDBLookupComboCloseUp,false,0,'');
    DefineProp('Value',tkVariant,__GetTDBLookupComboValue,__SetTDBLookupComboValue,nil,false,0);
    DefineProp('DisplayValue',tkVariant,__GetTDBLookupComboDisplayValue,__SetTDBLookupComboDisplayValue,nil,false,0);
  end;
  With Scripter.DefineClass(TDBLookupList) do
  begin
    DefineMethod('Create',1,tkClass,TDBLookupList,__TDBLookupListCreate,true,0,'AOwner: TComponent');
    DefineMethod('Destroy',0,tkNone,nil,__TDBLookupListDestroy,false,0,'');
    DefineProp('Value',tkVariant,__GetTDBLookupListValue,__SetTDBLookupListValue,nil,false,0);
    DefineProp('DisplayValue',tkVariant,__GetTDBLookupListDisplayValue,__SetTDBLookupListDisplayValue,nil,false,0);
  end;
  With Scripter.DefineClass(TPopupGrid) do
  begin
    DefineMethod('Create',1,tkClass,TPopupGrid,__TPopupGridCreate,true,0,'AOwner: TComponent');
    DefineProp('RowCount',tkVariant,nil,nil,nil,false,0);
  end;
  With Scripter.DefineClass(TComboButton) do
  begin
  end;
  With Scripter.DefineClass(ClassType) do
  begin
    AddConstant('csDropDown',csDropDown);
    AddConstant('csDropDownList',csDropDownList);
    AddConstant('loColLines',loColLines);
    AddConstant('loRowLines',loRowLines);
    AddConstant('loTitles',loTitles);
  end;
end;

class function TatdblookupLibrary.LibraryName: string;
begin
  result := 'dblookup';
end;

initialization
  RegisterScripterLibrary(TatdblookupLibrary, True);

{$WARNINGS ON}

end.

