diff --git a/README.md b/README.md index a5a489f3..fd2c30c8 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,9 @@ Setup - clone this repo. - both [dmd](http://dlang.org/download.html) and [Lazarus](http://www.lazarus.freepascal.org) must be setup. - open "coedit.lpr" in Lazarus. -- press the Run button. \ No newline at end of file +- press the Run button. + +Preview +------- + +[Interface screen-cap., under Windows](lazproj/Gui.tease.png) \ No newline at end of file diff --git a/lazproj/Gui.tease.png b/lazproj/Gui.tease.png index 641221e5..34787a41 100644 Binary files a/lazproj/Gui.tease.png and b/lazproj/Gui.tease.png differ diff --git a/lazproj/coedit.lpi b/lazproj/coedit.lpi index 58c47be8..6649db39 100644 --- a/lazproj/coedit.lpi +++ b/lazproj/coedit.lpi @@ -28,7 +28,7 @@ - + diff --git a/lazproj/test/coeditproj/test.coedit b/lazproj/test/coeditproj/test.coedit index 398f1586..65a22042 100644 --- a/lazproj/test/coeditproj/test.coedit +++ b/lazproj/test/coeditproj/test.coedit @@ -57,8 +57,8 @@ object TCEProject end> Sources.Strings = ( '..\src\main.d' - '..\src\foo.d' '..\src\bar.d' + '..\src\foo.d' ) ConfigurationIndex = 1 end diff --git a/lazproj/test/src/main.d b/lazproj/test/src/main.d index e0bd1b74..57dc3bfd 100644 --- a/lazproj/test/src/main.d +++ b/lazproj/test/src/main.d @@ -23,4 +23,5 @@ void main(string args[]) delete foo; delete bar; } + readln; } diff --git a/src/ce_editor.lfm b/src/ce_editor.lfm index 9d942d2d..7c4fbfa9 100644 --- a/src/ce_editor.lfm +++ b/src/ce_editor.lfm @@ -1,39 +1,42 @@ inherited CEEditorWidget: TCEEditorWidget Left = 1098 - Height = 405 - Top = 89 - Width = 556 + Height = 382 + Top = 91 + Width = 526 BorderIcons = [biSystemMenu, biMinimize, biMaximize] Caption = 'Source editor' - ClientHeight = 405 - ClientWidth = 556 + ClientHeight = 382 + ClientWidth = 526 inherited Back: TPanel - Height = 405 - Width = 556 - ClientHeight = 405 - ClientWidth = 556 + Height = 382 + Width = 526 + ClientHeight = 382 + ClientWidth = 526 inherited Content: TPanel - Height = 379 - Width = 556 - ClientHeight = 379 - ClientWidth = 556 + Height = 382 + Width = 526 + BevelOuter = bvRaised + ClientHeight = 382 + ClientWidth = 526 object PageControl: TExtendedNotebook[0] Left = 3 - Height = 350 + Height = 351 Top = 3 - Width = 550 + Width = 520 Align = alClient BorderSpacing.Around = 2 TabOrder = 0 OnChange = PageControlChange + Options = [nboShowCloseButtons] TabDragMode = dmAutomatic TabDragAcceptMode = dmAutomatic end object editorStatus: TStatusBar[1] - Left = 1 + Left = 3 Height = 23 - Top = 355 - Width = 554 + Top = 356 + Width = 520 + BorderSpacing.Around = 2 Panels = < item Width = 100 @@ -47,9 +50,6 @@ inherited CEEditorWidget: TCEEditorWidget SimplePanel = False end end - inherited Header: TPanel - Width = 556 - end end object macRecorder: TSynMacroRecorder[2] RecordShortCut = 24658 diff --git a/src/ce_main.lfm b/src/ce_main.lfm index c85afc56..0c5c7db0 100644 --- a/src/ce_main.lfm +++ b/src/ce_main.lfm @@ -1,13 +1,15 @@ object CEMainForm: TCEMainForm Left = 1098 - Height = 52 + Height = 53 Top = 0 Width = 805 + AllowDropFiles = True Caption = 'Coedit' - DockSite = True - DragMode = dmAutomatic + ChildSizing.Layout = cclLeftToRightThenTopToBottom Menu = mainMenu OnDropFiles = FormDropFiles + OnShow = FormShow + Position = poMainFormCenter LCLVersion = '1.2.4.0' object mainMenu: TMainMenu Images = imgList @@ -939,6 +941,42 @@ object CEMainForm: TCEMainForm end object MenuItem51: TMenuItem Action = actProjSource + Bitmap.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000020000 + 00260000003300000033000000330000002600000003000000007E7B79007370 + 6F00000000310000002B797675000000002B0000002FB85F12002313053DA456 + 15CAAE5A13FFAD5912FFAE5A13FFA45615CA2514053D000000037D7A7800726F + 6E00726F6EF66E6B6AE0000000266D6C6CDF6C7177EF00000021AF5B13FFCD8E + 4CFFE5B676FFE3B271FFE5B676FFCD8E4CFFAE5B15FF2F190731000000300000 + 002C6F6C6CE473706FFF6B6867CB727071FF6A6E75DAA3510CB9CC8844FFDEA9 + 68FFDAA05BFFFFFFFFFFDAA05BFFDEA968FFCB8846FFA55716CA7B7876F57673 + 71E3908D8AF9BFBCBAFFC4C1BEFFBEBCBBFF83888DF3B25608FFDBA25EFFD69C + 58FFD3944CFFFFFFFFFFD3944CFFD69C58FFDBA360FFAF5B15FF7F7C7BFF7C79 + 78FFC6C5C2FFAAA8A6FF8A8686FFA9A8A7FFC1C7CBFFAF5203FFDEAC73FFD191 + 49FFCF8C41FFFFFFFFFFCF8C41FFD19149FFDEAD75FFAE5A13FF000000337D7A + 79EBD4D2D1FF908C8BFF000000338F8D8DFFCFD4DAFFAE5000FFEACCA6FFCC8B + 40FFC98335FFC8802FFFC98335FFCC8B40FFEACEAAFFAE5912FF8A8785FF8582 + 80FFD7D5D4FFB7B6B4FF94928FFFB7B6B5FFD4D7DAFF9F6029FFD49C68FFE6C2 + 9BFFCF924EFFFFFFFFFFCF924EFFE6C39BFFD39F6EFFB05B13BB8D8A88F48A87 + 85B3A5A2A1FBDFDEDDFFE4E4E3FFDFDEDDFFA4A4A5F3877C75CEB0580BFFD199 + 63FFEBCDABFFE9C9A7FFEBCDABFFD19A64FFB15608FC0000002F8D8A88008B88 + 8600848180C28D8989FF8C8987E68D8A89FF838181B2707071D57B716CF3A768 + 31FFB05100FFAF5100FFB05100FFA76832FF7B7370F9747A7FEE8D8A88009794 + 9200969391F4969391FF908D8B00969391FF989593E17C7A7AFF7A7A7BFFC4C7 + CAFFA8ACB1FF888C92FFA8ACB1FFC4C7CAFF7A7A7CFF7E7D7DD68C8987009794 + 92009693910096939100918E8C009794920099969400000000337D7A7AE9D4D3 + D2FF8F8D8DFF000000338F8D8DFFD4D3D2FF777474CA0000002B8C8987009794 + 92009693910096939100928F8D009895930088858300898684FF858280FFD7D5 + D4FFB7B6B4FF94928FFFB7B6B4FFD7D5D4FF858280FF868381DF8C8987009794 + 920096939100979492008C8987008D8A88008D8A88008D8A88F48A8785B3A5A2 + A1FBDFDEDDFFE4E4E3FFDFDEDDFFA5A2A1F98A8785DE8D8A88F58C8987009794 + 920096939100979492008C8987008D8A88008D8A88008D8A88008B8886008481 + 80C28D8989FF8C8987E68D8989FF848180C18B8886008D8A88008C8987009794 + 920096939100979492008C8987008D8A88008D8A88008D8A8800979492009693 + 91F4969391FF908D8B00969391FF969391F4979492008D8A8800 + } end object MenuItem40: TMenuItem Caption = '-' diff --git a/src/ce_main.pas b/src/ce_main.pas index ac720c04..338b0d62 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -6,8 +6,10 @@ interface uses Classes, SysUtils, FileUtil, SynEditKeyCmds, SynHighlighterLFM, Forms, - Controls, Graphics, Dialogs, Menus, ActnList, process, ce_common, ce_dmdwrap, - ce_synmemo, ce_widget, ce_messages, ce_editor, ce_projinspect, ce_projconf; + AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg, + Controls, Graphics, Dialogs, Menus, ActnList, ExtCtrls, process, ce_common, + ce_dmdwrap, ce_synmemo, ce_widget, ce_messages, ce_editor, ce_projinspect, + ce_projconf; type @@ -130,6 +132,7 @@ type procedure actEdUndoExecute(Sender: TObject); procedure actProjSourceExecute(Sender: TObject); procedure FormDropFiles(Sender: TObject; const FileNames: array of String); + procedure FormShow(Sender: TObject); private fProject: TCEProject; fWidgList: TCEWidgetList; @@ -224,6 +227,17 @@ begin end; newProj; + + Height := 0; + DockMaster.MakeDockSite(Self, [akBottom], admrpChild, false); + DockMaster.OnShowOptions := @ShowAnchorDockOptions; + DockMaster.HeaderStyle := adhsPoints; + DockMaster.ManualDock(DockMaster.GetAnchorSite(fEditWidg), Self, alBottom); + DockMaster.ManualDock(DockMaster.GetAnchorSite(fMesgWidg), Self, alBottom); + width := width - fProjWidg.Width; + DockMaster.ManualDock(DockMaster.GetAnchorSite(fProjWidg), Self, alRight); + + DockMaster.GetAnchorSite(fEditWidg).Header.HeaderPosition := adlhpTop; end; destructor TCEMainForm.destroy; @@ -318,7 +332,10 @@ begin itm.Action := aWidget.contextAction(i); prt.Add(itm); end; +end; +procedure TCEMainForm.FormShow(Sender: TObject); +begin end; {$ENDREGION} @@ -655,7 +672,10 @@ begin runproc.Executable := fname; {$ENDIF} runproc.Execute; - ProcessOutputToMsg(runproc); + repeat + ProcessOutputToMsg(runproc); + until + not runproc.Active; {$IFDEF MSWINDOWS} DeleteFile(fname + '.exe'); DeleteFile(fname + '.obj'); @@ -729,7 +749,7 @@ begin runproc := TProcess.Create(nil); try - runproc.Options:= [poNewConsole]; + runproc.Options := [poNewConsole, poStdErrToOutput]; procname := aProject.currentConfiguration.pathsOptions.outputFilename; if procname <> '' then procname := aProject.getAbsoluteFilename(procname) diff --git a/src/ce_messages.lfm b/src/ce_messages.lfm index 12be6870..be22fdd8 100644 --- a/src/ce_messages.lfm +++ b/src/ce_messages.lfm @@ -1,33 +1,33 @@ inherited CEMessagesWidget: TCEMessagesWidget - Left = 1098 - Height = 152 - Top = 531 + Left = 1097 + Height = 170 + Top = 513 Width = 807 Caption = 'Messages' - ClientHeight = 152 + ClientHeight = 170 ClientWidth = 807 inherited Back: TPanel - Height = 152 + Height = 170 Width = 807 - ClientHeight = 152 + ClientHeight = 170 ClientWidth = 807 inherited Content: TPanel - Height = 126 + Height = 170 Width = 807 - ClientHeight = 126 + ClientHeight = 170 ClientWidth = 807 object List: TListView[0] - Left = 3 - Height = 120 - Top = 3 - Width = 801 + Left = 2 + Height = 166 + Top = 2 + Width = 803 Align = alClient AutoSort = False AutoWidthLastColumn = True BorderSpacing.Around = 2 Columns = < item - Width = 797 + Width = 799 end> HideSelection = False ReadOnly = True @@ -38,9 +38,6 @@ inherited CEMessagesWidget: TCEMessagesWidget ViewStyle = vsReport end end - inherited Header: TPanel - Width = 807 - end end object imgList: TImageList[2] Bitmap = { diff --git a/src/ce_projconf.lfm b/src/ce_projconf.lfm index 8bbf4c04..39bc457d 100644 --- a/src/ce_projconf.lfm +++ b/src/ce_projconf.lfm @@ -12,14 +12,14 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget ClientHeight = 278 ClientWidth = 455 inherited Content: TPanel - Height = 252 + Height = 278 Width = 455 - ClientHeight = 252 + ClientHeight = 278 ClientWidth = 455 object Tree: TTreeView[0] - Left = 5 - Height = 216 - Top = 31 + Left = 4 + Height = 244 + Top = 30 Width = 150 Align = alLeft AutoExpand = True @@ -49,21 +49,21 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget } end object Panel1: TPanel[1] - Left = 3 + Left = 2 Height = 24 - Top = 3 - Width = 449 + Top = 2 + Width = 451 Align = alTop BorderSpacing.Around = 2 BevelOuter = bvNone ClientHeight = 24 - ClientWidth = 449 + ClientWidth = 451 TabOrder = 1 object selConf: TComboBox Left = 0 Height = 23 Top = 1 - Width = 358 + Width = 360 Align = alClient BorderSpacing.Top = 1 BorderSpacing.Right = 1 @@ -73,7 +73,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget TabOrder = 0 end object btnAddConf: TSpeedButton - Left = 359 + Left = 361 Height = 24 Top = 0 Width = 30 @@ -118,7 +118,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget ShowCaption = False end object btnDelConf: TSpeedButton - Left = 389 + Left = 391 Height = 24 Top = 0 Width = 30 @@ -163,7 +163,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget ShowCaption = False end object btnCloneConf: TSpeedButton - Left = 419 + Left = 421 Height = 24 Top = 0 Width = 30 @@ -209,16 +209,16 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget end end object Splitter1: TSplitter[2] - Left = 155 - Height = 222 - Top = 29 + Left = 154 + Height = 250 + Top = 28 Width = 5 end object Grid: TTIPropertyGrid[3] - Left = 160 - Height = 216 - Top = 31 - Width = 290 + Left = 159 + Height = 244 + Top = 30 + Width = 292 Align = alClient BorderSpacing.Top = 4 BorderSpacing.Right = 4 @@ -233,9 +233,6 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget ValueFont.Color = clMaroon end end - inherited Header: TPanel - Width = 455 - end end object imgList: TImageList[2] left = 32 diff --git a/src/ce_projconf.pas b/src/ce_projconf.pas index 7064d0a0..5a278740 100644 --- a/src/ce_projconf.pas +++ b/src/ce_projconf.pas @@ -7,7 +7,7 @@ interface uses Classes, SysUtils, FileUtil, RTTIGrids, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls, StdCtrls, Menus, Buttons, ce_widget, ce_common, - ce_projconfall, ce_dmdwrap, PropEdits, ObjectInspector; + ce_dmdwrap, PropEdits, ObjectInspector; type @@ -25,8 +25,7 @@ type procedure btnAddConfClick(Sender: TObject); procedure btnDelConfClick(Sender: TObject); procedure btnCloneCurrClick(Sender: TObject); - procedure GridEditorFilter(Sender: TObject; aEditor: TPropertyEditor; - var aShow: boolean); + procedure GridEditorFilter(Sender: TObject; aEditor: TPropertyEditor;var aShow: boolean); procedure selConfChange(Sender: TObject); procedure TreeChange(Sender: TObject; Node: TTreeNode); private diff --git a/src/ce_projinspect.lfm b/src/ce_projinspect.lfm index a017c97f..23ec8d4a 100644 --- a/src/ce_projinspect.lfm +++ b/src/ce_projinspect.lfm @@ -1,26 +1,28 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget - Left = 1670 - Height = 405 + Left = 1641 + Height = 384 Top = 89 - Width = 238 + Width = 263 + AllowDropFiles = True Caption = 'Project inspector' - ClientHeight = 405 - ClientWidth = 238 + ClientHeight = 384 + ClientWidth = 263 + OnDropFiles = FormDropFiles inherited Back: TPanel - Height = 405 - Width = 238 - ClientHeight = 405 - ClientWidth = 238 + Height = 384 + Width = 263 + ClientHeight = 384 + ClientWidth = 263 inherited Content: TPanel - Height = 379 - Width = 238 - ClientHeight = 379 - ClientWidth = 238 + Height = 384 + Width = 263 + ClientHeight = 384 + ClientWidth = 263 object Tree: TTreeView[0] - Left = 3 - Height = 347 - Top = 29 - Width = 232 + Left = 2 + Height = 354 + Top = 28 + Width = 259 Align = alClient AutoExpand = True BorderSpacing.Around = 2 @@ -38,15 +40,15 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget } end object Panel1: TPanel[1] - Left = 3 + Left = 2 Height = 24 - Top = 3 - Width = 232 + Top = 2 + Width = 259 Align = alTop BorderSpacing.Around = 2 BevelOuter = bvNone ClientHeight = 24 - ClientWidth = 232 + ClientWidth = 259 TabOrder = 1 object btnAddFile: TSpeedButton Left = 0 @@ -187,7 +189,7 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget Left = 114 Height = 20 Top = 2 - Width = 116 + Width = 143 ButtonWidth = 30 NumGlyphs = 1 Align = alClient @@ -243,9 +245,6 @@ inherited CEProjectInspectWidget: TCEProjectInspectWidget end end end - inherited Header: TPanel - Width = 238 - end end object imgList: TImageList[2] left = 32 diff --git a/src/ce_projinspect.pas b/src/ce_projinspect.pas index d49194a6..e50d2d08 100644 --- a/src/ce_projinspect.pas +++ b/src/ce_projinspect.pas @@ -22,6 +22,7 @@ type procedure btnAddFileClick(Sender: TObject); procedure btnAddFoldClick(Sender: TObject); procedure btnRemFileClick(Sender: TObject); + procedure FormDropFiles(Sender: TObject; const FileNames: array of String); protected procedure manualWidgetUpdate; override; private @@ -160,6 +161,15 @@ begin end end; +procedure TCEProjectInspectWidget.FormDropFiles(Sender: TObject; const FileNames: array of String); +var + fname: string; +begin + mainForm.FormDropFiles(Sender, Filenames); + if fProject = nil then exit; + for fname in Filenames do fProject.addSource(fname); +end; + procedure TCEProjectInspectWidget.manualWidgetUpdate; var src, conf: string; diff --git a/src/ce_widget.lfm b/src/ce_widget.lfm index eaecaf55..57b1a99c 100644 --- a/src/ce_widget.lfm +++ b/src/ce_widget.lfm @@ -1,40 +1,32 @@ object CEWidget: TCEWidget - Left = 1628 + Left = 1570 Height = 121 Top = 721 - Width = 320 + Width = 332 BorderIcons = [biMinimize, biMaximize] Caption = 'CEWidget' ClientHeight = 121 - ClientWidth = 320 + ClientWidth = 332 LCLVersion = '1.2.4.0' object Back: TPanel Left = 0 Height = 121 Top = 0 - Width = 320 + Width = 332 Align = alClient BevelOuter = bvNone ClientHeight = 121 - ClientWidth = 320 + ClientWidth = 332 FullRepaint = False TabOrder = 0 object Content: TPanel Left = 0 - Height = 95 - Top = 26 - Width = 320 - Align = alClient - TabOrder = 0 - end - object Header: TPanel - Left = 0 - Height = 26 + Height = 121 Top = 0 - Width = 320 - Align = alTop + Width = 332 + Align = alClient BevelOuter = bvNone - TabOrder = 1 + TabOrder = 0 end end object contextMenu: TPopupMenu diff --git a/src/ce_widget.pas b/src/ce_widget.pas index ec75ff5b..a1221f2c 100644 --- a/src/ce_widget.pas +++ b/src/ce_widget.pas @@ -6,7 +6,7 @@ interface uses Classes, SysUtils, FileUtil, Forms, Controls, ExtCtrls, - ActnList, Menus, syncobjs, ce_common; + AnchorDocking, AnchorDockStorage, ActnList, Menus, syncobjs, ce_common; type @@ -19,7 +19,6 @@ type TCEWidget = class(TForm, ICEContextualActions, ICEProjectMonitor) Content: TPanel; Back: TPanel; - Header: TPanel; contextMenu: TPopupMenu; private fAutoUpdater: TTimer; @@ -90,6 +89,8 @@ begin fAutoUpdater.Interval := 50; fAutoUpdater.OnTimer := @autoUpdaterEvent; fLocker := TCriticalSection.Create; + DockMaster.MakeDockable(Self, true, true, true); + DockMaster.GetAnchorSite(Self).Header.HeaderPosition := adlhpTop; end; destructor TCEWidget.destroy;