mirror of https://gitlab.com/basile.b/dexed.git
r13
This commit is contained in:
parent
3676f5acea
commit
9529b65b4d
|
@ -12,6 +12,7 @@ Current features
|
|||
- instant run (without saving, script-like).
|
||||
- synchronized edition in a block.
|
||||
- D syntax highlighter, folding, identifier markup.
|
||||
- current module member list.
|
||||
|
||||
Planed in version 1
|
||||
-------------------
|
||||
|
@ -22,7 +23,7 @@ Planed in version 1
|
|||
|
||||
Project information
|
||||
-------------------
|
||||
- state: alpha 1.
|
||||
- state: alpha 2.
|
||||
- programmed in Object pascal with [Lazarus](http://www.lazarus.freepascal.org).
|
||||
- based on *dmd* (*gdc* or *lmd* characteristics are not handled).
|
||||
- no other third party dependencies (so far...but using *dscanner* and/or *dcd* is envisaged.)
|
||||
|
|
|
@ -8,7 +8,7 @@ uses
|
|||
Classes, SysUtils, FileUtil, ExtendedNotebook, Forms, Controls, lcltype,
|
||||
Graphics, SynEditKeyCmds, ComCtrls, SynEditHighlighter, ExtCtrls, Menus,
|
||||
SynEditHighlighterFoldBase, SynMacroRecorder, SynPluginSyncroEdit, SynEdit,
|
||||
SynHighlighterLFM, ce_widget, ce_d2syn, ce_synmemo, ce_common;
|
||||
SynHighlighterLFM, ce_widget, ce_d2syn, ce_synmemo, ce_common, AnchorDocking;
|
||||
|
||||
type
|
||||
{ TCEEditorWidget }
|
||||
|
@ -67,6 +67,7 @@ begin
|
|||
finally
|
||||
bmp.Free;
|
||||
end;
|
||||
DockMaster.GetAnchorSite(Self).Name := ID;
|
||||
end;
|
||||
|
||||
function TCEEditorWidget.getEditorCount: NativeInt;
|
||||
|
|
154
src/ce_main.lfm
154
src/ce_main.lfm
|
@ -1,7 +1,7 @@
|
|||
object CEMainForm: TCEMainForm
|
||||
Left = 1152
|
||||
Left = 1113
|
||||
Height = 53
|
||||
Top = 23
|
||||
Top = 26
|
||||
Width = 745
|
||||
AllowDropFiles = True
|
||||
Caption = 'Coedit'
|
||||
|
@ -137,6 +137,42 @@ object CEMainForm: TCEMainForm
|
|||
end
|
||||
object mnuItemMruFile: TMenuItem
|
||||
Caption = 'Open recent file'
|
||||
Bitmap.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF000000
|
||||
00000000000000000000000000000000001200000025000000330000002E0000
|
||||
00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
|
||||
0000000000120000002500000033326E987A3E8BC1C84195D1FF3892D1ED0000
|
||||
00330000003300000033000000330000003300000023FFFFFF00FFFFFF000000
|
||||
002F326F997C3D8AC1C74092CEFF54ADDEFF66C4EDFF78E0FEFF3591D1FFBBB2
|
||||
AAFFB0AEABFFADADABFFAEAEABFFAFAFADFFA4A4A2C0FFFFFF00FFFFFF004295
|
||||
CEEF58B0DFFF6DC9EFFF7FE2FDFF7EE3FEFF7ADEFCFF7EE1FFFF308CCDFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0B0ADFFFFFFFF00FFFFFF004094
|
||||
CFFF92F1FFFF85E7FFFF80E1FDFF7ADEFBFF77DBFBFF83E1FFFF308ACBFFFFFF
|
||||
FBFFFFFFFDFFFCFCFCFFFCFCFCFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003E92
|
||||
CEFF9AF0FFFF83E4FDFF7EDFFCFF7ADDFBFF76DAFAFF89E2FEFF48A8DDFF70AE
|
||||
D9FFFFFCF8FFF9F6F6FFF7F6F6FFFFFFFFFFADADABFFFFFFFF00FFFFFF003E92
|
||||
CEFFA3F1FFFF82E3FCFF7EDFFCFF7ADDFBFF76DAFAFF71D9FBFF9DE8FFFF2A89
|
||||
CBFFFFFBF6FFF6F4F3FFF4F3F3FFFFFFFFFFADADABFFFFFFFF00FFFFFF003D92
|
||||
CEFFADF3FFFF81E3FCFF7EDFFCFF7ADDFBFF76DAFAFF6FD8FAFFABEBFFFF2B89
|
||||
CCFFFFF8F1FFF2F1EFFFEFF0EEFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C92
|
||||
CEFFB6F6FFFF80E3FCFF7DDFFCFF7ADDFBFF76DAFAFF6ED7FAFFB9EFFFFF2A89
|
||||
CCFFFCF2EDFFEEECEBFFEBEAEAFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C91
|
||||
CEFFC0F8FFFF7FE2FCFF7DDFFCFF7ADDFBFF75DAFAFF6DD7FAFFC6F3FFFF2989
|
||||
CBFFFFF9F4FFFFFFFFFFFFFFFFFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003B91
|
||||
CEFFC9F9FFFF7EE2FCFF7CDEFCFF78DCFBFF72D9FAFF6AD6FAFFD2F6FFFF2888
|
||||
CBFFFFFFFFFFCDCBC9FFA4A4A2FFFFFFFFFFAFAFADFFFFFFFF00FFFFFF003A91
|
||||
CEFFD2FCFFFF7AE2FCFF77DDFCFF7FDFFBFF9BE6FDFFB3EDFFFFD4F9FFFF2688
|
||||
CBFFFFFFFFFFA7A5A2FFFFFFFFFFE9E9E9FFB0B0AEACFFFFFF00FFFFFF003991
|
||||
CFFFE9FFFFFFAFF0FFFFCEF7FFFFDAFAFFFFC4ECFCFF8CCAECFF5FAEE0FF82BD
|
||||
E6FFFFFFFFFFFFFFFFFFE9E9E9FFAFAFADA700000000FFFFFF00FFFFFF003C93
|
||||
D0FFE9FFFFFFA8DAF3FF7BBDE4FF4398D2FF408EC7FF6E9CBCFF90A5B2FFBAAF
|
||||
A6FFB5ADA6FFB5AFA9FFB5B1ADA40000000000000000FFFFFF00FFFFFF004297
|
||||
D2FF3B93D0FF62ADDCFF93CDEDFFBBE7FAFFD8FCFFFFD6FCFFFFD3FBFFFFD1FB
|
||||
FFFFD3FCFFFF2E91D5FF000000000000000000000000FFFFFF00FFFFFF00459A
|
||||
D3EF4498D2FF4197D1FF3F95D1FF3D94D0FF3B93D0FF3A92D0FF3A92D0FF3A93
|
||||
D0FF3C94D1FF3E97D3EE000000000000000000000000FFFFFF00
|
||||
}
|
||||
ImageIndex = 9
|
||||
end
|
||||
object MenuItem43: TMenuItem
|
||||
|
@ -181,45 +217,6 @@ object CEMainForm: TCEMainForm
|
|||
object MenuItem6: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object MenuItem3: TMenuItem
|
||||
Action = actFileSaveAs
|
||||
Bitmap.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000002C0000
|
||||
0033000000330000003300000033000000330000003300000033000000330000
|
||||
00330000003300000033000000330000002C0000000000000000B3811AE1B781
|
||||
14FFB57E10FFB57D0CFFB67C0BFFB67C0AFFB57C0AFFB67D0AFFB77D0BFFB77E
|
||||
0BFFB77E0CFFB67F10FFB78114FFB3811AE1BB871E00BB871F00B78115FFFEE9
|
||||
C7FFFBE4BDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFE7BCFFFFEAC6FFB78115FFBB861D00BB871F00B67F12FFFBE9
|
||||
CFFFD88500FFFFFFFFFF797B7FFFA2A4A5FFFFFCF3FF828180FF425C72FF385A
|
||||
80FF3784DDFFEB8D00FFFFECCCFFB78011FFBB861C00BC871D00B67F12FFFAE4
|
||||
C1FFDB8D0AFFFEFFFFFFFDF7EBFFFFF8EAFFFFF7E9FFFFFDEBFF507C9CFF7BA3
|
||||
B5FF86D2FFFF1F60A2FFFFEBB6FFBE830DFFC0871600C2891600B68013FFF7DE
|
||||
B5FFDC9317FFFFFFFFFF787879FF7A7979FFA4A2A1FFABA39FFF3AABF2FFA1ED
|
||||
FFFF9ADEFEFF0998FFFF2366A9FFCA8604FF0000000971747E00B68014FFF5D9
|
||||
AAFFDF9822FFFFFFFFFFF1E6D9FFF2E6D9FFF2E6D7FFF6E6D6FFCED9DBFF1D6F
|
||||
C5FF39C4FFFF1DABFFFF7EA3C4FF7C7878FF3B3B3A5674767000B68114FFF4D4
|
||||
A2FFE29F31FFE9E1E2FFFEFFFFFFFEFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFF1B74D0FFACDBF4FF928782FFC1C0BAFF797B71FF00000033B68115FFF3D1
|
||||
99FFE3A740FFE2A336FFE19F2EFFE19E2BFFE19E2BFFE29F2CFFE3A02CFFE8A3
|
||||
2DFFF1A830FF817F83FFE9E9E8FF898B83FFAC7BA7FF9969CBFFB68115FFF3CE
|
||||
93FFE5AB48FFEED7B6FFF5F3F7FFF5F1F4FFF7F3F6FFFBF8FAFFFCF8FAFFF9F6
|
||||
F9FFF2D9B4FFEEAE40FF7A8185FFE0B1E4FFCB96C7FFAE7DCEFFB68116FFF3CB
|
||||
8CFFE7AE4EFFF5F4F8FFF0E9E4FFF1E9E2FFF8EFE8FF8A847FFF88817EFFF8F0
|
||||
EBFFF7F5F9FFEAAF4BFFF6CD7DFFBC87E4FFBE8ADAFFAC7BCF00B68116FFF1C8
|
||||
87FFE8B258FFF6F5F7FFEEE2D9FFEFE3D9FFFFFAF5FF5C5752FF48423FFFFFFB
|
||||
F7FFF7F6F8FFE9B257FFF2C880FFB68100FFBE8AEC00AB7BDF00B68116FFF2CA
|
||||
85FFEBB962FFF8F8FBFFE9DCD1FFEBDDD1FFFFFFFCFF958B83FF4A443FFFFFFF
|
||||
FFFFFAF9FCFFEBB962FFF2CA83FFB6810FFFBB860F00BC880D00B78218FFF6CC
|
||||
89FFF2C274FFFFFFFFFFFEFDFCFFFFFEFCFFFFFEF9FF93887EFF4A433DFFFFFF
|
||||
FFFFFFFFFFFFF2C274FFF6CC89FFB78217FFBB861C00BB871C00B9851CC5B781
|
||||
16FFB37A06FFD6CFD1FFD4C9C3FFD4C9C1FFD8CCC5FFE3D7D02B4A433D00DFD4
|
||||
CEFFD8D1D2FFB37A06FFB78116FFB9851CC5BB871F00BB871F00
|
||||
}
|
||||
end
|
||||
object MenuItem4: TMenuItem
|
||||
Action = actFileSave
|
||||
Bitmap.Data = {
|
||||
|
@ -298,6 +295,45 @@ object CEMainForm: TCEMainForm
|
|||
1BA5BB871F00BB871F00BB871F00BB871F00BB871F00BB871F00
|
||||
}
|
||||
end
|
||||
object MenuItem3: TMenuItem
|
||||
Action = actFileSaveAs
|
||||
Bitmap.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000002C0000
|
||||
0033000000330000003300000033000000330000003300000033000000330000
|
||||
00330000003300000033000000330000002C0000000000000000B3811AE1B781
|
||||
14FFB57E10FFB57D0CFFB67C0BFFB67C0AFFB57C0AFFB67D0AFFB77D0BFFB77E
|
||||
0BFFB77E0CFFB67F10FFB78114FFB3811AE1BB871E00BB871F00B78115FFFEE9
|
||||
C7FFFBE4BDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFFFFFFFFFFFFE7BCFFFFEAC6FFB78115FFBB861D00BB871F00B67F12FFFBE9
|
||||
CFFFD88500FFFFFFFFFF797B7FFFA2A4A5FFFFFCF3FF828180FF425C72FF385A
|
||||
80FF3784DDFFEB8D00FFFFECCCFFB78011FFBB861C00BC871D00B67F12FFFAE4
|
||||
C1FFDB8D0AFFFEFFFFFFFDF7EBFFFFF8EAFFFFF7E9FFFFFDEBFF507C9CFF7BA3
|
||||
B5FF86D2FFFF1F60A2FFFFEBB6FFBE830DFFC0871600C2891600B68013FFF7DE
|
||||
B5FFDC9317FFFFFFFFFF787879FF7A7979FFA4A2A1FFABA39FFF3AABF2FFA1ED
|
||||
FFFF9ADEFEFF0998FFFF2366A9FFCA8604FF0000000971747E00B68014FFF5D9
|
||||
AAFFDF9822FFFFFFFFFFF1E6D9FFF2E6D9FFF2E6D7FFF6E6D6FFCED9DBFF1D6F
|
||||
C5FF39C4FFFF1DABFFFF7EA3C4FF7C7878FF3B3B3A5674767000B68114FFF4D4
|
||||
A2FFE29F31FFE9E1E2FFFEFFFFFFFEFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||
FFFF1B74D0FFACDBF4FF928782FFC1C0BAFF797B71FF00000033B68115FFF3D1
|
||||
99FFE3A740FFE2A336FFE19F2EFFE19E2BFFE19E2BFFE29F2CFFE3A02CFFE8A3
|
||||
2DFFF1A830FF817F83FFE9E9E8FF898B83FFAC7BA7FF9969CBFFB68115FFF3CE
|
||||
93FFE5AB48FFEED7B6FFF5F3F7FFF5F1F4FFF7F3F6FFFBF8FAFFFCF8FAFFF9F6
|
||||
F9FFF2D9B4FFEEAE40FF7A8185FFE0B1E4FFCB96C7FFAE7DCEFFB68116FFF3CB
|
||||
8CFFE7AE4EFFF5F4F8FFF0E9E4FFF1E9E2FFF8EFE8FF8A847FFF88817EFFF8F0
|
||||
EBFFF7F5F9FFEAAF4BFFF6CD7DFFBC87E4FFBE8ADAFFAC7BCF00B68116FFF1C8
|
||||
87FFE8B258FFF6F5F7FFEEE2D9FFEFE3D9FFFFFAF5FF5C5752FF48423FFFFFFB
|
||||
F7FFF7F6F8FFE9B257FFF2C880FFB68100FFBE8AEC00AB7BDF00B68116FFF2CA
|
||||
85FFEBB962FFF8F8FBFFE9DCD1FFEBDDD1FFFFFFFCFF958B83FF4A443FFFFFFF
|
||||
FFFFFAF9FCFFEBB962FFF2CA83FFB6810FFFBB860F00BC880D00B78218FFF6CC
|
||||
89FFF2C274FFFFFFFFFFFEFDFCFFFFFEFCFFFFFEF9FF93887EFF4A433DFFFFFF
|
||||
FFFFFFFFFFFFF2C274FFF6CC89FFB78217FFBB861C00BB871C00B9851CC5B781
|
||||
16FFB37A06FFD6CFD1FFD4C9C3FFD4C9C1FFD8CCC5FFE3D7D02B4A433D00DFD4
|
||||
CEFFD8D1D2FFB37A06FFB78116FFB9851CC5BB871F00BB871F00
|
||||
}
|
||||
end
|
||||
object MenuItem25: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
|
@ -867,6 +903,42 @@ object CEMainForm: TCEMainForm
|
|||
end
|
||||
object mnuItemMruProj: TMenuItem
|
||||
Caption = 'Open recent project'
|
||||
Bitmap.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF000000
|
||||
00000000000000000000000000000000001200000025000000330000002E0000
|
||||
00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
|
||||
0000000000120000002500000033326E987A3E8BC1C84195D1FF3892D1ED0000
|
||||
00330000003300000033000000330000003300000023FFFFFF00FFFFFF000000
|
||||
002F326F997C3D8AC1C74092CEFF54ADDEFF66C4EDFF78E0FEFF3591D1FFBBB2
|
||||
AAFFB0AEABFFADADABFFAEAEABFFAFAFADFFA4A4A2C0FFFFFF00FFFFFF004295
|
||||
CEEF58B0DFFF6DC9EFFF7FE2FDFF7EE3FEFF7ADEFCFF7EE1FFFF308CCDFFFFFF
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0B0ADFFFFFFFF00FFFFFF004094
|
||||
CFFF92F1FFFF85E7FFFF80E1FDFF7ADEFBFF77DBFBFF83E1FFFF308ACBFFFFFF
|
||||
FBFFFFFFFDFFFCFCFCFFFCFCFCFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003E92
|
||||
CEFF9AF0FFFF83E4FDFF7EDFFCFF7ADDFBFF76DAFAFF89E2FEFF48A8DDFF70AE
|
||||
D9FFFFFCF8FFF9F6F6FFF7F6F6FFFFFFFFFFADADABFFFFFFFF00FFFFFF003E92
|
||||
CEFFA3F1FFFF82E3FCFF7EDFFCFF7ADDFBFF76DAFAFF71D9FBFF9DE8FFFF2A89
|
||||
CBFFFFFBF6FFF6F4F3FFF4F3F3FFFFFFFFFFADADABFFFFFFFF00FFFFFF003D92
|
||||
CEFFADF3FFFF81E3FCFF7EDFFCFF7ADDFBFF76DAFAFF6FD8FAFFABEBFFFF2B89
|
||||
CCFFFFF8F1FFF2F1EFFFEFF0EEFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C92
|
||||
CEFFB6F6FFFF80E3FCFF7DDFFCFF7ADDFBFF76DAFAFF6ED7FAFFB9EFFFFF2A89
|
||||
CCFFFCF2EDFFEEECEBFFEBEAEAFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C91
|
||||
CEFFC0F8FFFF7FE2FCFF7DDFFCFF7ADDFBFF75DAFAFF6DD7FAFFC6F3FFFF2989
|
||||
CBFFFFF9F4FFFFFFFFFFFFFFFFFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003B91
|
||||
CEFFC9F9FFFF7EE2FCFF7CDEFCFF78DCFBFF72D9FAFF6AD6FAFFD2F6FFFF2888
|
||||
CBFFFFFFFFFFCDCBC9FFA4A4A2FFFFFFFFFFAFAFADFFFFFFFF00FFFFFF003A91
|
||||
CEFFD2FCFFFF7AE2FCFF77DDFCFF7FDFFBFF9BE6FDFFB3EDFFFFD4F9FFFF2688
|
||||
CBFFFFFFFFFFA7A5A2FFFFFFFFFFE9E9E9FFB0B0AEACFFFFFF00FFFFFF003991
|
||||
CFFFE9FFFFFFAFF0FFFFCEF7FFFFDAFAFFFFC4ECFCFF8CCAECFF5FAEE0FF82BD
|
||||
E6FFFFFFFFFFFFFFFFFFE9E9E9FFAFAFADA700000000FFFFFF00FFFFFF003C93
|
||||
D0FFE9FFFFFFA8DAF3FF7BBDE4FF4398D2FF408EC7FF6E9CBCFF90A5B2FFBAAF
|
||||
A6FFB5ADA6FFB5AFA9FFB5B1ADA40000000000000000FFFFFF00FFFFFF004297
|
||||
D2FF3B93D0FF62ADDCFF93CDEDFFBBE7FAFFD8FCFFFFD6FCFFFFD3FBFFFFD1FB
|
||||
FFFFD3FCFFFF2E91D5FF000000000000000000000000FFFFFF00FFFFFF00459A
|
||||
D3EF4498D2FF4197D1FF3F95D1FF3D94D0FF3B93D0FF3A92D0FF3A92D0FF3A93
|
||||
D0FF3C94D1FF3E97D3EE000000000000000000000000FFFFFF00
|
||||
}
|
||||
ImageIndex = 9
|
||||
end
|
||||
object MenuItem42: TMenuItem
|
||||
|
|
192
src/ce_main.pas
192
src/ce_main.pas
|
@ -7,12 +7,48 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, FileUtil, SynEditKeyCmds, SynHighlighterLFM, Forms,
|
||||
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg, Controls, Graphics,
|
||||
Dialogs, Menus, ActnList, ExtCtrls, process,
|
||||
Dialogs, Menus, ActnList, ExtCtrls, process, XMLPropStorage,
|
||||
ce_common, ce_dmdwrap, ce_project, ce_synmemo, ce_widget, ce_messages,
|
||||
ce_editor, ce_projinspect, ce_projconf, ce_staticexplorer, ce_search;
|
||||
|
||||
type
|
||||
|
||||
TCEMainForm = class;
|
||||
|
||||
(**
|
||||
* Encapsulates the options.
|
||||
* note: likely to change however needed to test correctly Coedit.
|
||||
*)
|
||||
TCEOptions = class(TComponent)
|
||||
private
|
||||
fFileMru, fProjMru: TMruFileList;
|
||||
fWidgUpdDel, fWidgUpdPer: Integer;
|
||||
fLeft, FTop, fWidth, fHeight: Integer;
|
||||
procedure setFileMru(aValue: TMruFileList);
|
||||
procedure setProjMru(aValue: TMruFileList);
|
||||
procedure saveLayout(str: TStream);
|
||||
procedure loadLayout(str: TStream);
|
||||
published
|
||||
property APP_Left: Integer read fLeft write fLeft;
|
||||
property APP_Top: Integer read fTop write fTop;
|
||||
property APP_Width: Integer read fWidth write fWidth;
|
||||
property APP_Height: Integer read fHeight write fHeight;
|
||||
//
|
||||
property MRU_Files: TMruFileList read fFileMru write setFileMru;
|
||||
property MRU_Projects: TMruFileList read fProjMru write setProjMru;
|
||||
//
|
||||
property WIDG_UpdateDelay: Integer read fWidgUpdDel write fWidgUpdDel;
|
||||
property WIDG_UpdatePeriod: Integer read fWidgUpdPer write fWidgUpdPer;
|
||||
public
|
||||
constructor create(aOwner: TComponent); override;
|
||||
destructor destroy; override;
|
||||
procedure saveToFile(const aFilename: string);
|
||||
procedure loadFromFile(const aFilename: string);
|
||||
procedure beforeSave;
|
||||
procedure afterSave;
|
||||
procedure DefineProperties(Filer: TFiler); override;
|
||||
end;
|
||||
|
||||
{ TCEMainForm }
|
||||
TCEMainForm = class(TForm)
|
||||
actFileCompAndRun: TAction;
|
||||
|
@ -217,6 +253,7 @@ var
|
|||
act: TAction;
|
||||
itm: TMenuItem;
|
||||
widg: TCEWidget;
|
||||
opts: TCEOptions;
|
||||
begin
|
||||
inherited create(aOwner);
|
||||
//
|
||||
|
@ -275,10 +312,28 @@ begin
|
|||
|
||||
newProj;
|
||||
|
||||
opts := TCEOptions.create(nil);
|
||||
try
|
||||
if fileExists('temp_coedit_options.txt') then
|
||||
opts.loadFromFile('temp_coedit_options.txt');
|
||||
finally
|
||||
opts.Free;
|
||||
end;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
destructor TCEMainForm.destroy;
|
||||
var
|
||||
opts: TCEOptions;
|
||||
begin
|
||||
opts := TCEOptions.create(nil);
|
||||
try
|
||||
opts.saveToFile('temp_coedit_options.txt');
|
||||
finally
|
||||
opts.Free;
|
||||
end;
|
||||
//
|
||||
fWidgList.Free;
|
||||
fMesgWidg.Free;
|
||||
fEditWidg.Free;
|
||||
|
@ -307,9 +362,9 @@ begin
|
|||
hasEd := curr <> nil;
|
||||
if hasEd then
|
||||
begin
|
||||
actEdCopy.Enabled := curr.SelAvail;
|
||||
actEdCut.Enabled := curr.SelAvail;
|
||||
actEdPaste.Enabled := curr.CanPaste;
|
||||
actEdCopy.Enabled := curr.SelAvail and fEditWidg.Focused; // allows copy/cut/paste by shortcut on widgets
|
||||
actEdCut.Enabled := curr.SelAvail and fEditWidg.Focused; //
|
||||
actEdPaste.Enabled := curr.CanPaste and fEditWidg.Focused;
|
||||
{$IFDEF MSWINDOWS}
|
||||
// close file : raises a segfault on linux UndoStuff.>>fList<<.Count...
|
||||
actEdUndo.Enabled := curr.CanUndo;
|
||||
|
@ -383,7 +438,7 @@ begin
|
|||
mainMenu.Items.Add(prt);
|
||||
for i := 0 to cnt-1 do
|
||||
begin
|
||||
itm := TMenuItem.Create(self);
|
||||
itm := TMenuItem.Create(prt);
|
||||
itm.Action := aWidget.contextAction(i);
|
||||
prt.Add(itm);
|
||||
end;
|
||||
|
@ -603,7 +658,7 @@ begin
|
|||
' writeln("this is just a `toy feature`");' + LineEnding +
|
||||
' writeln;' + LineEnding +
|
||||
' writeln("coedit saves a temp d module before compiling it and running it...");' + LineEnding +
|
||||
'}' + LineEnding;
|
||||
'}';
|
||||
end;
|
||||
|
||||
procedure TCEMainForm.actFileSaveAsExecute(Sender: TObject);
|
||||
|
@ -756,6 +811,7 @@ begin
|
|||
curr := fEditWidg.currentEditor;
|
||||
if assigned(curr) then curr.ExecuteCommand(ecBlockUnIndent, '', nil);
|
||||
end;
|
||||
|
||||
{$ENDREGION}
|
||||
|
||||
{$REGION run ******************************************************************}
|
||||
|
@ -820,6 +876,8 @@ begin
|
|||
dmdproc.Options:= [poStdErrToOutput, poUsePipes];
|
||||
dmdproc.Executable:= 'dmd';
|
||||
dmdproc.Parameters.Add(fname + '.d');
|
||||
dmdproc.Parameters.Add('-w');
|
||||
dmdproc.Parameters.Add('-wi');
|
||||
try
|
||||
dmdproc.Execute;
|
||||
while dmdproc.Running do if dmdproc.ExitStatus <> 0 then break;
|
||||
|
@ -1170,4 +1228,126 @@ begin
|
|||
EditWidget.currentEditor.Highlighter := LfmSyn;
|
||||
end;
|
||||
{$ENDREGION}
|
||||
|
||||
{$REGION options ***************************************************************}
|
||||
constructor TCEOptions.create(aOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
fFileMru := TMruFileList.Create;
|
||||
fProjMru := TMruFileList.Create;
|
||||
//
|
||||
fWidgUpdDel := 70;
|
||||
fWidgUpdPer := 1000;
|
||||
fLeft := 0;
|
||||
fTop := 0;
|
||||
fWidth := 800;
|
||||
fHeight := 600;
|
||||
end;
|
||||
|
||||
destructor TCEOptions.destroy;
|
||||
begin
|
||||
fFileMru.Free;
|
||||
fProjMru.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TCEOptions.setFileMru(aValue: TMruFileList);
|
||||
begin
|
||||
fFileMru.Assign(aValue);
|
||||
end;
|
||||
|
||||
procedure TCEOptions.setProjMru(aValue: TMruFileList);
|
||||
begin
|
||||
fProjMru.Assign(aValue);
|
||||
end;
|
||||
|
||||
procedure TCEOptions.saveLayout(str: TStream);
|
||||
var
|
||||
st: TXMLConfigStorage;
|
||||
cf: TPropStorageXMLConfig;
|
||||
begin
|
||||
cf := TPropStorageXMLConfig.Create(nil);
|
||||
st := TXMLConfigStorage.Create(cf);
|
||||
try
|
||||
DockMaster.SaveLayoutToConfig(st);
|
||||
cf.SaveToStream(str);
|
||||
str.Position := 0;
|
||||
finally
|
||||
st.Free;
|
||||
cf.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCEOptions.loadLayout(str: TStream);
|
||||
var
|
||||
st: TXMLConfigStorage;
|
||||
cf: TPropStorageXMLConfig;
|
||||
begin
|
||||
cf := TPropStorageXMLConfig.Create(nil);
|
||||
st := TXMLConfigStorage.Create(cf);
|
||||
try
|
||||
cf.LoadFromStream(str);
|
||||
DockMaster.LoadLayoutFromConfig(st,true);
|
||||
finally
|
||||
st.Free;
|
||||
cf.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TCEOptions.DefineProperties(Filer: TFiler);
|
||||
begin
|
||||
//Filer.DefineBinaryProperty('APP_Docking', @loadLayout, @saveLayout, true);
|
||||
end;
|
||||
|
||||
procedure TCEOptions.beforeSave;
|
||||
begin
|
||||
fLeft := mainForm.Left;
|
||||
fTop := mainForm.Top;
|
||||
fWidth := mainForm.Width;
|
||||
fHeight := mainForm.Height;
|
||||
//
|
||||
fFileMru.Assign(mainForm.fFileMru);
|
||||
fProjMru.Assign(mainForm.fProjMru);
|
||||
//
|
||||
fWidgUpdPer := mainForm.fEditWidg.updaterByLoopInterval;
|
||||
fWidgUpdDel := mainForm.fEditWidg.updaterByDelayDuration;
|
||||
end;
|
||||
|
||||
procedure TCEOptions.saveToFile(const aFilename: string);
|
||||
begin
|
||||
beforeSave;
|
||||
saveCompToTxtFile(Self, aFilename);
|
||||
end;
|
||||
|
||||
procedure TCEOptions.loadFromFile(const aFilename: string);
|
||||
begin
|
||||
try
|
||||
loadCompFromTxtFile(Self, aFilename);
|
||||
except
|
||||
exit;
|
||||
end;
|
||||
afterSave;
|
||||
end;
|
||||
|
||||
procedure TCEOptions.afterSave;
|
||||
var
|
||||
widg: TCEWidget;
|
||||
begin
|
||||
mainForm.Left := fLeft;
|
||||
mainForm.Top := fTop;
|
||||
mainForm.Width := fWidth;
|
||||
mainForm.Height := fHeight;
|
||||
//
|
||||
mainForm.fFileMru.Assign(fFileMru);
|
||||
mainForm.fProjMru.Assign(fProjMru);
|
||||
//
|
||||
for widg in mainForm.fWidgList do
|
||||
begin
|
||||
widg.updaterByDelayDuration := fWidgUpdDel;
|
||||
widg.updaterByLoopInterval := fWidgUpdPer;
|
||||
end;
|
||||
end;
|
||||
{$ENDREGION}
|
||||
|
||||
end.
|
||||
|
|
|
@ -24,7 +24,6 @@ inherited CEMessagesWidget: TCEMessagesWidget
|
|||
Width = 740
|
||||
Align = alClient
|
||||
AutoSort = False
|
||||
AutoWidthLastColumn = True
|
||||
BorderSpacing.Around = 2
|
||||
Columns = <
|
||||
item
|
||||
|
|
|
@ -6,7 +6,7 @@ interface
|
|||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
||||
ExtCtrls, ComCtrls, ce_widget, ActnList, Menus, clipbrd;
|
||||
ExtCtrls, ComCtrls, ce_widget, ActnList, Menus, clipbrd, AnchorDocking;
|
||||
|
||||
type
|
||||
|
||||
|
@ -70,6 +70,7 @@ begin
|
|||
fID := 'ID_MSGS';
|
||||
//
|
||||
List.PopupMenu := contextMenu;
|
||||
DockMaster.GetAnchorSite(Self).Name := ID;
|
||||
end;
|
||||
|
||||
procedure TCEMessagesWidget.scrollToBack;
|
||||
|
|
|
@ -7,7 +7,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, FileUtil, RTTIGrids, Forms, Controls, Graphics, Dialogs,
|
||||
ExtCtrls, ComCtrls, StdCtrls, Menus, Buttons, PropEdits, ObjectInspector,
|
||||
ce_dmdwrap, ce_project, ce_widget;
|
||||
ce_dmdwrap, ce_project, ce_widget, AnchorDocking;
|
||||
|
||||
type
|
||||
|
||||
|
@ -47,7 +47,9 @@ implementation
|
|||
constructor TCEProjectConfigurationWidget.create(aOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
fID := 'PROJ_CONF';
|
||||
Tree.Selected := Tree.Items.GetLastNode;
|
||||
DockMaster.GetAnchorSite(Self).Name := ID;
|
||||
end;
|
||||
|
||||
procedure TCEProjectConfigurationWidget.projNew(const aProject: TCEProject);
|
||||
|
|
|
@ -7,7 +7,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, FileUtil, TreeFilterEdit, Forms, Controls, Graphics,
|
||||
actnlist, Dialogs, ExtCtrls, ComCtrls, Menus, Buttons, ce_project,
|
||||
ce_common, ce_widget;
|
||||
ce_common, ce_widget, AnchorDocking;
|
||||
|
||||
type
|
||||
{ TCEProjectInspectWidget }
|
||||
|
@ -71,6 +71,7 @@ begin
|
|||
fConfNode := Tree.Items[1];
|
||||
//
|
||||
Tree.PopupMenu := contextMenu;
|
||||
DockMaster.GetAnchorSite(Self).Name := ID;
|
||||
end;
|
||||
|
||||
function TCEProjectInspectWidget.contextName: string;
|
||||
|
|
|
@ -169,7 +169,7 @@ inherited CESearchWidget: TCESearchWidget
|
|||
Height = 19
|
||||
Top = 24
|
||||
Width = 60
|
||||
Caption = 'Prompt'
|
||||
Caption = 'prompt'
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes, ce_common,
|
||||
ce_widget, ce_synmemo;
|
||||
ce_widget, ce_synmemo, AnchorDocking;
|
||||
|
||||
type
|
||||
|
||||
|
@ -39,6 +39,7 @@ type
|
|||
fActReplaceAll: TAction;
|
||||
fSearchMru, fReplaceMru: TMruList;
|
||||
fCancelAll: boolean;
|
||||
fHasSearched: boolean;
|
||||
function getOptions: TSynSearchOptions;
|
||||
procedure actFindNextExecute(sender: TObject);
|
||||
procedure actReplaceAllExecute(sender: TObject);
|
||||
|
@ -82,6 +83,7 @@ begin
|
|||
//
|
||||
fSearchMru := TMruList.Create;
|
||||
fReplaceMru:= TMruList.Create;
|
||||
DockMaster.GetAnchorSite(Self).Name := ID;
|
||||
end;
|
||||
|
||||
destructor TCESearchWidget.Destroy;
|
||||
|
@ -105,7 +107,7 @@ end;
|
|||
|
||||
function TCESearchWidget.contextName: string;
|
||||
begin
|
||||
exit('Seach');
|
||||
exit('Search');
|
||||
end;
|
||||
|
||||
function TCESearchWidget.contextActionCount: integer;
|
||||
|
@ -127,6 +129,7 @@ procedure TCESearchWidget.cbToFindChange(Sender: TObject);
|
|||
begin
|
||||
if Updating then exit;
|
||||
fToFind := cbToFind.Text;
|
||||
fHasSearched := false;
|
||||
end;
|
||||
|
||||
procedure TCESearchWidget.chkEnableRepChange(Sender: TObject);
|
||||
|
@ -139,6 +142,7 @@ procedure TCESearchWidget.cbReplaceWthChange(Sender: TObject);
|
|||
begin
|
||||
if Updating then exit;
|
||||
fReplaceWth := cbReplaceWth.Text;
|
||||
fHasSearched := false;
|
||||
end;
|
||||
|
||||
function TCESearchWidget.getOptions: TSynSearchOptions;
|
||||
|
@ -155,11 +159,23 @@ begin
|
|||
if fEditor = nil then exit;
|
||||
//
|
||||
fSearchMru.Insert(0,fToFind);
|
||||
if not chkFromCur.Checked then if chkBack.Checked then
|
||||
fEditor.CaretXY := Point(high(Integer), high(Integer)) else
|
||||
if not chkFromCur.Checked then
|
||||
begin
|
||||
if chkBack.Checked then
|
||||
fEditor.CaretXY := Point(high(Integer), high(Integer))
|
||||
else
|
||||
fEditor.CaretXY := Point(0,0);
|
||||
end
|
||||
else if fHasSearched then
|
||||
begin
|
||||
if chkBack.Checked then
|
||||
fEditor.CaretX := fEditor.CaretX - 1
|
||||
else
|
||||
fEditor.CaretX := fEditor.CaretX + length(fToFind);
|
||||
end;
|
||||
if fEditor.SearchReplace(fToFind, '', getOptions) = 0 then
|
||||
dlgOkInfo('the expression cannot be found');
|
||||
dlgOkInfo('the expression cannot be found')
|
||||
else fHasSearched := true;
|
||||
UpdateByEvent;
|
||||
end;
|
||||
|
||||
|
@ -171,10 +187,22 @@ begin
|
|||
fReplaceMru.Insert(0, fReplaceWth);
|
||||
if chkPrompt.Checked then
|
||||
fEditor.OnReplaceText := @replaceEvent;
|
||||
if not chkFromCur.Checked then if chkBack.Checked then
|
||||
fEditor.CaretXY := Point(high(Integer), high(Integer)) else
|
||||
if not chkFromCur.Checked then
|
||||
begin
|
||||
if chkBack.Checked then
|
||||
fEditor.CaretXY := Point(high(Integer), high(Integer))
|
||||
else
|
||||
fEditor.CaretXY := Point(0,0);
|
||||
fEditor.SearchReplace(fToFind, fReplaceWth, getOptions + [ssoReplace]);
|
||||
end
|
||||
else if fHasSearched then
|
||||
begin
|
||||
if chkBack.Checked then
|
||||
fEditor.CaretX := fEditor.CaretX - 1
|
||||
else
|
||||
fEditor.CaretX := fEditor.CaretX + length(fToFind);
|
||||
end;
|
||||
if fEditor.SearchReplace(fToFind, fReplaceWth, getOptions + [ssoReplace]) <> 0 then
|
||||
fHasSearched := true;
|
||||
fEditor.OnReplaceText := nil;
|
||||
UpdateByEvent;
|
||||
end;
|
||||
|
|
|
@ -7,7 +7,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils, FileUtil, TreeFilterEdit, Forms, Controls, Graphics,
|
||||
Dialogs, ExtCtrls, Menus, ComCtrls, ce_widget, jsonparser, fpjson,
|
||||
ce_synmemo, process, actnlist, ce_common, ce_project;
|
||||
ce_synmemo, process, actnlist, ce_common, ce_project, AnchorDocking;
|
||||
|
||||
type
|
||||
|
||||
|
@ -86,6 +86,7 @@ begin
|
|||
//
|
||||
Tree.OnDblClick := @TreeDblClick;
|
||||
Tree.PopupMenu := contextMenu;
|
||||
DockMaster.GetAnchorSite(Self).Name := ID;
|
||||
end;
|
||||
|
||||
function TCEStaticExplorerWidget.contextName: string;
|
||||
|
@ -162,7 +163,7 @@ end;
|
|||
procedure TCEStaticExplorerWidget.TreeDeletion(Sender: TObject; Node: TTreeNode);
|
||||
begin
|
||||
if (node.Data <> nil) then
|
||||
FreeMem(node.Data)
|
||||
Dispose(PInt64(node.Data));
|
||||
end;
|
||||
|
||||
procedure TCEStaticExplorerWidget.TreeKeyPress(Sender: TObject; var Key: char);
|
||||
|
@ -191,12 +192,32 @@ var
|
|||
prs: TJsonParser;
|
||||
dat: TJsonData;
|
||||
memb: TJsonData;
|
||||
submemb: TJsonData;
|
||||
jsf, scf: string;
|
||||
ndCat: TTreeNode;
|
||||
ln: PInt64;
|
||||
nme: string;
|
||||
i, j: NativeInt;
|
||||
i: NativeInt;
|
||||
|
||||
// recursivively display members, without master categories.
|
||||
procedure digMembers(const srcDt: TJsonData; const srcNd: TTreeNode);
|
||||
var
|
||||
_memb: TJsonData;
|
||||
_ln: PInt64;
|
||||
_nme: string;
|
||||
_i: NativeInt;
|
||||
_nd: TTreeNode;
|
||||
begin
|
||||
_memb := srcDt.FindPath('members');
|
||||
if _memb <> nil then for _i := 0 to _memb.Count-1 do
|
||||
begin
|
||||
_ln := new(PInt64);
|
||||
_ln^ := _memb.Items[_i].GetPath('line').AsInt64;
|
||||
_nme := _memb.Items[_i].GetPath('name').AsString;
|
||||
_nd := Tree.Items.AddChildObject(srcNd, _nme, _ln);
|
||||
digMembers(_memb.Items[_i], _nd);
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
if ndAlias = nil then exit;
|
||||
|
||||
|
@ -224,7 +245,6 @@ begin
|
|||
|
||||
if fDoc = nil then exit;
|
||||
if fDoc.Lines.Count = 0 then exit;
|
||||
subMemb := nil;
|
||||
memb := nil;
|
||||
|
||||
// generate json
|
||||
|
@ -294,7 +314,7 @@ begin
|
|||
if memb <> nil then for i := 0 to memb.Count-1 do
|
||||
begin
|
||||
|
||||
// category
|
||||
// categories
|
||||
ln := new(PInt64);
|
||||
ln^ := memb.Items[i].GetPath('line').AsInt64;
|
||||
nme := memb.Items[i].GetPath('name').AsString;
|
||||
|
@ -314,15 +334,8 @@ begin
|
|||
|
||||
ndCat.Parent.Visible := true;
|
||||
|
||||
// optional item members
|
||||
submemb := memb.Items[i].FindPath('members');
|
||||
if subMemb <> nil then for j := 0 to submemb.Count-1 do
|
||||
begin
|
||||
ln := new(PInt64);
|
||||
ln^ := submemb.Items[j].GetPath('line').AsInt64;
|
||||
nme := submemb.Items[j].GetPath('name').AsString;
|
||||
Tree.Items.AddChildObject(ndCat, nme, ln);
|
||||
end;
|
||||
//recursive
|
||||
digMembers(memb.Items[i], ndCat);
|
||||
|
||||
end;
|
||||
finally
|
||||
|
|
|
@ -100,6 +100,9 @@ type
|
|||
implementation
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
ce_main;
|
||||
|
||||
(*******************************************************************************
|
||||
* TCEWidget
|
||||
*)
|
||||
|
@ -121,6 +124,7 @@ begin
|
|||
|
||||
DockMaster.MakeDockable(Self, true, true, true);
|
||||
DockMaster.GetAnchorSite(Self).Header.HeaderPosition := adlhpTop;
|
||||
DockMaster.GetAnchorSite(Self).Name := ID;
|
||||
|
||||
for i := 0 to contextActionCount-1 do
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue