mirror of https://gitlab.com/basile.b/dexed.git
This commit is contained in:
parent
63e5c9ab19
commit
9f2e572f6d
|
@ -34,7 +34,7 @@ object TCEProject
|
||||||
documentationOptions.generateJSON = False
|
documentationOptions.generateJSON = False
|
||||||
documentationOptions.DocumentationDirectory = '..\doc'
|
documentationOptions.DocumentationDirectory = '..\doc'
|
||||||
debugingOptions.debug = True
|
debugingOptions.debug = True
|
||||||
debugingOptions.debugIdentifier = '2'
|
debugingOptions.debugIdentifier = '1'
|
||||||
debugingOptions.addDInformations = False
|
debugingOptions.addDInformations = False
|
||||||
debugingOptions.addCInformations = False
|
debugingOptions.addCInformations = False
|
||||||
debugingOptions.generateMapFile = False
|
debugingOptions.generateMapFile = False
|
||||||
|
@ -54,7 +54,6 @@ object TCEProject
|
||||||
outputOptions.release = False
|
outputOptions.release = False
|
||||||
outputOptions.unittest = True
|
outputOptions.unittest = True
|
||||||
outputOptions.versionIdentifier = 'revision_1'
|
outputOptions.versionIdentifier = 'revision_1'
|
||||||
pathsOptions.outputFilename = '..\output\main.exe'
|
|
||||||
end>
|
end>
|
||||||
Sources.Strings = (
|
Sources.Strings = (
|
||||||
'..\src\main.d'
|
'..\src\main.d'
|
||||||
|
|
|
@ -12,5 +12,6 @@ class Bar{
|
||||||
debug(1) writeln("bar says: debug level < 2");
|
debug(1) writeln("bar says: debug level < 2");
|
||||||
debug(2) writeln("bar says: debug level < 3");
|
debug(2) writeln("bar says: debug level < 3");
|
||||||
debug(3) writeln("bar says: debug level < 4");
|
debug(3) writeln("bar says: debug level < 4");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,5 +12,6 @@ class Foo{
|
||||||
debug(1) writeln("foo says: debug level < 2");
|
debug(1) writeln("foo says: debug level < 2");
|
||||||
debug(2) writeln("foo says: debug level < 3");
|
debug(2) writeln("foo says: debug level < 3");
|
||||||
debug(3) writeln("foo says: debug level < 4");
|
debug(3) writeln("foo says: debug level < 4");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,4 +17,6 @@ void main(string args[])
|
||||||
{
|
{
|
||||||
auto foo = new Foo;
|
auto foo = new Foo;
|
||||||
auto bar = new Bar;
|
auto bar = new Bar;
|
||||||
|
|
||||||
|
readln;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,7 @@ type
|
||||||
procedure afterChanged;
|
procedure afterChanged;
|
||||||
procedure reset;
|
procedure reset;
|
||||||
function getAbsoluteSourceName(const aIndex: integer): string;
|
function getAbsoluteSourceName(const aIndex: integer): string;
|
||||||
|
function getAbsoluteFilename(const aFilename: string): string;
|
||||||
procedure addSource(const aFilename: string);
|
procedure addSource(const aFilename: string);
|
||||||
function addConfiguration: TCompilerConfiguration;
|
function addConfiguration: TCompilerConfiguration;
|
||||||
function getOpts: string;
|
function getOpts: string;
|
||||||
|
@ -222,8 +223,12 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEProject.setOptsColl(const aValue: TCollection);
|
procedure TCEProject.setOptsColl(const aValue: TCollection);
|
||||||
|
var
|
||||||
|
i: nativeInt;
|
||||||
begin
|
begin
|
||||||
fOptsColl.Assign(aValue);
|
fOptsColl.Assign(aValue);
|
||||||
|
for i:= 0 to self.fOptsColl.Count-1 do
|
||||||
|
Configuration[i].onChanged := @subMemberChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEProject.addSource(const aFilename: string);
|
procedure TCEProject.addSource(const aFilename: string);
|
||||||
|
@ -314,7 +319,7 @@ end;
|
||||||
function TCEProject.getConfig(const ix: integer): TCompilerConfiguration;
|
function TCEProject.getConfig(const ix: integer): TCompilerConfiguration;
|
||||||
begin
|
begin
|
||||||
result := TCompilerConfiguration(fOptsColl.Items[ix]);
|
result := TCompilerConfiguration(fOptsColl.Items[ix]);
|
||||||
//result.onChanged := @subMemberChanged;
|
result.onChanged := @subMemberChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEProject.getCurrConf: TCompilerConfiguration;
|
function TCEProject.getCurrConf: TCompilerConfiguration;
|
||||||
|
@ -377,5 +382,10 @@ begin
|
||||||
result := expandFileNameEx(fBasePath, fSrcs.Strings[aIndex]);
|
result := expandFileNameEx(fBasePath, fSrcs.Strings[aIndex]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCEProject.getAbsoluteFilename(const aFilename: string): string;
|
||||||
|
begin
|
||||||
|
result := expandFileNameEx(fBasePath, aFilename);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -713,6 +713,7 @@ end;
|
||||||
|
|
||||||
destructor TCompilerConfiguration.destroy;
|
destructor TCompilerConfiguration.destroy;
|
||||||
begin
|
begin
|
||||||
|
fOnChanged := nil;
|
||||||
fDocOpts.free;
|
fDocOpts.free;
|
||||||
fDebugOpts.free;
|
fDebugOpts.free;
|
||||||
fMsgOpts.free;
|
fMsgOpts.free;
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
inherited CEEditorWidget: TCEEditorWidget
|
inherited CEEditorWidget: TCEEditorWidget
|
||||||
Left = 1167
|
Left = 1098
|
||||||
Height = 336
|
Height = 405
|
||||||
Top = 89
|
Top = 89
|
||||||
Width = 508
|
Width = 556
|
||||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||||
Caption = 'EditorWidget'
|
Caption = 'Source editor'
|
||||||
ClientHeight = 336
|
ClientHeight = 405
|
||||||
ClientWidth = 508
|
ClientWidth = 556
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 336
|
Height = 405
|
||||||
Width = 508
|
Width = 556
|
||||||
ClientHeight = 336
|
ClientHeight = 405
|
||||||
ClientWidth = 508
|
ClientWidth = 556
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 310
|
Height = 379
|
||||||
Width = 508
|
Width = 556
|
||||||
ClientHeight = 306
|
ClientHeight = 379
|
||||||
ClientWidth = 504
|
ClientWidth = 556
|
||||||
object PageControl: TExtendedNotebook[0]
|
object PageControl: TExtendedNotebook[0]
|
||||||
Left = 2
|
Left = 3
|
||||||
Height = 279
|
Height = 350
|
||||||
Top = 2
|
Top = 3
|
||||||
Width = 500
|
Width = 550
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
@ -30,10 +30,10 @@ inherited CEEditorWidget: TCEEditorWidget
|
||||||
TabDragAcceptMode = dmAutomatic
|
TabDragAcceptMode = dmAutomatic
|
||||||
end
|
end
|
||||||
object editorStatus: TStatusBar[1]
|
object editorStatus: TStatusBar[1]
|
||||||
Left = 0
|
Left = 1
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 283
|
Top = 355
|
||||||
Width = 504
|
Width = 554
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
Width = 100
|
Width = 100
|
||||||
|
@ -48,7 +48,7 @@ inherited CEEditorWidget: TCEEditorWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited Header: TPanel
|
inherited Header: TPanel
|
||||||
Width = 508
|
Width = 556
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object macRecorder: TSynMacroRecorder[2]
|
object macRecorder: TSynMacroRecorder[2]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
object CEMainForm: TCEMainForm
|
object CEMainForm: TCEMainForm
|
||||||
Left = 1167
|
Left = 1098
|
||||||
Height = 52
|
Height = 52
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 736
|
Width = 805
|
||||||
Caption = 'Coedit'
|
Caption = 'Coedit'
|
||||||
DockSite = True
|
DockSite = True
|
||||||
DragMode = dmAutomatic
|
DragMode = dmAutomatic
|
||||||
|
@ -250,6 +250,9 @@ object CEMainForm: TCEMainForm
|
||||||
27EAB9872E00BB893200BB8A3300BB8A3500BB871D00BB871F00
|
27EAB9872E00BB893200BB8A3300BB8A3500BB871D00BB871F00
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
object MenuItem50: TMenuItem
|
||||||
|
Action = actFileSaveAll
|
||||||
|
end
|
||||||
object MenuItem25: TMenuItem
|
object MenuItem25: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
|
@ -578,7 +581,7 @@ object CEMainForm: TCEMainForm
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
object MenuItem22: TMenuItem
|
object MenuItem22: TMenuItem
|
||||||
Action = actMacStartStop
|
Action = actEdMacStartStop
|
||||||
Bitmap.Data = {
|
Bitmap.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||||
|
@ -617,7 +620,7 @@ object CEMainForm: TCEMainForm
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
object MenuItem23: TMenuItem
|
object MenuItem23: TMenuItem
|
||||||
Action = actMacPlay
|
Action = actEdMacPlay
|
||||||
Bitmap.Data = {
|
Bitmap.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||||
|
@ -1018,6 +1021,15 @@ object CEMainForm: TCEMainForm
|
||||||
0000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
object MenuItem47: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object MenuItem48: TMenuItem
|
||||||
|
Action = actProjRun
|
||||||
|
end
|
||||||
|
object MenuItem49: TMenuItem
|
||||||
|
Action = actProjRunWithArgs
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object MenuItem8: TMenuItem
|
object MenuItem8: TMenuItem
|
||||||
Caption = 'Run'
|
Caption = 'Run'
|
||||||
|
@ -1219,6 +1231,15 @@ object CEMainForm: TCEMainForm
|
||||||
0000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
object MenuItem44: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object MenuItem45: TMenuItem
|
||||||
|
Action = actProjRun
|
||||||
|
end
|
||||||
|
object MenuItem46: TMenuItem
|
||||||
|
Action = actProjRunWithArgs
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object mnuItemWin: TMenuItem
|
object mnuItemWin: TMenuItem
|
||||||
Caption = 'Window'
|
Caption = 'Window'
|
||||||
|
@ -1263,18 +1284,18 @@ object CEMainForm: TCEMainForm
|
||||||
OnExecute = actEdRedoExecute
|
OnExecute = actEdRedoExecute
|
||||||
ShortCut = 24666
|
ShortCut = 24666
|
||||||
end
|
end
|
||||||
object actMacStartStop: TAction
|
object actEdMacStartStop: TAction
|
||||||
Category = 'Edit'
|
Category = 'Edit'
|
||||||
Caption = 'Start/stop macro recording'
|
Caption = 'Start/stop macro recording'
|
||||||
ImageIndex = 10
|
ImageIndex = 10
|
||||||
OnExecute = actMacStartStopExecute
|
OnExecute = actEdMacStartStopExecute
|
||||||
ShortCut = 24658
|
ShortCut = 24658
|
||||||
end
|
end
|
||||||
object actMacPlay: TAction
|
object actEdMacPlay: TAction
|
||||||
Category = 'Edit'
|
Category = 'Edit'
|
||||||
Caption = 'Play macro'
|
Caption = 'Play macro'
|
||||||
ImageIndex = 11
|
ImageIndex = 11
|
||||||
OnExecute = actMacPlayExecute
|
OnExecute = actEdMacPlayExecute
|
||||||
ShortCut = 24656
|
ShortCut = 24656
|
||||||
end
|
end
|
||||||
object actFileSave: TAction
|
object actFileSave: TAction
|
||||||
|
@ -1383,11 +1404,25 @@ object CEMainForm: TCEMainForm
|
||||||
Category = 'Project'
|
Category = 'Project'
|
||||||
Caption = 'Compile and run project'
|
Caption = 'Compile and run project'
|
||||||
ImageIndex = 21
|
ImageIndex = 21
|
||||||
|
OnExecute = actProjCompileAndRunExecute
|
||||||
end
|
end
|
||||||
object actProjCompAndRunWithArgs: TAction
|
object actProjCompAndRunWithArgs: TAction
|
||||||
Category = 'Project'
|
Category = 'Project'
|
||||||
Caption = 'Compile and run project...'
|
Caption = 'Compile and run project...'
|
||||||
ImageIndex = 21
|
ImageIndex = 21
|
||||||
|
OnExecute = actProjCompAndRunWithArgsExecute
|
||||||
|
end
|
||||||
|
object actProjRun: TAction
|
||||||
|
Category = 'Project'
|
||||||
|
Caption = 'Run project'
|
||||||
|
ImageIndex = 21
|
||||||
|
OnExecute = actProjRunExecute
|
||||||
|
end
|
||||||
|
object actProjRunWithArgs: TAction
|
||||||
|
Category = 'Project'
|
||||||
|
Caption = 'Run project...'
|
||||||
|
ImageIndex = 21
|
||||||
|
OnExecute = actProjRunWithArgsExecute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object imgList: TImageList
|
object imgList: TImageList
|
||||||
|
@ -2292,4 +2327,9 @@ object CEMainForm: TCEMainForm
|
||||||
003300000023FFFFFF00FFFFFF00
|
003300000023FFFFFF00FFFFFF00
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
object ApplicationProperties1: TApplicationProperties
|
||||||
|
HintPause = 2
|
||||||
|
HintShortPause = 2
|
||||||
|
left = 96
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
115
src/ce_main.pas
115
src/ce_main.pas
|
@ -22,9 +22,11 @@ type
|
||||||
actFileOpen: TAction;
|
actFileOpen: TAction;
|
||||||
actFileSaveAs: TAction;
|
actFileSaveAs: TAction;
|
||||||
actFileSave: TAction;
|
actFileSave: TAction;
|
||||||
|
actFileCompAndRunWithArgs: TAction;
|
||||||
|
actProjRun: TAction;
|
||||||
|
actProjRunWithArgs: TAction;
|
||||||
actProjCompile: TAction;
|
actProjCompile: TAction;
|
||||||
actProjCompileAndRun: TAction;
|
actProjCompileAndRun: TAction;
|
||||||
ActFileCompAndRunWithArgs: TAction;
|
|
||||||
actProjCompAndRunWithArgs: TAction;
|
actProjCompAndRunWithArgs: TAction;
|
||||||
actProjClose: TAction;
|
actProjClose: TAction;
|
||||||
actProjOpts: TAction;
|
actProjOpts: TAction;
|
||||||
|
@ -32,14 +34,15 @@ type
|
||||||
actProjOpen: TAction;
|
actProjOpen: TAction;
|
||||||
actProjSave: TAction;
|
actProjSave: TAction;
|
||||||
actProjSaveAs: TAction;
|
actProjSaveAs: TAction;
|
||||||
actMacPlay: TAction;
|
actEdMacPlay: TAction;
|
||||||
actMacStartStop: TAction;
|
actEdMacStartStop: TAction;
|
||||||
actEdCut: TAction;
|
actEdCut: TAction;
|
||||||
actEdRedo: TAction;
|
actEdRedo: TAction;
|
||||||
actEdUndo: TAction;
|
actEdUndo: TAction;
|
||||||
actEdPaste: TAction;
|
actEdPaste: TAction;
|
||||||
actEdCopy: TAction;
|
actEdCopy: TAction;
|
||||||
Actions: TActionList;
|
Actions: TActionList;
|
||||||
|
ApplicationProperties1: TApplicationProperties;
|
||||||
imgList: TImageList;
|
imgList: TImageList;
|
||||||
mainMenu: TMainMenu;
|
mainMenu: TMainMenu;
|
||||||
MenuItem1: TMenuItem;
|
MenuItem1: TMenuItem;
|
||||||
|
@ -79,6 +82,13 @@ type
|
||||||
MenuItem41: TMenuItem;
|
MenuItem41: TMenuItem;
|
||||||
MenuItem42: TMenuItem;
|
MenuItem42: TMenuItem;
|
||||||
MenuItem43: TMenuItem;
|
MenuItem43: TMenuItem;
|
||||||
|
MenuItem44: TMenuItem;
|
||||||
|
MenuItem45: TMenuItem;
|
||||||
|
MenuItem46: TMenuItem;
|
||||||
|
MenuItem47: TMenuItem;
|
||||||
|
MenuItem48: TMenuItem;
|
||||||
|
MenuItem49: TMenuItem;
|
||||||
|
MenuItem50: TMenuItem;
|
||||||
mnuItemWin: TMenuItem;
|
mnuItemWin: TMenuItem;
|
||||||
MenuItem4: TMenuItem;
|
MenuItem4: TMenuItem;
|
||||||
MenuItem5: TMenuItem;
|
MenuItem5: TMenuItem;
|
||||||
|
@ -89,14 +99,16 @@ type
|
||||||
procedure actFileAddToProjExecute(Sender: TObject);
|
procedure actFileAddToProjExecute(Sender: TObject);
|
||||||
procedure actFileCloseExecute(Sender: TObject);
|
procedure actFileCloseExecute(Sender: TObject);
|
||||||
procedure actFileCompAndRunExecute(Sender: TObject);
|
procedure actFileCompAndRunExecute(Sender: TObject);
|
||||||
procedure ActFileCompAndRunWithArgsExecute(Sender: TObject);
|
procedure actFileCompAndRunWithArgsExecute(Sender: TObject);
|
||||||
procedure actFileSaveAllExecute(Sender: TObject);
|
procedure actFileSaveAllExecute(Sender: TObject);
|
||||||
|
procedure actProjCompAndRunWithArgsExecute(Sender: TObject);
|
||||||
|
procedure actProjCompileAndRunExecute(Sender: TObject);
|
||||||
procedure actProjCompileExecute(Sender: TObject);
|
procedure actProjCompileExecute(Sender: TObject);
|
||||||
procedure actEdCopyExecute(Sender: TObject);
|
procedure actEdCopyExecute(Sender: TObject);
|
||||||
procedure actEdCutExecute(Sender: TObject);
|
procedure actEdCutExecute(Sender: TObject);
|
||||||
procedure ActionsUpdate(AAction: TBasicAction; var Handled: Boolean);
|
procedure ActionsUpdate(AAction: TBasicAction; var Handled: Boolean);
|
||||||
procedure actMacPlayExecute(Sender: TObject);
|
procedure actEdMacPlayExecute(Sender: TObject);
|
||||||
procedure actMacStartStopExecute(Sender: TObject);
|
procedure actEdMacStartStopExecute(Sender: TObject);
|
||||||
procedure actFileNewExecute(Sender: TObject);
|
procedure actFileNewExecute(Sender: TObject);
|
||||||
procedure actProjNewExecute(Sender: TObject);
|
procedure actProjNewExecute(Sender: TObject);
|
||||||
procedure actFileNewRunExecute(Sender: TObject);
|
procedure actFileNewRunExecute(Sender: TObject);
|
||||||
|
@ -108,6 +120,8 @@ type
|
||||||
procedure actEdRedoExecute(Sender: TObject);
|
procedure actEdRedoExecute(Sender: TObject);
|
||||||
procedure actFileSaveAsExecute(Sender: TObject);
|
procedure actFileSaveAsExecute(Sender: TObject);
|
||||||
procedure actFileSaveExecute(Sender: TObject);
|
procedure actFileSaveExecute(Sender: TObject);
|
||||||
|
procedure actProjRunExecute(Sender: TObject);
|
||||||
|
procedure actProjRunWithArgsExecute(Sender: TObject);
|
||||||
procedure actProjSaveAsExecute(Sender: TObject);
|
procedure actProjSaveAsExecute(Sender: TObject);
|
||||||
procedure actProjSaveExecute(Sender: TObject);
|
procedure actProjSaveExecute(Sender: TObject);
|
||||||
procedure actEdUndoExecute(Sender: TObject);
|
procedure actEdUndoExecute(Sender: TObject);
|
||||||
|
@ -128,7 +142,7 @@ type
|
||||||
procedure ProcessOutputToMsg(const aProcess: TProcess);
|
procedure ProcessOutputToMsg(const aProcess: TProcess);
|
||||||
procedure compileAndRunFile(const edIndex: NativeInt; const runArgs: string = '');
|
procedure compileAndRunFile(const edIndex: NativeInt; const runArgs: string = '');
|
||||||
procedure compileProject(const aProject: TCEProject);
|
procedure compileProject(const aProject: TCEProject);
|
||||||
procedure runProject(const aProject: TCEProject);
|
procedure runProject(const aProject: TCEProject; const runArgs: string = '');
|
||||||
|
|
||||||
// file sub routines
|
// file sub routines
|
||||||
procedure newFile;
|
procedure newFile;
|
||||||
|
@ -166,6 +180,8 @@ implementation
|
||||||
uses
|
uses
|
||||||
SynMacroRecorder;
|
SynMacroRecorder;
|
||||||
|
|
||||||
|
// TODO: warnings, OkCancel dialogs
|
||||||
|
|
||||||
{$REGION std comp methods ******************************************************}
|
{$REGION std comp methods ******************************************************}
|
||||||
constructor TCEMainForm.create(aOwner: TComponent);
|
constructor TCEMainForm.create(aOwner: TComponent);
|
||||||
var
|
var
|
||||||
|
@ -235,8 +251,8 @@ begin
|
||||||
actEdPaste.Enabled := curr.CanPaste;
|
actEdPaste.Enabled := curr.CanPaste;
|
||||||
actEdUndo.Enabled := curr.CanUndo;
|
actEdUndo.Enabled := curr.CanUndo;
|
||||||
actEdRedo.Enabled := curr.CanRedo;
|
actEdRedo.Enabled := curr.CanRedo;
|
||||||
actMacPlay.Enabled := true;
|
actEdMacPlay.Enabled := true;
|
||||||
actMacStartStop.Enabled := true;
|
actEdMacStartStop.Enabled := true;
|
||||||
//
|
//
|
||||||
actFileCompAndRun.Enabled := true;
|
actFileCompAndRun.Enabled := true;
|
||||||
actFileCompAndRunWithArgs.Enabled := true;
|
actFileCompAndRunWithArgs.Enabled := true;
|
||||||
|
@ -251,8 +267,8 @@ begin
|
||||||
actEdPaste.Enabled := false ;
|
actEdPaste.Enabled := false ;
|
||||||
actEdUndo.Enabled := false ;
|
actEdUndo.Enabled := false ;
|
||||||
actEdRedo.Enabled := false ;
|
actEdRedo.Enabled := false ;
|
||||||
actMacPlay.Enabled := false;
|
actEdMacPlay.Enabled := false;
|
||||||
actMacStartStop.Enabled := false;
|
actEdMacStartStop.Enabled := false;
|
||||||
//
|
//
|
||||||
actFileCompAndRun.Enabled := false;
|
actFileCompAndRun.Enabled := false;
|
||||||
actFileCompAndRunWithArgs.Enabled := false;
|
actFileCompAndRunWithArgs.Enabled := false;
|
||||||
|
@ -270,6 +286,8 @@ begin
|
||||||
actProjCompile.Enabled := hasProj;
|
actProjCompile.Enabled := hasProj;
|
||||||
actProjCompileAndRun.Enabled := hasProj;
|
actProjCompileAndRun.Enabled := hasProj;
|
||||||
actProjCompAndRunWithArgs.Enabled := hasProj;
|
actProjCompAndRunWithArgs.Enabled := hasProj;
|
||||||
|
actProjRun.Enabled := hasProj;
|
||||||
|
actProjRunWithArgs.Enabled := hasProj;
|
||||||
|
|
||||||
actFileAddToProj.Enabled := hasEd and hasProj;
|
actFileAddToProj.Enabled := hasEd and hasProj;
|
||||||
|
|
||||||
|
@ -518,7 +536,7 @@ begin
|
||||||
if assigned(curr) then curr.Redo;
|
if assigned(curr) then curr.Redo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actMacPlayExecute(Sender: TObject);
|
procedure TCEMainForm.actEdMacPlayExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
curr: TCESynMemo;
|
curr: TCESynMemo;
|
||||||
begin
|
begin
|
||||||
|
@ -526,7 +544,7 @@ begin
|
||||||
if assigned(curr) then fEditWidg.macRecorder.PlaybackMacro(curr);
|
if assigned(curr) then fEditWidg.macRecorder.PlaybackMacro(curr);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actMacStartStopExecute(Sender: TObject);
|
procedure TCEMainForm.actEdMacStartStopExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
curr: TCESynMemo;
|
curr: TCESynMemo;
|
||||||
begin
|
begin
|
||||||
|
@ -576,6 +594,7 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// TODO: input handling
|
||||||
procedure TCEMainForm.compileAndRunFile(const edIndex: NativeInt; const runArgs: string = '');
|
procedure TCEMainForm.compileAndRunFile(const edIndex: NativeInt; const runArgs: string = '');
|
||||||
var
|
var
|
||||||
dmdproc: TProcess;
|
dmdproc: TProcess;
|
||||||
|
@ -685,10 +704,45 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.runProject(const aProject: TCEProject);
|
procedure TCEMainForm.runProject(const aProject: TCEProject; const runArgs: string = '');
|
||||||
|
var
|
||||||
|
runproc: TProcess;
|
||||||
|
procname: string;
|
||||||
begin
|
begin
|
||||||
if aProject.currentConfiguration.outputOptions.binaryKind <>
|
if aProject.currentConfiguration.outputOptions.binaryKind <>
|
||||||
executable then exit;
|
executable then exit;
|
||||||
|
|
||||||
|
runproc := TProcess.Create(nil);
|
||||||
|
try
|
||||||
|
runproc.Options:= [poNewConsole];
|
||||||
|
|
||||||
|
procname := aProject.currentConfiguration.pathsOptions.outputFilename;
|
||||||
|
if procname <> '' then procname := aProject.getAbsoluteFilename(procname)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
procname := extractFilename(aProject.Sources.Strings[0]);
|
||||||
|
procname := procname[1..length(procname)-2];
|
||||||
|
procname := extractFilePath(aProject.fileName) +
|
||||||
|
DirectorySeparator + procname;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
procname += '.exe';
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
if not fileExists(procname) then
|
||||||
|
begin
|
||||||
|
fMesgWidg.addCeErr('output executable missing: ' + procname);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
runproc.Executable := procname;
|
||||||
|
runproc.Parameters.Text := runArgs;
|
||||||
|
runproc.Execute;
|
||||||
|
|
||||||
|
finally
|
||||||
|
runproc.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actFileCompAndRunExecute(Sender: TObject);
|
procedure TCEMainForm.actFileCompAndRunExecute(Sender: TObject);
|
||||||
|
@ -699,7 +753,7 @@ begin
|
||||||
compileAndRunFile(fEditWidg.editorIndex);
|
compileAndRunFile(fEditWidg.editorIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.ActFileCompAndRunWithArgsExecute(Sender: TObject);
|
procedure TCEMainForm.actFileCompAndRunWithArgsExecute(Sender: TObject);
|
||||||
var
|
var
|
||||||
runargs: string;
|
runargs: string;
|
||||||
begin
|
begin
|
||||||
|
@ -715,6 +769,37 @@ procedure TCEMainForm.actProjCompileExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
compileProject(fProject);
|
compileProject(fProject);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.actProjCompileAndRunExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
compileProject(fProject);
|
||||||
|
runProject(fProject);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.actProjCompAndRunWithArgsExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
runargs: string;
|
||||||
|
begin
|
||||||
|
compileProject(fProject);
|
||||||
|
//
|
||||||
|
runargs := '';
|
||||||
|
if InputQuery('Execution arguments', 'enter switches and arguments',
|
||||||
|
runargs) then runProject(fProject, runargs);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.actProjRunExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
runProject(fProject);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.actProjRunWithArgsExecute(Sender: TObject);
|
||||||
|
var
|
||||||
|
runargs: string;
|
||||||
|
begin
|
||||||
|
runargs := '';
|
||||||
|
if InputQuery('Execution arguments', 'enter switches and arguments',
|
||||||
|
runargs) then runProject(fProject, runargs);
|
||||||
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$REGION view ******************************************************************}
|
{$REGION view ******************************************************************}
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
inherited CEMessagesWidget: TCEMessagesWidget
|
inherited CEMessagesWidget: TCEMessagesWidget
|
||||||
Left = 1168
|
Left = 1098
|
||||||
Height = 220
|
Height = 152
|
||||||
Top = 463
|
Top = 531
|
||||||
Width = 737
|
Width = 807
|
||||||
Caption = 'MessagesWidget'
|
Caption = 'Messages'
|
||||||
ClientHeight = 220
|
ClientHeight = 152
|
||||||
ClientWidth = 737
|
ClientWidth = 807
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 220
|
Height = 152
|
||||||
Width = 737
|
Width = 807
|
||||||
ClientHeight = 220
|
ClientHeight = 152
|
||||||
ClientWidth = 737
|
ClientWidth = 807
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 194
|
Height = 126
|
||||||
Width = 737
|
Width = 807
|
||||||
ClientHeight = 190
|
ClientHeight = 126
|
||||||
ClientWidth = 733
|
ClientWidth = 807
|
||||||
object List: TListView[0]
|
object List: TListView[0]
|
||||||
Left = 2
|
Left = 3
|
||||||
Height = 186
|
Height = 120
|
||||||
Top = 2
|
Top = 3
|
||||||
Width = 729
|
Width = 801
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSort = False
|
AutoSort = False
|
||||||
AutoWidthLastColumn = True
|
AutoWidthLastColumn = True
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Width = 725
|
Width = 797
|
||||||
end>
|
end>
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
|
@ -39,7 +39,7 @@ inherited CEMessagesWidget: TCEMessagesWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited Header: TPanel
|
inherited Header: TPanel
|
||||||
Width = 737
|
Width = 807
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object imgList: TImageList[2]
|
object imgList: TImageList[2]
|
||||||
|
|
|
@ -21,7 +21,6 @@ type
|
||||||
procedure actSaveMsgExecute(Sender: TObject);
|
procedure actSaveMsgExecute(Sender: TObject);
|
||||||
public
|
public
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
|
||||||
//
|
//
|
||||||
procedure scrollToBack;
|
procedure scrollToBack;
|
||||||
procedure addMessage(const aMsg: string);
|
procedure addMessage(const aMsg: string);
|
||||||
|
@ -71,11 +70,6 @@ begin
|
||||||
contextMenu.Items.Add(itm);
|
contextMenu.Items.Add(itm);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCEMessagesWidget.destroy;
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCEMessagesWidget.scrollToBack;
|
procedure TCEMessagesWidget.scrollToBack;
|
||||||
begin
|
begin
|
||||||
if not Visible then exit;
|
if not Visible then exit;
|
||||||
|
@ -212,4 +206,3 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -1,68 +1,70 @@
|
||||||
inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
Left = 1170
|
Left = 1098
|
||||||
Height = 278
|
Height = 278
|
||||||
Top = 722
|
Width = 448
|
||||||
Width = 445
|
|
||||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||||
Caption = 'ProjectConfigurationWidget'
|
Caption = 'Project configuration'
|
||||||
ClientHeight = 278
|
ClientHeight = 278
|
||||||
ClientWidth = 445
|
ClientWidth = 448
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 278
|
Height = 278
|
||||||
Width = 445
|
Width = 448
|
||||||
ClientHeight = 278
|
ClientHeight = 278
|
||||||
ClientWidth = 445
|
ClientWidth = 448
|
||||||
DragKind = dkDrag
|
|
||||||
DragMode = dmManual
|
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 252
|
Height = 252
|
||||||
Width = 445
|
Width = 448
|
||||||
ClientHeight = 248
|
ClientHeight = 252
|
||||||
ClientWidth = 441
|
ClientWidth = 448
|
||||||
object Tree: TTreeView[0]
|
object Tree: TTreeView[0]
|
||||||
Left = 4
|
Left = 5
|
||||||
Height = 214
|
Height = 216
|
||||||
Top = 30
|
Top = 31
|
||||||
Width = 190
|
Width = 190
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
AutoExpand = True
|
AutoExpand = True
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Left = 4
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
DefaultItemHeight = 18
|
DefaultItemHeight = 18
|
||||||
|
HideSelection = False
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssAutoBoth
|
ScrollBars = ssAutoBoth
|
||||||
ShowRoot = False
|
ShowRoot = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw]
|
OnChange = TreeChange
|
||||||
|
Options = [tvoAutoExpand, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoToolTips, tvoThemedDraw]
|
||||||
Items.Data = {
|
Items.Data = {
|
||||||
F9FFFFFF020003000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000
|
F9FFFFFF020003000000FFFFFFFFFFFFFFFF01000000FFFFFFFF000000000000
|
||||||
0000000700000047656E6572616CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0500
|
0000000700000047656E6572616CFFFFFFFFFFFFFFFF02000000FFFFFFFF0600
|
||||||
000000000000010A00000043617465676F72696573FFFFFFFFFFFFFFFFFFFFFF
|
000000000000010A00000043617465676F72696573FFFFFFFFFFFFFFFF020000
|
||||||
FFFFFFFFFF000000000000000000080000004D65737361676573FFFFFFFFFFFF
|
00FFFFFFFF000000000000000000080000004D65737361676573FFFFFFFFFFFF
|
||||||
FFFFFFFFFFFFFFFFFFFF000000000000000000080000004465627567696E67FF
|
FFFF03000000FFFFFFFF000000000000000000080000004465627567696E67FF
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000D000000446F6375
|
FFFFFFFFFFFFFF04000000FFFFFFFF0000000000000000000D000000446F6375
|
||||||
6D656E746174696F6EFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000
|
6D656E746174696F6EFFFFFFFFFFFFFFFF05000000FFFFFFFF00000000000000
|
||||||
0000060000004F7574707574FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000
|
0000060000004F7574707574FFFFFFFFFFFFFFFF06000000FFFFFFFF00000000
|
||||||
0000000000060000004F7468657273FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
|
0000000000060000004F7468657273FFFFFFFFFFFFFFFF07000000FFFFFFFF00
|
||||||
00000000000000000E000000416C6C2063617465676F72696573
|
0000000000000000050000005061746873FFFFFFFFFFFFFFFF08000000FFFFFF
|
||||||
|
FF0000000000000000000E000000416C6C2063617465676F72696573
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
inline frameEditAll: TCEProjConfAll[1]
|
inline frameEditAll: TCEProjConfAll[1]
|
||||||
Left = 198
|
Left = 202
|
||||||
Height = 218
|
Height = 220
|
||||||
Top = 28
|
Top = 29
|
||||||
Width = 241
|
Width = 243
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
ClientHeight = 218
|
ClientHeight = 220
|
||||||
ClientWidth = 241
|
ClientWidth = 243
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
DesignLeft = 1406
|
DesignLeft = 1406
|
||||||
DesignTop = 572
|
DesignTop = 572
|
||||||
inherited Grid: TTIPropertyGrid
|
inherited Grid: TTIPropertyGrid
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 214
|
Height = 216
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 237
|
Width = 239
|
||||||
BackgroundColor = clDefault
|
BackgroundColor = clDefault
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
DefaultItemHeight = 22
|
DefaultItemHeight = 22
|
||||||
|
@ -71,21 +73,21 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel1: TPanel[2]
|
object Panel1: TPanel[2]
|
||||||
Left = 2
|
Left = 3
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 3
|
||||||
Width = 437
|
Width = 442
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 24
|
ClientHeight = 24
|
||||||
ClientWidth = 437
|
ClientWidth = 442
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object selConf: TComboBox
|
object selConf: TComboBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 346
|
Width = 351
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Top = 1
|
BorderSpacing.Top = 1
|
||||||
BorderSpacing.Right = 1
|
BorderSpacing.Right = 1
|
||||||
|
@ -95,7 +97,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object btnAddConf: TSpeedButton
|
object btnAddConf: TSpeedButton
|
||||||
Left = 347
|
Left = 352
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 30
|
||||||
|
@ -140,7 +142,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object btnDelConf: TSpeedButton
|
object btnDelConf: TSpeedButton
|
||||||
Left = 377
|
Left = 382
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 30
|
||||||
|
@ -185,7 +187,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object btnCloneConf: TSpeedButton
|
object btnCloneConf: TSpeedButton
|
||||||
Left = 407
|
Left = 412
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 30
|
||||||
|
@ -230,9 +232,15 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object Splitter1: TSplitter[3]
|
||||||
|
Left = 195
|
||||||
|
Height = 222
|
||||||
|
Top = 29
|
||||||
|
Width = 5
|
||||||
|
end
|
||||||
end
|
end
|
||||||
inherited Header: TPanel
|
inherited Header: TPanel
|
||||||
Width = 445
|
Width = 448
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object imgList: TImageList[2]
|
object imgList: TImageList[2]
|
||||||
|
|
|
@ -20,17 +20,20 @@ type
|
||||||
btnAddConf: TSpeedButton;
|
btnAddConf: TSpeedButton;
|
||||||
btnDelConf: TSpeedButton;
|
btnDelConf: TSpeedButton;
|
||||||
btnCloneConf: TSpeedButton;
|
btnCloneConf: TSpeedButton;
|
||||||
|
Splitter1: TSplitter;
|
||||||
Tree: TTreeView;
|
Tree: TTreeView;
|
||||||
procedure btnAddConfClick(Sender: TObject);
|
procedure btnAddConfClick(Sender: TObject);
|
||||||
procedure btnDelConfClick(Sender: TObject);
|
procedure btnDelConfClick(Sender: TObject);
|
||||||
procedure btnCloneCurrClick(Sender: TObject);
|
procedure btnCloneCurrClick(Sender: TObject);
|
||||||
procedure selConfChange(Sender: TObject);
|
procedure selConfChange(Sender: TObject);
|
||||||
procedure SpeedButton1Click(Sender: TObject);
|
procedure TreeChange(Sender: TObject; Node: TTreeNode);
|
||||||
private
|
private
|
||||||
fProj: TCEProject;
|
fProj: TCEProject;
|
||||||
|
function getGridTarget: TPersistent;
|
||||||
protected
|
protected
|
||||||
procedure manualWidgetUpdate; override;
|
procedure manualWidgetUpdate; override;
|
||||||
public
|
public
|
||||||
|
constructor create(aOwner: TComponent); override;
|
||||||
procedure projNew(const aProject: TCEProject); override;
|
procedure projNew(const aProject: TCEProject); override;
|
||||||
procedure projChange(const aProject: TCEProject); override;
|
procedure projChange(const aProject: TCEProject); override;
|
||||||
procedure projClose(const aProject: TCEProject); override;
|
procedure projClose(const aProject: TCEProject); override;
|
||||||
|
@ -40,6 +43,12 @@ type
|
||||||
implementation
|
implementation
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
|
constructor TCEProjectConfigurationWidget.create(aOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
Tree.Selected := Tree.Items.GetLastNode;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEProjectConfigurationWidget.projNew(const aProject: TCEProject);
|
procedure TCEProjectConfigurationWidget.projNew(const aProject: TCEProject);
|
||||||
begin
|
begin
|
||||||
beginManualWidgetUpdate;
|
beginManualWidgetUpdate;
|
||||||
|
@ -72,9 +81,10 @@ begin
|
||||||
endManualWidgetUpdate;
|
endManualWidgetUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEProjectConfigurationWidget.SpeedButton1Click(Sender: TObject);
|
procedure TCEProjectConfigurationWidget.TreeChange(Sender: TObject;
|
||||||
|
Node: TTreeNode);
|
||||||
begin
|
begin
|
||||||
|
frameEditAll.Grid.TIObject := getGridTarget;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEProjectConfigurationWidget.btnAddConfClick(Sender: TObject);
|
procedure TCEProjectConfigurationWidget.btnAddConfClick(Sender: TObject);
|
||||||
|
@ -123,6 +133,24 @@ begin
|
||||||
endManualWidgetUpdate;
|
endManualWidgetUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCEProjectConfigurationWidget.getGridTarget: TPersistent;
|
||||||
|
begin
|
||||||
|
if fProj = nil then exit(nil);
|
||||||
|
if fProj.ConfigurationIndex = -1 then exit(nil);
|
||||||
|
if Tree.Selected = nil then exit(nil);
|
||||||
|
case Tree.Selected.StateIndex of
|
||||||
|
1: exit( fProj );
|
||||||
|
2: exit( fProj.currentConfiguration.messagesOptions );
|
||||||
|
3: exit( fProj.currentConfiguration.debugingOptions );
|
||||||
|
4: exit( fProj.currentConfiguration.documentationOptions );
|
||||||
|
5: exit( fProj.currentConfiguration.outputOptions );
|
||||||
|
6: exit( fProj.currentConfiguration.otherOptions );
|
||||||
|
7: exit( fProj.currentConfiguration.pathsOptions );
|
||||||
|
8: exit( fProj.currentConfiguration );
|
||||||
|
else result := nil;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEProjectConfigurationWidget.manualWidgetUpdate;
|
procedure TCEProjectConfigurationWidget.manualWidgetUpdate;
|
||||||
var
|
var
|
||||||
i: NativeInt;
|
i: NativeInt;
|
||||||
|
@ -133,8 +161,7 @@ begin
|
||||||
selConf.Items.Add(fProj.configuration[i].name);
|
selConf.Items.Add(fProj.configuration[i].name);
|
||||||
selConf.ItemIndex := fProj.ConfigurationIndex;
|
selConf.ItemIndex := fProj.ConfigurationIndex;
|
||||||
|
|
||||||
frameEditAll.Grid.TIObject :=
|
frameEditAll.Grid.TIObject := getGridTarget;
|
||||||
fProj.configuration[fProj.ConfigurationIndex];
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
inherited CEProjectWidget: TCEProjectWidget
|
inherited CEProjectWidget: TCEProjectWidget
|
||||||
Left = 1691
|
Left = 1670
|
||||||
Height = 336
|
Height = 405
|
||||||
Top = 89
|
Top = 89
|
||||||
Width = 217
|
Width = 238
|
||||||
Caption = 'ProjectWidget'
|
Caption = 'Project inspector'
|
||||||
ClientHeight = 336
|
ClientHeight = 405
|
||||||
ClientWidth = 217
|
ClientWidth = 238
|
||||||
inherited Back: TPanel
|
inherited Back: TPanel
|
||||||
Height = 336
|
Height = 405
|
||||||
Width = 217
|
Width = 238
|
||||||
ClientHeight = 336
|
ClientHeight = 405
|
||||||
ClientWidth = 217
|
ClientWidth = 238
|
||||||
inherited Content: TPanel
|
inherited Content: TPanel
|
||||||
Height = 310
|
Height = 379
|
||||||
Width = 217
|
Width = 238
|
||||||
ClientHeight = 306
|
ClientHeight = 379
|
||||||
ClientWidth = 213
|
ClientWidth = 238
|
||||||
object Tree: TTreeView[0]
|
object Tree: TTreeView[0]
|
||||||
Left = 2
|
Left = 3
|
||||||
Height = 276
|
Height = 347
|
||||||
Top = 28
|
Top = 29
|
||||||
Width = 209
|
Width = 232
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoExpand = True
|
AutoExpand = True
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
|
@ -38,66 +38,66 @@ inherited CEProjectWidget: TCEProjectWidget
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
object Panel1: TPanel[1]
|
object Panel1: TPanel[1]
|
||||||
Left = 2
|
Left = 3
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 2
|
Top = 3
|
||||||
Width = 209
|
Width = 232
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 2
|
BorderSpacing.Around = 2
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 24
|
ClientHeight = 24
|
||||||
ClientWidth = 209
|
ClientWidth = 232
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object btnAddFile: TSpeedButton
|
object btnAddFile: TSpeedButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 28
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
2000000000000004000064000000640000000000000000000000FFFFFF000000
|
||||||
FF0000000000000000000000000000000000000000000000002A000000330000
|
001D000000340000003600000036000000360000003600000036000000360000
|
||||||
00330000003300000033000000330000003300000023FFFFFF00FFFFFF00FFFF
|
0036155A2EA1196A36F5196B37FF196A36F517613296FFFFFF00FFFFFF000000
|
||||||
FF0000000030000000330000003300000033000000333E7F42DB4A854CFF4B84
|
0034F9F9F9F5FCFCFCFDFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFF86B1
|
||||||
4CFF4C844CFF4B844CFF4B844BFF4B854DFF477D49C0FFFFFF00FFFFFF00FFFF
|
96FF288C53FF64BA8DFF95D2B2FF64BA8DFF288C53FF196B378C000000010000
|
||||||
FF00B1B1AFF2AFAFADFFAEAEABFFAFAFADFFBAB3B7FF3F7F41FF4EC592FF45BF
|
0036FCFCFCFEFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFF2271
|
||||||
89FF47BF8AFF45BE89FF44BE89FF5DCB9CFF4B854DFFFFFFFF00FFFFFF00FFFF
|
3FFF62BA8BFF60BA87FFFFFFFFFF60B987FF67BC8FFF196B37F7000000010000
|
||||||
FF00B0B0ADFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF397A3AFF50C191FFFFFF
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFF317B
|
||||||
FFFF2CAE74FF8CD3B4FFFFFFFFFF54C395FF4A844AFFFFFFFF00FFFFFF00FFFF
|
4CFF9CD4B6FFFFFFFFFFFFFFFFFFFFFFFFFF95D2B2FF196B37FF000000010000
|
||||||
FF00AEAEABFFFFFFFFFFFDFDFCFFFFFEFEFFFFFFFFFF367737FF59C095FFFFFF
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFFFAFAFAFF4A8B
|
||||||
FFFF73C7A2FFFFFFFFFF81CDACFF64C69EFF49844AFFFFFFFF00FFFFFF00FFFF
|
62FF90D3B1FF92D6B1FFFFFFFFFF65BC8CFF67BC8FFF196B37F7000000010000
|
||||||
FF00ADADABFFFFFFFFFFF8F8F8FFFBFAFBFFFFFFFFFF357736FF68C5A1FFFFFF
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFFFBFBFBFFA5C4
|
||||||
FFFFFFFFFFFF69C29CFF0F9D62FF76CBABFF488449FFFFFFFF00FFFFFF00FFFF
|
B1FF61AB81FF95D4B4FFBAE6D0FF6ABB8FFF2D8F57FF196B378C000000010000
|
||||||
FF00ADADABFFFFFFFFFFF6F5F5FFF9F7F8FFFFFFFFFF347736FF7FCDB0FFFFFF
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFB
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFF87D1B6FF478349FFFFFFFF00FFFFFF00FFFF
|
FBFFABC8B6FF609975FF4F8E66FF4A8A61FF26623C9800000001000000010000
|
||||||
FF00ADADABFFFFFFFFFFF3F2F2FFF5F3F4FFFFFBFFFF327736FF8FD5BCFF89D1
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFAFA
|
||||||
B6FF86CFB3FF87CFB4FF8CD2B8FF95D9C2FF47854AFFFFFFFF00FFFFFF00FFFF
|
FAFFF9F9F9FFF6F6F6FFF6F6F6FFFCFCFCFF0000003600000001000000010000
|
||||||
FF00ADADABFFFFFFFFFFF0F0EFFFF1F1F0FFFAF6F8FF7DA780FF327736FF3478
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8
|
||||||
36FF337736FF337736FF357938FF3D7F41FF47864BA8FFFFFF00FFFFFF00FFFF
|
F8FFF6F6F6FFF3F3F3FFF2F2F2FFFCFCFCFF0000003600000001000000010000
|
||||||
FF00ADADABFFFFFFFFFFEEECEBFFEEEDECFFF1EFEFFFF7F3F5FFFCF5F9FFFDF5
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8F8FFF5F5
|
||||||
FAFFFDF5FAFFFDF5FAFFFFFFFFFFBEB5BBFF00000000FFFFFF00FFFFFF00FFFF
|
F5FFF2F2F2FFEFEFEFFFEDEDEDFFFCFCFCFF0000003600000001000000010000
|
||||||
FF00ADADABFFFFFFFFFFEAE9E9FFEBEAEAFFEBEAEAFFEBEAEAFFF6F5F5FFFFFF
|
0036FCFCFCFFFBFBFBFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8F8FFF5F5F5FFF1F1
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFB2B0B0FF00000000FFFFFF00FFFFFF00FFFF
|
F1FFECECECFFEAEAEAFFE6E6E6FFFCFCFCFF0000003600000001000000010000
|
||||||
FF00ADADABFFFFFFFFFFE7E7E6FFE8E8E7FFE8E8E7FFE6E7E5FFFFFFFFFFCBCB
|
0036FCFCFCFFF9F9F9FFF9F9F9FFF9F9F9FFF7F7F7FFF6F6F6FFF2F2F2FFEBEB
|
||||||
CAFFA6A6A4FFA5A5A2FFFFFFFFFFAFAFADFF00000000FFFFFF00FFFFFF00FFFF
|
EBFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFF0000003600000001000000010000
|
||||||
FF00AEAEABFFFFFFFFFFE4E3E2FFE5E4E3FFE5E4E3FFE4E3E2FFFFFFFFFFA6A6
|
0036FCFCFCFFF7F7F7FFF9F9F9FFF7F7F7FFF7F7F7FFF3F3F3FFF0F0F0FFEAEA
|
||||||
A4FFFBFBFAFFFFFFFFFFE9E9E9FFB0B0AEAC00000000FFFFFF00FFFFFF00FFFF
|
EAFFFCFCFCFFF6F6F6FFF4F4F4FF9999999100000020FFFFFF00FFFFFF000000
|
||||||
FF00AEAEACFFFFFFFFFFE0DFDEFFE1DFDEFFE1DFDEFFE0DFDEFFFFFFFFFFA5A5
|
0036FBFBFBFDF4F4F4FFF5F5F5FFF5F5F5FFF5F5F5FFF1F1F1FFEFEFEFFFE9E9
|
||||||
A2FFFFFFFFFFE7E7E8FFAFAFACA70000000000000000FFFFFF00FFFFFF00FFFF
|
E9FFFCFCFCFFE7E7E7FF959595910000002000000002FFFFFF00FFFFFF000000
|
||||||
FF00AFAFADFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
0033F8F8F8F0FBFBFBFDFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFC
|
||||||
FFFFE9E9E9FFAEAEACA6000000000000000000000000FFFFFF00FFFFFF00FFFF
|
FCFFF8F8F8FF949494910000002000000002FFFFFF00FFFFFF00FFFFFF000000
|
||||||
FF00B3B3B1EFB0B0ADFFAEAEACFFAEAEABFFAEAEABFFADAEABFFAEAEABFFAFAF
|
001C000000330000003600000036000000360000003600000036000000360000
|
||||||
ADFFB0B0AEEA00000000000000000000000000000000FFFFFF00
|
0036000000360000002000000002FFFFFF00FFFFFF00FFFFFF00
|
||||||
}
|
}
|
||||||
OnClick = btnAddFileClick
|
OnClick = btnAddFileClick
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object btnProjOpts: TSpeedButton
|
object btnProjOpts: TSpeedButton
|
||||||
Left = 60
|
Left = 84
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 28
|
||||||
Action = CEMainForm.actProjOpts
|
Action = CEMainForm.actProjOpts
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
|
@ -139,10 +139,10 @@ inherited CEProjectWidget: TCEProjectWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object btnAddFold: TSpeedButton
|
object btnAddFold: TSpeedButton
|
||||||
Left = 30
|
Left = 56
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 28
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
|
@ -184,10 +184,10 @@ inherited CEProjectWidget: TCEProjectWidget
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
end
|
end
|
||||||
object TreeFilterEdit1: TTreeFilterEdit
|
object TreeFilterEdit1: TTreeFilterEdit
|
||||||
Left = 92
|
Left = 114
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 115
|
Width = 116
|
||||||
ButtonWidth = 30
|
ButtonWidth = 30
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
@ -197,10 +197,54 @@ inherited CEProjectWidget: TCEProjectWidget
|
||||||
FilteredTreeview = Tree
|
FilteredTreeview = Tree
|
||||||
ExpandAllInitially = True
|
ExpandAllInitially = True
|
||||||
end
|
end
|
||||||
|
object btnRemFile: TSpeedButton
|
||||||
|
Left = 28
|
||||||
|
Height = 24
|
||||||
|
Top = 0
|
||||||
|
Width = 28
|
||||||
|
Align = alLeft
|
||||||
|
Glyph.Data = {
|
||||||
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
|
2000000000000004000064000000640000000000000000000000FFFFFF000000
|
||||||
|
001D000000340000003600000036000000360000003600000036000000360000
|
||||||
|
003617469E950343B3E60442BCFE0343B4E9033DA489FFFFFF00FFFFFF000000
|
||||||
|
0034F9F9F9F5FCFCFCFDFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFF8BA9
|
||||||
|
DFFF2866CAFF2177E6FF0579EAFF0164DDFF044DBCFD0345B87A000000010000
|
||||||
|
0036FCFCFCFEFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFF1E59
|
||||||
|
C0FF639DF4FF187FFFFF0076F8FF0076EEFF0368E1FF0345B9E4000000010000
|
||||||
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFF0543
|
||||||
|
BCFFAECDFEFFFFFFFFFFFFFFFFFFFFFFFFFF187FEFFF0442BCFE000000010000
|
||||||
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFFFAFAFAFF245C
|
||||||
|
C2FF8DB5F6FF4D92FFFF1177FFFF2186FFFF408AEBFF0344B9DE000000010000
|
||||||
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFFFBFBFBFF93AE
|
||||||
|
E1FF3D76D2FF8DB5F7FFB8D6FEFF72A8F5FF2D6BCAFD0442B96E000000010000
|
||||||
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFB
|
||||||
|
FBFF92ADE0FF2A61C7FF0543BCFF1F5AC1FF0237959500000001000000010000
|
||||||
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFAFA
|
||||||
|
FAFFF9F9F9FFF6F6F6FFF6F6F6FFFCFCFCFF0000003600000001000000010000
|
||||||
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8
|
||||||
|
F8FFF6F6F6FFF3F3F3FFF2F2F2FFFCFCFCFF0000003600000001000000010000
|
||||||
|
0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8F8FFF5F5
|
||||||
|
F5FFF2F2F2FFEFEFEFFFEDEDEDFFFCFCFCFF0000003600000001000000010000
|
||||||
|
0036FCFCFCFFFBFBFBFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8F8FFF5F5F5FFF1F1
|
||||||
|
F1FFECECECFFEAEAEAFFE6E6E6FFFCFCFCFF0000003600000001000000010000
|
||||||
|
0036FCFCFCFFF9F9F9FFF9F9F9FFF9F9F9FFF7F7F7FFF6F6F6FFF2F2F2FFEBEB
|
||||||
|
EBFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFF0000003600000001000000010000
|
||||||
|
0036FCFCFCFFF7F7F7FFF9F9F9FFF7F7F7FFF7F7F7FFF3F3F3FFF0F0F0FFEAEA
|
||||||
|
EAFFFCFCFCFFF6F6F6FFF4F4F4FF9999999100000020FFFFFF00FFFFFF000000
|
||||||
|
0036FBFBFBFDF4F4F4FFF5F5F5FFF5F5F5FFF5F5F5FFF1F1F1FFEFEFEFFFE9E9
|
||||||
|
E9FFFCFCFCFFE7E7E7FF959595910000002000000002FFFFFF00FFFFFF000000
|
||||||
|
0033F8F8F8F0FBFBFBFDFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFC
|
||||||
|
FCFFF8F8F8FF949494910000002000000002FFFFFF00FFFFFF00FFFFFF000000
|
||||||
|
001C000000330000003600000036000000360000003600000036000000360000
|
||||||
|
0036000000360000002000000002FFFFFF00FFFFFF00FFFFFF00
|
||||||
|
}
|
||||||
|
OnClick = btnRemFileClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited Header: TPanel
|
inherited Header: TPanel
|
||||||
Width = 217
|
Width = 238
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object imgList: TImageList[2]
|
object imgList: TImageList[2]
|
||||||
|
|
|
@ -16,10 +16,12 @@ type
|
||||||
btnAddFile: TSpeedButton;
|
btnAddFile: TSpeedButton;
|
||||||
btnProjOpts: TSpeedButton;
|
btnProjOpts: TSpeedButton;
|
||||||
btnAddFold: TSpeedButton;
|
btnAddFold: TSpeedButton;
|
||||||
|
btnRemFile: TSpeedButton;
|
||||||
Tree: TTreeView;
|
Tree: TTreeView;
|
||||||
TreeFilterEdit1: TTreeFilterEdit;
|
TreeFilterEdit1: TTreeFilterEdit;
|
||||||
procedure btnAddFileClick(Sender: TObject);
|
procedure btnAddFileClick(Sender: TObject);
|
||||||
procedure btnAddFoldClick(Sender: TObject);
|
procedure btnAddFoldClick(Sender: TObject);
|
||||||
|
procedure btnRemFileClick(Sender: TObject);
|
||||||
protected
|
protected
|
||||||
procedure manualWidgetUpdate; override;
|
procedure manualWidgetUpdate; override;
|
||||||
private
|
private
|
||||||
|
@ -100,7 +102,7 @@ begin
|
||||||
//
|
//
|
||||||
with TOpenDialog.Create(nil) do
|
with TOpenDialog.Create(nil) do
|
||||||
try
|
try
|
||||||
filter := 'd source|*.d|d interface|*.di|all files|*.*';
|
filter := 'D source|*.d|D interface|*.di|all files|*.*';
|
||||||
if execute then
|
if execute then
|
||||||
fProject.addSource(filename);
|
fProject.addSource(filename);
|
||||||
finally
|
finally
|
||||||
|
@ -116,8 +118,8 @@ var
|
||||||
begin
|
begin
|
||||||
if fProject = nil then exit;
|
if fProject = nil then exit;
|
||||||
//
|
//
|
||||||
if fileexists(fProject.fileName) then
|
if fileExists(fProject.fileName) then
|
||||||
dir := extractfilePath(fProject.fileName)
|
dir := extractFilePath(fProject.fileName)
|
||||||
else dir := '';
|
else dir := '';
|
||||||
if selectDirectory(dir, [], 0) then
|
if selectDirectory(dir, [], 0) then
|
||||||
begin
|
begin
|
||||||
|
@ -141,6 +143,23 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEProjectWidget.btnRemFileClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fname: string;
|
||||||
|
i: NativeInt;
|
||||||
|
begin
|
||||||
|
if fProject = nil then exit;
|
||||||
|
if Tree.Selected = nil then exit;
|
||||||
|
//
|
||||||
|
if Tree.Selected.Parent = fFileNode then
|
||||||
|
begin
|
||||||
|
fname := Tree.Selected.Text;
|
||||||
|
i := fProject.Sources.IndexOf(fname);
|
||||||
|
if i > -1 then fProject.Sources.Delete(i);
|
||||||
|
manualWidgetUpdate;
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEProjectWidget.manualWidgetUpdate;
|
procedure TCEProjectWidget.manualWidgetUpdate;
|
||||||
var
|
var
|
||||||
src, conf: string;
|
src, conf: string;
|
||||||
|
@ -168,4 +187,3 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
object CEWidget: TCEWidget
|
object CEWidget: TCEWidget
|
||||||
Left = 1538
|
Left = 1628
|
||||||
Height = 121
|
Height = 121
|
||||||
Top = 735
|
Top = 721
|
||||||
Width = 320
|
Width = 320
|
||||||
BorderIcons = [biMinimize, biMaximize]
|
BorderIcons = [biMinimize, biMaximize]
|
||||||
Caption = 'CEWidget'
|
Caption = 'CEWidget'
|
||||||
|
|
Loading…
Reference in New Issue