Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/InvokeCall.inc
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ begin
end; { case }
end;

function TPSExec.InnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
function TPSExec.PlatformInnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
var SysCalConv : TCallConv;
Args: TArray<TValue>;
old_Args: TArray<TValue>;
Expand Down Expand Up @@ -458,9 +458,9 @@ begin
//5,6
btU32, btS32: PCardinal(res.dta)^ := Cardinal(Invoke(Address,Args,SysCalConv,TypeInfo(Cardinal),IsStatic).AsInteger);
//7
btSingle: PSingle(res.dta)^ := Single(Invoke(Address,Args,SysCalConv,TypeInfo(Single),IsStatic).AsExtended);
btSingle: PSingle(res.dta)^ := Invoke(Address,Args,SysCalConv,TypeInfo(Single),IsStatic).AsExtended;
//8
btDouble: PDouble(res.dta)^ := Double(Invoke(Address,Args,SysCalConv,TypeInfo(Double),IsStatic).AsExtended);
btDouble: PDouble(res.dta)^ := Invoke(Address,Args,SysCalConv,TypeInfo(Double),IsStatic).AsExtended;
//9
btExtended: PExtended(res.dta)^ := Extended(Invoke(Address,Args,SysCalConv,TypeInfo(Extended),IsStatic).AsExtended);
//10
Expand Down
4 changes: 3 additions & 1 deletion Source/PascalScript.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ Defines:
{$I PascalScriptFPC.inc}
{$ENDIF}

{$IFDEF DELPHI2005UP}
{ Delphi 2005 and 2006 stop with an internal error on a class derived directly from one that a run-time
library unit the declaring unit uses has a class helper for, so they take the procedure form, as Delphi 7 does }
{$IFDEF DELPHI2007UP}
{$DEFINE class_helper_present}
{$ENDIF}
{$IFDEF FPC}
Expand Down
5 changes: 5 additions & 0 deletions Source/PascalScriptFPC.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@
{$ifend}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI6UP}
{ fcl-db declares TObjectField, TArrayField, TField.ParentField, TFieldDefs.ParentDef,
TDataSet.SparseArrays and TFieldDef's child definitions from Free Pascal 3.2.4 on }
{$IF FPC_FULLVERSION < 30204}
{$DEFINE PS_FCLDB_NO_OBJECT_FIELD}
{$IFEND}
2 changes: 1 addition & 1 deletion Source/arm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ asmcall_end:
ldmea r11,{r4,r5,r6,r7,r8,r9,r10,r11,r13,r15}
end;

function TPSExec.InnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
function TPSExec.PlatformInnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
var
rint: Trint; { registers r0 to r3 }
rfloat: Trfloat; { registers f0 to f3 }
Expand Down
8 changes: 4 additions & 4 deletions Source/arm64.inc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ procedure arm64call(
Stack: Pointer;
Items: NativeInt); external {$IFDEF DARWIN}name '_arm64call'{$ENDIF};

function TPSExec.InnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
function TPSExec.PlatformInnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
var
Stack: array of Byte;
_X0: IPointer;
Expand Down Expand Up @@ -155,7 +155,7 @@ var
begin
if Copy(fvar.aType.ExportName, 1, 10) = '!OPENARRAY' then
begin
p := CreateOpenArray(True, Self, FVar);
p := CreateOpenArray(True, Self, FVar, CallData);
if p = nil then
Exit;
CallData.Add(p);
Expand Down Expand Up @@ -191,7 +191,7 @@ var
begin
if Copy(fvar^.aType.ExportName, 1, 10) = '!OPENARRAY' then
begin
p := CreateOpenArray(False, Self, FVar);
p := CreateOpenArray(False, Self, FVar, CallData);
if p = nil then
Exit;
CallData.Add(p);
Expand Down Expand Up @@ -274,7 +274,7 @@ begin
IsConstructor := False;
{$ENDIF}

InnerfuseCall := False;
PlatformInnerfuseCall := False;
if Address = nil then
Exit;

Expand Down
2 changes: 1 addition & 1 deletion Source/powerpc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ begin
end;
end;

function TPSExec.InnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
function TPSExec.PlatformInnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
var
rint: Trint; { registers r3 to r10 }
rfloat: Trfloat; { registers f1 to f13 }
Expand Down
28 changes: 22 additions & 6 deletions Source/uPSC_controls.pas
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ procedure SIRegisterTControl(Cl: TPSPascalCompiler);
{$IFDEF DELPHI23UP}
RegisterProperty('StyleElements', 'TStyleElements', iptrw);
{$ENDIF}
{$IFDEF DELPHI26UP}
{$IFDEF DELPHI27UP}
RegisterProperty('StyleName', 'string', iptrw);
{$ENDIF}

Expand Down Expand Up @@ -141,10 +141,16 @@ procedure SIRegisterTCustomControl(cl: TPSPascalCompiler); // requires TWinContr
procedure SIRegister_Controls_TypesAndConsts(Cl: TPSPascalCompiler);
begin
{$IFNDEF FPC}
{$IFDEF DELPHI2010UP}
Cl.addTypeS('TEShiftState','(ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble, ssTouch, ssPen)');
{$ELSE}
Cl.addTypeS('TEShiftState','(ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble)');
{$ENDIF}
{$ELSE}
Cl.addTypeS('TEShiftState','(ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble,' +
'ssMeta, ssSuper, ssHyper, ssAltGr, ssCaps, ssNum,ssScroll,ssTriple,ssQuad)');
'ssMeta, ssSuper, ssHyper, ssAltGr, ssCaps, ssNum,ssScroll,ssTriple,ssQuad,ssExtra1,ssExtra2'
{$IF defined(FPC_FULLVERSION) and (FPC_FULLVERSION >= 30204)} + ',ssTouch,ssPen,ssHorizontal'{$IFEND}
+ ')');
{$ENDIF}
Cl.addTypeS('TShiftState','set of TEShiftState');
cl.AddTypeS('TMouseButton', '(mbLeft, mbRight, mbMiddle)');
Expand All @@ -170,7 +176,7 @@ procedure SIRegister_Controls_TypesAndConsts(Cl: TPSPascalCompiler);

cl.AddTypeS('TEndDragEvent', 'procedure(Sender, Target: TObject; X, Y: Integer)');

cl.addTypeS('TAlign', '(alNone, alTop, alBottom, alLeft, alRight, alClient)');
cl.addTypeS('TAlign', '(alNone, alTop, alBottom, alLeft, alRight, alClient, alCustom)');

{$IFDEF DELPHI23UP}
cl.addTypeS('TStyleElement', '(seFont, seClient, seBorder)');
Expand All @@ -197,9 +203,10 @@ procedure SIRegister_Controls_TypesAndConsts(Cl: TPSPascalCompiler);
cl.AddConstantN('mrIgnore', 'Integer').Value.ts32 := 5;
cl.AddConstantN('mrYes', 'Integer').Value.ts32 := 6;
cl.AddConstantN('mrNo', 'Integer').Value.ts32 := 7;
cl.AddConstantN('mrAll', 'Integer').Value.ts32 := 8;
cl.AddConstantN('mrNoToAll', 'Integer').Value.ts32 := 9;
cl.AddConstantN('mrYesToAll', 'Integer').Value.ts32 := 10;
{ Delphi XE2 moved these three past mrClose, mrHelp, mrTryAgain and mrContinue }
cl.AddConstantN('mrAll', 'Integer').Value.ts32 := {$IFDEF DELPHI16UP}12{$ELSE}8{$ENDIF};
cl.AddConstantN('mrNoToAll', 'Integer').Value.ts32 := {$IFDEF DELPHI16UP}13{$ELSE}9{$ENDIF};
cl.AddConstantN('mrYesToAll', 'Integer').Value.ts32 := {$IFDEF DELPHI16UP}14{$ELSE}10{$ENDIF};
cl.AddConstantN('crDefault', 'Integer').Value.ts32 := 0;
cl.AddConstantN('crNone', 'Integer').Value.ts32 := -1;
cl.AddConstantN('crArrow', 'Integer').Value.ts32 := -2;
Expand Down Expand Up @@ -262,12 +269,21 @@ procedure SIRegisterTDragObject(cl: TPSPascalCompiler);
procedure SIRegisterTSizeConstraints(cl: TPSPascalCompiler);
begin
cl.AddTypeS('TConstraintSize', 'Integer');
{$IFNDEF FPC}
{ its constructor names TControl, which the library registers later: declared
here without its ancestor until then }
if cl.FindClass('TControl') = nil then
cl.AddClassN(nil, 'TControl');
{$ENDIF}
with CL.AddClassN(CL.FindClass('TPersistent'),'TSizeConstraints') do
begin
RegisterProperty('MaxHeight', 'TConstraintSize', iptrw);
RegisterProperty('MaxWidth', 'TConstraintSize', iptrw);
RegisterProperty('MinHeight', 'TConstraintSize', iptrw);
RegisterProperty('MinWidth', 'TConstraintSize', iptrw);
{$IFNDEF FPC}
RegisterMethod('constructor Create(Control: TControl); virtual;');
{$ENDIF}
end;
end;
{$ENDIF}
Expand Down
25 changes: 20 additions & 5 deletions Source/uPSC_forms.pas
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ procedure SIRegisterTFORM(Cl: TPSPascalCompiler);
RegisterMethod('function ShowModal: Integer');
RegisterMethod('procedure Release');
RegisterProperty('Active', 'Boolean', iptr);
{$IFNDEF FPC}
{ TCustomForm declares Visible, ClientWidth and ClientHeight again with
setters of its own, and newer Delphi versions Left and Top too:
declared on TForm, a script's access reaches the form's property }
RegisterProperty('Left', 'Integer', iptrw);
RegisterProperty('Top', 'Integer', iptrw);
RegisterProperty('ClientWidth', 'LongInt', iptrw);
RegisterProperty('ClientHeight', 'LongInt', iptrw);
RegisterProperty('Visible', 'Boolean', iptrw);
{$ENDIF}
RegisterProperty('ActiveControl', 'TWinControl', iptrw);
{$IFDEF DELPHI4UP}
RegisterProperty('Anchors', 'TAnchors', iptrw);
Expand Down Expand Up @@ -264,10 +274,14 @@ procedure SIRegisterTAPPLICATION(Cl: TPSPascalCompiler);
procedure SIRegister_Forms_TypesAndConsts(Cl: TPSPascalCompiler);
begin
Cl.AddTypeS('TIdleEvent', 'procedure (Sender: TObject; var Done: Boolean)');
cl.AddTypeS('TScrollBarKind', '(sbHorizontal, sbVertical)');
cl.AddTypeS('TScrollBarInc', 'SmallInt');
cl.AddTypeS('TFormBorderStyle', '(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)');
cl.AddTypeS('TBorderStyle', 'TFormBorderStyle');
if cl.FindType('TScrollBarKind') = nil then
cl.AddTypeS('TScrollBarKind', '(sbHorizontal, sbVertical)');
if cl.FindType('TScrollBarInc') = nil then
cl.AddTypeS('TScrollBarInc', 'SmallInt');
if cl.FindType('TFormBorderStyle') = nil then
cl.AddTypeS('TFormBorderStyle', '(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)');
if cl.FindType('TBorderStyle') = nil then
cl.AddTypeS('TBorderStyle', 'TFormBorderStyle');
cl.AddTypeS('TWindowState', '(wsNormal, wsMinimized, wsMaximized)');
cl.AddTypeS('TFormStyle', '(fsNormal, fsMDIChild, fsMDIForm, fsStayOnTop)');
{$IFDEF DELPHI_SEATTLE_UP}
Expand All @@ -280,7 +294,8 @@ procedure SIRegister_Forms_TypesAndConsts(Cl: TPSPascalCompiler);
cl.AddTypeS('TCloseQueryEvent' ,'procedure(Sender: TObject; var CanClose: Boolean)');
cl.AddTypeS('TBorderIcon' ,'(biSystemMenu, biMinimize, biMaximize, biHelp)');
cl.AddTypeS('TBorderIcons', 'set of TBorderIcon');
cl.AddTypeS('THelpContext', 'LongInt');
if cl.FindType('THelpContext') = nil then
cl.AddTypeS('THelpContext', 'LongInt');
{$IFNDEF CLX}
if cl.FindType('HWND') = nil then
cl.AddTypeS('HWND', 'NativeUInt');
Expand Down
7 changes: 7 additions & 0 deletions Source/uPSC_graphics.pas
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ procedure SIRegisterTCanvas(cl: TPSPascalCompiler); // requires TPersistent
begin
with Cl.AddClassN(cl.FindClass('TPersistent'), 'TCanvas') do
begin
{$IFNDEF FPC}
RegisterMethod('constructor Create');
{$ENDIF}
RegisterMethod('procedure Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);');
RegisterMethod('procedure Chord(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);');
RegisterMethod('procedure Draw(X, Y: Integer; Graphic: TGraphic);');
Expand Down Expand Up @@ -199,7 +202,11 @@ procedure SIRegister_Graphics_TypesAndConsts(Cl: TPSPascalCompiler);
Cl.addTypeS('TFontStyles', 'set of TFontStyle');

cl.AddTypeS('TFontPitch', '(fpDefault, fpVariable, fpFixed)');
{$IFDEF DELPHI2006UP}
cl.AddTypeS('TPenStyle', '(psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame, psUserStyle, psAlternate)');
{$ELSE}
cl.AddTypeS('TPenStyle', '(psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame)');
{$ENDIF}
cl.AddTypeS('TPenMode', '(pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor)');
cl.AddTypeS('TBrushStyle', '(bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross)');
cl.addTypeS('TColor', 'Integer');
Expand Down
56 changes: 43 additions & 13 deletions Source/uPSC_menus.pas
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,42 @@ procedure SIRegisterTPOPUPLIST(CL: TPSPascalCompiler);
end;
end;

procedure SIRegisterTPOPUPMENU(CL: TPSPascalCompiler);
{ The members naming a menu type of the classes registered before it: their own
declaration names a type the compiler did not hold yet, and was dropped. }
procedure _RegisterMenuMembers(Cl: TPSPascalCompiler);
const
cClasses: array[0..17] of AnsiString = ('TGroupBox', 'TLabel', 'TEdit', 'TMemo', 'TComboBox',
'TButton', 'TCheckBox', 'TRadioButton', 'TListBox', 'TScrollBar', 'TImage', 'TPaintBox',
'TPanel', 'TNotebook', 'THeader', 'TRadioGroup', 'TScrollBox', 'TForm');
var
cc: TPSCompileTimeClass;
lClass : TPSCompileTimeClass;
lItem : TPSDelphiClassItem;
lClassIdx : Integer;
begin
for lClassIdx := Low(cClasses) to High(cClasses) do begin
lClass := Cl.FindClass(cClasses[lClassIdx]);
if Assigned(lClass) and not lClass.Property_Find('POPUPMENU', lItem) then
lClass.RegisterProperty('PopupMenu', 'TPopupMenu', iptRW);
end;
lClass := Cl.FindClass('TForm');
if Assigned(lClass) then begin
if not lClass.Property_Find('MENU', lItem) then
lClass.RegisterProperty('Menu', 'TMainMenu', iptRW);
if not lClass.Property_Find('OBJECTMENUITEM', lItem) then
lClass.RegisterProperty('ObjectMenuItem', 'TMenuItem', iptRW);
if not lClass.Property_Find('WINDOWMENU', lItem) then
lClass.RegisterProperty('WindowMenu', 'TMenuItem', iptRW);
end;
lClass := Cl.FindClass('TMenuItem');
if Assigned(lClass) and not lClass.Func_Find('GETPARENTMENU', lItem) then
lClass.RegisterMethod('function GetParentMenu: TMenu');
end;

procedure SIRegisterTPOPUPMENU(CL: TPSPascalCompiler);
begin
With cl.AddClassN(Cl.FindClass('TMenu'),'TPopupMenu') do
begin
cc := Cl.FindClass('TLabel');
if cc <> nil then
RegisterProperty('PopupMenu', 'TPopupMenu', iptRW);
with Cl.FindClass('TForm') do
begin
RegisterProperty('PopupMenu', 'TPopupMenu', iptRW);
end;
_RegisterMenuMembers(Cl);
RegisterMethod('constructor Create(AOwner: TComponent)');
RegisterMethod('procedure Popup(X, Y: Integer)');
RegisterProperty('PopupComponent', 'TComponent', iptrw);
Expand Down Expand Up @@ -77,8 +100,9 @@ procedure SIRegisterTMENU(CL: TPSPascalCompiler);
RegisterMethod('constructor Create(AOwner: TComponent)');
RegisterMethod('function DispatchCommand(ACommand: Word): Boolean');
RegisterMethod('function DispatchPopup(AHandle: HMENU): Boolean');
RegisterMethod('function FindItem(Value: Integer; Kind: TFindItemKind): TMenuItem');
RegisterMethod('function GetHelpContext(Value: Integer; ByCommand: Boolean): THelpContext');
{ the searches' value is as wide as a menu handle in Delphi's declaration }
RegisterMethod('function FindItem(Value: ' + {$IFDEF FPC}'Integer'{$ELSE}'NativeUInt'{$ENDIF} + '; Kind: TFindItemKind): TMenuItem');
RegisterMethod('function GetHelpContext(Value: ' + {$IFDEF FPC}'Integer'{$ELSE}'NativeUInt'{$ENDIF} + '; ByCommand: Boolean): THelpContext');
RegisterProperty('Images', 'TCustomImageList', iptrw);
RegisterMethod('function IsRightToLeft: Boolean');
RegisterMethod('procedure ParentBiDiModeChanged(AControl: TObject)');
Expand Down Expand Up @@ -152,12 +176,18 @@ procedure SIRegisterTMENUITEM(CL: TPSPascalCompiler);

procedure SIRegister_Menus(Cl: TPSPascalCompiler);
begin
if Cl.FindType('THelpContext') = nil then
Cl.AddTypeS('THelpContext', 'LongInt');
Cl.AddTypeS('HMENU', 'NativeUInt');
Cl.AddTypeS('HACCEL', 'NativeUInt');

cl.addClassN(cl.FindClass('Exception'),'EMenuError');
Cl.addTypeS('TMenuBreak', '(mbNone, mbBreak, mbBarBreak)');
{$IFNDEF FPC}
if Cl.FindType('TOwnerDrawState') = nil then begin
Cl.addTypeS('TEOwnerDrawState', '(odSelected, odGrayed, odDisabled, odChecked, odFocused, odDefault, odHotLight, odInactive, odNoAccel, odNoFocusRect, odReserved1, odReserved2, odComboBoxEdit)');
Cl.AddTypeS('TOwnerDrawState', 'set of TEOwnerDrawState');
end;
Cl.addTypeS('TMenuDrawItemEvent', 'procedure (Sender: TObject; ACanvas: TCanvas; ARect: TRect; Selected: Boolean)');

Cl.addTypeS('TAdvancedMenuDrawItemEvent', 'procedure (Sender: TObject; ACanvas: TCanvas; ARect: TRect; State: TOwnerDrawState)');
Expand Down Expand Up @@ -199,9 +229,9 @@ procedure SIRegister_Menus(Cl: TPSPascalCompiler);
Cl.AddDelphiFunction('function NewPopupMenu(Owner: TComponent; const AName: string; Alignment: TPopupAlignment; AutoPopup: Boolean; const Items: array of TCMenuItem): TPopupMenu');


Cl.AddDelphiFunction('function NewSubMenu(const ACaption: string; HCTX: Word; const AName: string; Items: array of TMenuItem; AEnabled: Boolean): TMenuItem');
Cl.AddDelphiFunction('function NewSubMenu(const ACaption: string; HCTX: THelpContext; const AName: string; Items: array of TMenuItem; AEnabled: Boolean): TMenuItem');

Cl.AddDelphiFunction('function NewItem(const ACaption: string; AShortCut: TShortCut; Achecked, AEnabled: Boolean; AOnClick: TNotifyEvent; HCTX: Word; const AName: string): TMenuItem');
Cl.AddDelphiFunction('function NewItem(const ACaption: string; AShortCut: TShortCut; Achecked, AEnabled: Boolean; AOnClick: TNotifyEvent; HCTX: THelpContext; const AName: string): TMenuItem');


Cl.AddDelphiFunction('function NewLine: TMenuItem');
Expand Down
19 changes: 17 additions & 2 deletions Source/uPSC_stdctrls.pas
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ procedure SIRegisterTLABEL(Cl: TPSPascalCompiler);
RegisterProperty('ParentColor', 'Boolean', iptrw);
RegisterProperty('ParentFont', 'Boolean', iptrw);
RegisterProperty('ParentShowHint', 'Boolean', iptrw);
RegisterProperty('PopupMenu', 'TPopupMenu', iptrw);
RegisterProperty('ShowAccelChar', 'Boolean', iptrw);
RegisterProperty('Transparent', 'Boolean', iptrw);
RegisterProperty('WordWrap', 'Boolean', iptrw);
Expand Down Expand Up @@ -646,17 +647,31 @@ procedure SIRegisterTSCROLLBAR(Cl: TPSPascalCompiler);
procedure SIRegister_StdCtrls_TypesAndConsts(cl: TPSPascalCompiler);
begin
cl.AddTypeS('TEditCharCase', '(ecNormal, ecUpperCase, ecLowerCase)');
if cl.FindType('TScrollBarKind') = nil then
cl.AddTypeS('TScrollBarKind', '(sbHorizontal, sbVertical)');
if cl.FindType('TScrollBarInc') = nil then
cl.AddTypeS('TScrollBarInc', 'SmallInt');
if cl.FindType('TFormBorderStyle') = nil then
cl.AddTypeS('TFormBorderStyle', '(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)');
if cl.FindType('TBorderStyle') = nil then
cl.AddTypeS('TBorderStyle', 'TFormBorderStyle');
cl.AddTypeS('TScrollStyle', '(ssNone, ssHorizontal, ssVertical, ssBoth)');
cl.AddTypeS('TComboBoxStyle', '(csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable)');
{$IFDEF DELPHI23UP}
cl.AddTypeS('TButtonStyle', '(bsPushButton, bsCommandLink, bsSplitButton)');
{$ENDIF}
cl.AddTypeS('TCheckBoxState', '(cbUnchecked, cbChecked, cbGrayed)');
{$IFDEF FPC}
cl.AddTypeS('TListBoxStyle', '(lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable)');
{$ELSE}
cl.AddTypeS('TListBoxStyle', '(lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable, lbVirtual, lbVirtualOwnerDraw)');
{$ENDIF}
cl.AddTypeS('TScrollCode', '(scLineUp, scLineDown, scPageUp, scPageDown, scPosition, scTrack, scTop, scBottom, scEndScroll)');
Cl.addTypeS('TEOwnerDrawState', '(odSelected, odGrayed, odDisabled, odChecked, odFocused, odDefault, odHotLight, odInactive, odNoAccel, odNoFocusRect, odReserved1, odReserved2, odComboBoxEdit)');
cl.AddTypeS('TTextLayout', '(tlTop, tlCenter, tlBottom)');
cl.AddTypeS('TOwnerDrawState', 'set of TEOwnerDrawState');
if cl.FindType('TOwnerDrawState') = nil then begin
Cl.addTypeS('TEOwnerDrawState', '(odSelected, odGrayed, odDisabled, odChecked, odFocused, odDefault, odHotLight, odInactive, odNoAccel, odNoFocusRect, odReserved1, odReserved2, odComboBoxEdit)');
cl.AddTypeS('TOwnerDrawState', 'set of TEOwnerDrawState');
end;

cl.AddTypeS('TDrawItemEvent', 'procedure(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState)');
cl.AddTypeS('TMeasureItemEvent', 'procedure(Control: TWinControl; Index: Integer; var Height: Integer)');
Expand Down
Loading