You've already forked lazarus-ccr
chelper: replace TNotebook with TPageControl
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2197 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -22,7 +22,8 @@ program cconvert;
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils,Classes,
|
SysUtils,Classes,
|
||||||
ctopasconvert,cparsertypes, cparserutils, cconvconfig, objcparsing;
|
ctopasconvert, cparsertypes, cparserutils, cconvconfig, objcparsing,
|
||||||
|
commonsrcgen;
|
||||||
|
|
||||||
var
|
var
|
||||||
ConfigFile : AnsiString = '';
|
ConfigFile : AnsiString = '';
|
||||||
|
@ -1,13 +1,20 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<Package Version="3">
|
<Package Version="4">
|
||||||
<Name Value="chelper"/>
|
<Name Value="chelper"/>
|
||||||
|
<AddToProjectUsesSection Value="True"/>
|
||||||
<Author Value="Dmitry 'skalogrz' Boyarintsev"/>
|
<Author Value="Dmitry 'skalogrz' Boyarintsev"/>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="9"/>
|
<Version Value="10"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<GenerateDebugInfo Value="True"/>
|
||||||
|
<DebugInfoType Value="dsAuto"/>
|
||||||
|
</Debugging>
|
||||||
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
@ -15,7 +22,7 @@
|
|||||||
<Description Value="The IDE extension usefull for C headers convertion"/>
|
<Description Value="The IDE extension usefull for C headers convertion"/>
|
||||||
<License Value="LGPL"/>
|
<License Value="LGPL"/>
|
||||||
<Version Minor="9"/>
|
<Version Minor="9"/>
|
||||||
<Files Count="5">
|
<Files Count="6">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="tosourceeditor.pas"/>
|
<Filename Value="tosourceeditor.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
@ -27,7 +34,6 @@
|
|||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
<Item3>
|
||||||
<Filename Value="extconvdialog.pas"/>
|
<Filename Value="extconvdialog.pas"/>
|
||||||
<HasResources Value="True"/>
|
|
||||||
<UnitName Value="extconvdialog"/>
|
<UnitName Value="extconvdialog"/>
|
||||||
</Item3>
|
</Item3>
|
||||||
<Item4>
|
<Item4>
|
||||||
@ -38,6 +44,10 @@
|
|||||||
<Filename Value="converteridesettings.pas"/>
|
<Filename Value="converteridesettings.pas"/>
|
||||||
<UnitName Value="converteridesettings"/>
|
<UnitName Value="converteridesettings"/>
|
||||||
</Item5>
|
</Item5>
|
||||||
|
<Item6>
|
||||||
|
<Filename Value="extconvdialog.lfm"/>
|
||||||
|
<Type Value="LFM"/>
|
||||||
|
</Item6>
|
||||||
</Files>
|
</Files>
|
||||||
<Type Value="RunAndDesignTime"/>
|
<Type Value="RunAndDesignTime"/>
|
||||||
<RequiredPkgs Count="3">
|
<RequiredPkgs Count="3">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
object CtoPasConfig: TCtoPasConfig
|
object CtoPasConfig: TCtoPasConfig
|
||||||
Left = 406
|
Left = 482
|
||||||
Height = 584
|
Height = 584
|
||||||
Top = 128
|
Top = 106
|
||||||
Width = 668
|
Width = 668
|
||||||
Caption = 'C to Pascal settings'
|
Caption = 'C to Pascal settings'
|
||||||
ClientHeight = 584
|
ClientHeight = 584
|
||||||
@ -9,27 +9,33 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '0.9.31'
|
||||||
object Notebook1: TNotebook
|
object PageControl1: TPageControl
|
||||||
Left = 16
|
Left = 10
|
||||||
Height = 559
|
Height = 564
|
||||||
Top = 8
|
Top = 10
|
||||||
Width = 635
|
Width = 648
|
||||||
PageIndex = 0
|
ActivePage = ConvPage
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Align = alClient
|
||||||
|
BorderSpacing.Left = 5
|
||||||
|
BorderSpacing.Top = 5
|
||||||
|
BorderSpacing.Right = 5
|
||||||
|
BorderSpacing.Bottom = 5
|
||||||
|
BorderSpacing.Around = 5
|
||||||
|
TabIndex = 1
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TabStop = True
|
object MainPage: TTabSheet
|
||||||
object pageMain: TPage
|
Caption = 'Main'
|
||||||
ClientWidth = 635
|
ClientHeight = 525
|
||||||
ClientHeight = 559
|
ClientWidth = 642
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 228
|
Height = 170
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 635
|
Width = 642
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 228
|
ClientHeight = 170
|
||||||
ClientWidth = 635
|
ClientWidth = 642
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
@ -40,46 +46,59 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object chkRecordsPacked: TCheckBox
|
object chkRecordsPacked: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Label1
|
||||||
|
AnchorSideTop.Control = Label1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 18
|
Height = 18
|
||||||
Top = 36
|
Top = 27
|
||||||
Width = 144
|
Width = 144
|
||||||
|
BorderSpacing.Top = 5
|
||||||
Caption = 'Records are packed'
|
Caption = 'Records are packed'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object chkFuncAreExt: TCheckBox
|
object chkFuncAreExt: TCheckBox
|
||||||
|
AnchorSideLeft.Control = chkRecordsPacked
|
||||||
|
AnchorSideTop.Control = chkRecordsPacked
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 18
|
Height = 18
|
||||||
Top = 70
|
Top = 50
|
||||||
Width = 161
|
Width = 161
|
||||||
|
BorderSpacing.Top = 5
|
||||||
Caption = 'Functions are external'
|
Caption = 'Functions are external'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object chkEnums: TCheckBox
|
object chkEnums: TCheckBox
|
||||||
|
AnchorSideTop.Control = txtLibName
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 18
|
Height = 18
|
||||||
Top = 132
|
Top = 103
|
||||||
Width = 244
|
Width = 244
|
||||||
|
BorderSpacing.Top = 5
|
||||||
Caption = 'Enumerations are Integer constants'
|
Caption = 'Enumerations are Integer constants'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object lblCallConv: TLabel
|
object lblCallConv: TLabel
|
||||||
AnchorSideLeft.Control = chkFuncAreExt
|
AnchorSideLeft.Control = chkFuncAreExt
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = chkFuncAreExt
|
||||||
Left = 187
|
Left = 187
|
||||||
Height = 17
|
Height = 17
|
||||||
Top = 71
|
Top = 50
|
||||||
Width = 118
|
Width = 122
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
Caption = 'Calling convention'
|
Caption = 'Calling convention:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object cmbCallConv: TComboBox
|
object cmbCallConv: TComboBox
|
||||||
AnchorSideLeft.Control = lblCallConv
|
AnchorSideLeft.Control = lblCallConv
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
Left = 325
|
AnchorSideTop.Control = lblCallConv
|
||||||
|
Left = 329
|
||||||
Height = 21
|
Height = 21
|
||||||
Top = 70
|
Top = 50
|
||||||
Width = 160
|
Width = 160
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
@ -95,43 +114,51 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
Text = 'cdecl'
|
Text = 'cdecl'
|
||||||
end
|
end
|
||||||
object lblDefines: TLabel
|
object lblDefines: TLabel
|
||||||
|
AnchorSideTop.Control = chkEnums
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 17
|
Height = 17
|
||||||
Top = 172
|
Top = 131
|
||||||
Width = 52
|
Width = 52
|
||||||
|
BorderSpacing.Top = 10
|
||||||
Caption = 'Defines:'
|
Caption = 'Defines:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object edtDefines: TEdit
|
object edtDefines: TEdit
|
||||||
AnchorSideLeft.Control = lblDefines
|
AnchorSideLeft.Control = lblDefines
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = chkEnums
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = btnSelect
|
AnchorSideRight.Control = btnSelect
|
||||||
Left = 64
|
Left = 64
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 172
|
Top = 131
|
||||||
Width = 394
|
Width = 411
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
|
BorderSpacing.Top = 10
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object btnSelect: TButton
|
object btnSelect: TButton
|
||||||
|
AnchorSideTop.Control = btnEdit
|
||||||
AnchorSideRight.Control = btnEdit
|
AnchorSideRight.Control = btnEdit
|
||||||
Left = 464
|
Left = 481
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 172
|
Top = 131
|
||||||
Width = 70
|
Width = 70
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Right = 20
|
BorderSpacing.Right = 10
|
||||||
Caption = 'Select'
|
Caption = 'Select'
|
||||||
OnClick = btnSelectClick
|
OnClick = btnSelectClick
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object btnEdit: TButton
|
object btnEdit: TButton
|
||||||
Left = 554
|
AnchorSideTop.Control = edtDefines
|
||||||
|
Left = 561
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 172
|
Top = 131
|
||||||
Width = 70
|
Width = 70
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Edit'
|
Caption = 'Edit'
|
||||||
@ -140,19 +167,23 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
end
|
end
|
||||||
object txtLibName: TEdit
|
object txtLibName: TEdit
|
||||||
AnchorSideLeft.Control = cmbCallConv
|
AnchorSideLeft.Control = cmbCallConv
|
||||||
Left = 325
|
AnchorSideTop.Control = cmbCallConv
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 329
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 100
|
Top = 76
|
||||||
Width = 299
|
Width = 302
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 5
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
end
|
end
|
||||||
object lblExtLibName: TLabel
|
object lblExtLibName: TLabel
|
||||||
AnchorSideLeft.Control = chkFuncAreExt
|
AnchorSideLeft.Control = chkFuncAreExt
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = txtLibName
|
||||||
Left = 187
|
Left = 187
|
||||||
Height = 17
|
Height = 17
|
||||||
Top = 103
|
Top = 76
|
||||||
Width = 83
|
Width = 83
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
Caption = 'Library name'
|
Caption = 'Library name'
|
||||||
@ -161,21 +192,21 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
end
|
end
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 331
|
Height = 355
|
||||||
Top = 228
|
Top = 170
|
||||||
Width = 635
|
Width = 642
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Alignment = taLeftJustify
|
Alignment = taLeftJustify
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 331
|
ClientHeight = 355
|
||||||
ClientWidth = 635
|
ClientWidth = 642
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 5
|
Height = 5
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 635
|
Width = 642
|
||||||
Align = alTop
|
Align = alTop
|
||||||
ResizeAnchor = akTop
|
ResizeAnchor = akTop
|
||||||
end
|
end
|
||||||
@ -189,9 +220,9 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
end
|
end
|
||||||
object Memo1: TMemo
|
object Memo1: TMemo
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 281
|
Height = 305
|
||||||
Top = 44
|
Top = 44
|
||||||
Width = 623
|
Width = 630
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
@ -204,7 +235,7 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
Left = 476
|
Left = 476
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 14
|
Top = 14
|
||||||
Width = 153
|
Width = 160
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'Reset to defaults'
|
Caption = 'Reset to defaults'
|
||||||
@ -213,16 +244,17 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pageConverter: TPage
|
object ConvPage: TTabSheet
|
||||||
ClientWidth = 2464
|
Caption = 'Converter'
|
||||||
ClientHeight = 1528
|
ClientHeight = 525
|
||||||
|
ClientWidth = 642
|
||||||
object edtExtTool: TEdit
|
object edtExtTool: TEdit
|
||||||
AnchorSideTop.Control = chkUseExternal
|
AnchorSideTop.Control = chkUseExternal
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 13
|
Left = 13
|
||||||
Height = 21
|
Height = 22
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 511
|
Width = 959
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 10
|
BorderSpacing.Top = 10
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -230,7 +262,7 @@ object CtoPasConfig: TCtoPasConfig
|
|||||||
object Button1: TButton
|
object Button1: TButton
|
||||||
AnchorSideTop.Control = chkUseExternal
|
AnchorSideTop.Control = chkUseExternal
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 538
|
Left = 986
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 70
|
Width = 70
|
||||||
|
@ -6,7 +6,9 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes,SysUtils,FileUtil,Forms,Controls,Graphics,Dialogs,StdCtrls,ExtCtrls,
|
Classes,SysUtils,FileUtil,Forms,Controls,Graphics,Dialogs,StdCtrls,ExtCtrls,
|
||||||
converteridesettings, ctopasconvert, LazIDEIntf;
|
converteridesettings, ctopasconvert,
|
||||||
|
//LazIDEIntf,
|
||||||
|
ComCtrls;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -22,6 +24,9 @@ type
|
|||||||
chkFuncAreExt:TCheckBox;
|
chkFuncAreExt:TCheckBox;
|
||||||
chkEnums:TCheckBox;
|
chkEnums:TCheckBox;
|
||||||
cmbCallConv:TComboBox;
|
cmbCallConv:TComboBox;
|
||||||
|
PageControl1: TPageControl;
|
||||||
|
MainPage: TTabSheet;
|
||||||
|
ConvPage: TTabSheet;
|
||||||
txtLibName:TEdit;
|
txtLibName:TEdit;
|
||||||
edtDefines:TEdit;
|
edtDefines:TEdit;
|
||||||
edtExtTool: TEdit;
|
edtExtTool: TEdit;
|
||||||
@ -31,10 +36,8 @@ type
|
|||||||
lblExtLibName:TLabel;
|
lblExtLibName:TLabel;
|
||||||
lblDefines:TLabel;
|
lblDefines:TLabel;
|
||||||
Memo1:TMemo;
|
Memo1:TMemo;
|
||||||
Notebook1:TNotebook;
|
Notebook1:TPageControl;
|
||||||
OpenDialog1: TOpenDialog;
|
OpenDialog1: TOpenDialog;
|
||||||
pageMain:TPage;
|
|
||||||
pageConverter:TPage;
|
|
||||||
Panel1:TPanel;
|
Panel1:TPanel;
|
||||||
Panel2:TPanel;
|
Panel2:TPanel;
|
||||||
Splitter1:TSplitter;
|
Splitter1:TSplitter;
|
||||||
@ -114,7 +117,7 @@ begin
|
|||||||
except
|
except
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
LazarusIDE.DoOpenEditorFile(edtDefines.Text, 0, 0, [ofQuiet, ofRegularFile, ofDoNotLoadResource, ofDoLoadResource]);
|
//LazarusIDE.DoOpenEditorFile(edtDefines.Text, 0, 0, [ofQuiet, ofRegularFile, ofDoNotLoadResource, ofDoLoadResource]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCtoPasConfig.FormClose(Sender:TObject;var CloseAction:TCloseAction);
|
procedure TCtoPasConfig.FormClose(Sender:TObject;var CloseAction:TCloseAction);
|
||||||
|
Reference in New Issue
Block a user