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

📄 imp_classes.pas

📁 Delphi脚本控件
💻 PAS
📖 第 1 页 / 共 5 页
字号:
procedure TWriter_PutRootAncestor(const Value: TComponent);
begin
  TWriter(_Self).RootAncestor := Value;
end;
function TParser_GetFloatType:Char;
begin
  result := TParser(_Self).FloatType;
end;
function TParser_GetSourceLine:Integer;
begin
  result := TParser(_Self).SourceLine;
end;
function TParser_GetToken:Char;
begin
  result := TParser(_Self).Token;
end;
function TThread_GetFreeOnTerminate:Boolean;
begin
  result := TThread(_Self).FreeOnTerminate;
end;
procedure TThread_PutFreeOnTerminate(const Value: Boolean);
begin
  TThread(_Self).FreeOnTerminate := Value;
end;
function TThread_GetHandle:THandle;
begin
  result := TThread(_Self).Handle;
end;
function TThread_GetPriority:TThreadPriority;
begin
  result := TThread(_Self).Priority;
end;
procedure TThread_PutPriority(const Value: TThreadPriority);
begin
  TThread(_Self).Priority := Value;
end;
function TThread_GetSuspended:Boolean;
begin
  result := TThread(_Self).Suspended;
end;
procedure TThread_PutSuspended(const Value: Boolean);
begin
  TThread(_Self).Suspended := Value;
end;
function TThread_GetThreadID:THandle;
begin
  result := TThread(_Self).ThreadID;
end;
function TComponent_GetComObject:IUnknown;
begin
  result := TComponent(_Self).ComObject;
end;
function TComponent_GetComponents(Index: Integer):TComponent;
begin
  result := TComponent(_Self).Components[Index];
end;
function TComponent_GetComponentCount:Integer;
begin
  result := TComponent(_Self).ComponentCount;
end;
function TComponent_GetComponentIndex:Integer;
begin
  result := TComponent(_Self).ComponentIndex;
end;
procedure TComponent_PutComponentIndex(const Value: Integer);
begin
  TComponent(_Self).ComponentIndex := Value;
end;
function TComponent_GetComponentState:TComponentState;
begin
  result := TComponent(_Self).ComponentState;
end;
function TComponent_GetComponentStyle:TComponentStyle;
begin
  result := TComponent(_Self).ComponentStyle;
end;
function TComponent_GetDesignInfo:Longint;
begin
  result := TComponent(_Self).DesignInfo;
end;
procedure TComponent_PutDesignInfo(const Value: Longint);
begin
  TComponent(_Self).DesignInfo := Value;
end;
function TComponent_GetOwner:TComponent;
begin
  result := TComponent(_Self).Owner;
end;
function TComponent_GetVCLComObject:Pointer;
begin
  result := TComponent(_Self).VCLComObject;
end;
procedure TComponent_PutVCLComObject(const Value: Pointer);
begin
  TComponent(_Self).VCLComObject := Value;
end;
function TBasicActionLink_GetAction:TBasicAction;
begin
  result := TBasicActionLink(_Self).Action;
end;
procedure TBasicActionLink_PutAction(const Value: TBasicAction);
begin
  TBasicActionLink(_Self).Action := Value;
end;
procedure RegisterIMP_classes;
var H: Integer;
begin
  H := RegisterNamespace('classes', -1);
  RegisterConstant('SoFromBeginning', 0, H);
  RegisterConstant('SoFromCurrent', 1, H);
  RegisterConstant('SoFromEnd', 2, H);
  RegisterConstant('FmCreate', $FFFF, H);
  RegisterConstant('ScShift', $2000, H);
  RegisterConstant('ScCtrl', $4000, H);
  RegisterConstant('ScAlt', $8000, H);
  RegisterConstant('ScNone', 0, H);
  RegisterRTTIType(TypeInfo(TAlignment));
  RegisterRTTIType(TypeInfo(TBiDiMode));
  RegisterRTTIType(TypeInfo(TDuplicates));
  RegisterRTTIType(TypeInfo(TListNotification));
  // Begin of class TList
  RegisterClassType(TList, H);
  RegisterMethod(TList,
       'destructor Destroy; override;',
       @TList.Destroy);
  RegisterMethod(TList,
       'function Add(Item: Pointer): Integer;',
       @TList.Add);
  RegisterMethod(TList,
       'procedure Clear; virtual;',
       @TList.Clear);
  RegisterMethod(TList,
       'procedure Delete(Index: Integer);',
       @TList.Delete);
  RegisterMethod(TList,
       'procedure Error(const Msg: string; Data: Integer); overload; virtual;',
       @TList.Error);
  RegisterMethod(TList,
       'procedure Error(Msg: PResStringRec; Data: Integer); overload;',
       @TList.Error);
  RegisterMethod(TList,
       'procedure Exchange(Index1, Index2: Integer);',
       @TList.Exchange);
  RegisterMethod(TList,
       'function Expand: TList;',
       @TList.Expand);
  RegisterMethod(TList,
       'function Extract(Item: Pointer): Pointer;',
       @TList.Extract);
  RegisterMethod(TList,
       'function First: Pointer;',
       @TList.First);
  RegisterMethod(TList,
       'function IndexOf(Item: Pointer): Integer;',
       @TList.IndexOf);
  RegisterMethod(TList,
       'procedure Insert(Index: Integer; Item: Pointer);',
       @TList.Insert);
  RegisterMethod(TList,
       'function Last: Pointer;',
       @TList.Last);
  RegisterMethod(TList,
       'procedure Move(CurIndex, NewIndex: Integer);',
       @TList.Move);
  RegisterMethod(TList,
       'function Remove(Item: Pointer): Integer;',
       @TList.Remove);
  RegisterMethod(TList,
       'procedure Pack;',
       @TList.Pack);
  RegisterMethod(TList,
       'procedure Sort(Compare: TListSortCompare);',
       @TList.Sort);
  RegisterMethod(TList,
       'function TList_GetCapacity:Integer;',
       @TList_GetCapacity, Fake);
  RegisterMethod(TList,
       'procedure TList_PutCapacity(const Value: Integer);',
       @TList_PutCapacity, Fake);
  RegisterProperty(TList,
       'property Capacity:Integer read TList_GetCapacity write TList_PutCapacity;');
  RegisterMethod(TList,
       'function TList_GetCount:Integer;',
       @TList_GetCount, Fake);
  RegisterMethod(TList,
       'procedure TList_PutCount(const Value: Integer);',
       @TList_PutCount, Fake);
  RegisterProperty(TList,
       'property Count:Integer read TList_GetCount write TList_PutCount;');
  RegisterMethod(TList,
       'function TList_GetItems(Index: Integer):Pointer;',
       @TList_GetItems, Fake);
  RegisterMethod(TList,
       'procedure TList_PutItems(Index: Integer;const Value: Pointer);',
       @TList_PutItems, Fake);
  RegisterProperty(TList,
       'property Items[Index: Integer]:Pointer read TList_GetItems write TList_PutItems;default;');
  RegisterMethod(TList,
       'function TList_GetList:PPointerList;',
       @TList_GetList, Fake);
  RegisterProperty(TList,
       'property List:PPointerList read TList_GetList;');
  RegisterMethod(TList,
       'constructor Create;',
       @TList.Create);
  // End of class TList
  // Begin of class TThreadList
  RegisterClassType(TThreadList, H);
  RegisterMethod(TThreadList,
       'constructor Create;',
       @TThreadList.Create);
  RegisterMethod(TThreadList,
       'destructor Destroy; override;',
       @TThreadList.Destroy);
  RegisterMethod(TThreadList,
       'procedure Add(Item: Pointer);',
       @TThreadList.Add);
  RegisterMethod(TThreadList,
       'procedure Clear;',
       @TThreadList.Clear);
  RegisterMethod(TThreadList,
       'function  LockList: TList;',
       @TThreadList.LockList);
  RegisterMethod(TThreadList,
       'procedure Remove(Item: Pointer);',
       @TThreadList.Remove);
  RegisterMethod(TThreadList,
       'procedure UnlockList;',
       @TThreadList.UnlockList);
  RegisterMethod(TThreadList,
       'function TThreadList_GetDuplicates:TDuplicates;',
       @TThreadList_GetDuplicates, Fake);
  RegisterMethod(TThreadList,
       'procedure TThreadList_PutDuplicates(const Value: TDuplicates);',
       @TThreadList_PutDuplicates, Fake);
  RegisterProperty(TThreadList,
       'property Duplicates:TDuplicates read TThreadList_GetDuplicates write TThreadList_PutDuplicates;');
  // End of class TThreadList
  // Begin of class TInterfaceList
  RegisterClassType(TInterfaceList, H);
  RegisterMethod(TInterfaceList,
       'constructor Create;',
       @TInterfaceList.Create);
  RegisterMethod(TInterfaceList,
       'destructor Destroy; override;',
       @TInterfaceList.Destroy);
  RegisterMethod(TInterfaceList,
       'procedure Clear;',
       @TInterfaceList.Clear);
  RegisterMethod(TInterfaceList,
       'procedure Delete(Index: Integer);',
       @TInterfaceList.Delete);
  RegisterMethod(TInterfaceList,
       'procedure Exchange(Index1, Index2: Integer);',
       @TInterfaceList.Exchange);
  RegisterMethod(TInterfaceList,
       'function Expand: TInterfaceList;',
       @TInterfaceList.Expand);
  RegisterMethod(TInterfaceList,
       'function First: IUnknown;',
       @TInterfaceList.First);
  RegisterMethod(TInterfaceList,
       'function IndexOf(Item: IUnknown): Integer;',
       @TInterfaceList.IndexOf);
  RegisterMethod(TInterfaceList,
       'function Add(Item: IUnknown): Integer;',
       @TInterfaceList.Add);
  RegisterMethod(TInterfaceList,
       'procedure Insert(Index: Integer; Item: IUnknown);',
       @TInterfaceList.Insert);
  RegisterMethod(TInterfaceList,
       'function Last: IUnknown;',
       @TInterfaceList.Last);
  RegisterMethod(TInterfaceList,
       'function Remove(Item: IUnknown): Integer;',
       @TInterfaceList.Remove);
  RegisterMethod(TInterfaceList,
       'procedure Lock;',
       @TInterfaceList.Lock);
  RegisterMethod(TInterfaceList,
       'procedure Unlock;',
       @TInterfaceList.Unlock);
  RegisterMethod(TInterfaceList,
       'function TInterfaceList_GetCapacity:Integer;',
       @TInterfaceList_GetCapacity, Fake);
  RegisterMethod(TInterfaceList,
       'procedure TInterfaceList_PutCapacity(const Value: Integer);',
       @TInterfaceList_PutCapacity, Fake);
  RegisterProperty(TInterfaceList,
       'property Capacity:Integer read TInterfaceList_GetCapacity write TInterfaceList_PutCapacity;');
  RegisterMethod(TInterfaceList,
       'function TInterfaceList_GetCount:Integer;',
       @TInterfaceList_GetCount, Fake);
  RegisterMethod(TInterfaceList,
       'procedure TInterfaceList_PutCount(const Value: Integer);',
       @TInterfaceList_PutCount, Fake);
  RegisterProperty(TInterfaceList,
       'property Count:Integer read TInterfaceList_GetCount write TInterfaceList_PutCount;');
  RegisterMethod(TInterfaceList,
       'function TInterfaceList_GetItems(Index: Integer):IUnknown;',
       @TInterfaceList_GetItems, Fake);
  RegisterMethod(TInterfaceList,
       'procedure TInterfaceList_PutItems(Index: Integer;const Value: IUnknown);',

       @TInterfaceList_PutItems, Fake);
  RegisterProperty(TInterfaceList,
       'property Items[Index: Integer]:IUnknown read TInterfaceList_GetItems write TInterfaceList_PutItems;default;');
  // End of class TInterfaceList
  // Begin of class TBits
  RegisterClassType(TBits, H);
  RegisterMethod(TBits,
       'destructor Destroy; override;',
       @TBits.Destroy);
  RegisterMethod(TBits,
       'function OpenBit: Integer;',
       @TBits.OpenBit);
  RegisterMethod(TBits,
       'function TBits_GetBits(Index: Integer):Boolean;',
       @TBits_GetBits, Fake);
  RegisterMethod(TBits,
       'procedure TBits_PutBits(Index: Integer;const Value: Boolean);',
       @TBits_PutBits, Fake);
  RegisterProperty(TBits,
       'property Bits[Index: Integer]:Boolean read TBits_GetBits write TBits_PutBits;default;');
  RegisterMethod(TBits,
       'function TBits_GetSize:Integer;',
       @TBits_GetSize, Fake);
  RegisterMethod(TBits,
       'procedure TBits_PutSize(const Value: Integer);',
       @TBits_PutSize, Fake);
  RegisterProperty(TBits,
       'property Size:Integer read TBits_GetSize write TBits_PutSize;');
  RegisterMethod(TBits,
       'constructor Create;',
       @TBits.Create);
  // End of class TBits
  // Begin of class TPersistent
  RegisterClassType(TPersistent, H);
  RegisterMethod(TPersistent,
       'destructor Destroy; override;',
       @TPersistent.Destroy);
  RegisterMethod(TPersistent,
       'procedure Assign(Source: TPersistent); virtual;',
       @TPersistent.Assign);
  RegisterMethod(TPersistent,
       'function  GetNamePath: string; dynamic;',
       @TPersistent.GetNamePath);
  RegisterMethod(TPersistent,
       'constructor Create;',
       @TPersistent.Create);
  // End of class TPersistent

⌨️ 快捷键说明

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