This commit is contained in:
Basile Burg 2014-06-27 11:54:00 +02:00
parent fdadfc810b
commit 35f137497e
12 changed files with 221 additions and 72 deletions

View File

@ -55,7 +55,7 @@
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dDEBUG
-dUSE_DICT_LINKEDCHARMAP"/>
//-dUSE_DICT_LINKEDCHARMAP"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
@ -97,7 +97,7 @@
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dRELEASE
-dUSE_DICT_LINKEDCHARMAP"/>
//-dUSE_DICT_LINKEDCHARMAP"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
@ -252,7 +252,6 @@
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dUSE_DICT_LINKEDCHARMAP"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>

View File

@ -71,6 +71,11 @@ type
*)
function dlgOkCancel(const aMsg: string): TModalResult;
(**
* Info dialog
*)
function dlgOkInfo(const aMsg: string): TModalResult;
(**
* Returns an unique object identifier, based on its heap address.
*)
@ -272,6 +277,13 @@ begin
exit( MessageDlg('Coedit', aMsg, mtConfirmation, Btns, ''));
end;
function dlgOkInfo(const aMsg: string): TModalResult;
const
Btns = [mbOK];
begin
exit( MessageDlg('Coedit', aMsg, mtInformation, Btns, ''));
end;
function uniqueObjStr(const aObject: Tobject): string;
begin
{$HINTS OFF}{$WARNINGS OFF}

View File

@ -70,11 +70,11 @@ type
private
fLongest, fShortest: NativeInt;
fEntries: array[Byte] of TD2DictionaryEntry;
function toHash(const aValue: string): Byte;
function toHash(const aValue: string): Byte; {$IFNDEF DEBUG}inline;{$ENDIF}
procedure addEntry(const aValue: string);
public
constructor create;
destructor destroy;
destructor destroy; // do not remove even if empty (compat with char-map version)
function find(const aValue: string): boolean;
end;
{$ENDIF}
@ -356,7 +356,6 @@ begin
end;
{$ENDIF}
constructor TSynD2Syn.create(aOwner: TComponent);
begin
inherited create(aOwner);

View File

@ -5,7 +5,7 @@ unit ce_editor;
interface
uses
Classes, SysUtils, FileUtil, ExtendedNotebook, Forms, Controls,
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;
@ -26,6 +26,7 @@ type
fKeyChanged: boolean;
fSyncEdit: TSynPluginSyncroEdit;
procedure memoKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure memoKeyPress(Sender: TObject; var Key: Char);
procedure memoMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure memoChange(Sender: TObject);
procedure memoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
@ -136,6 +137,7 @@ begin
memo.OnMouseDown := @memoMouseDown;
memo.OnChange := @memoChange;
memo.OnMouseMove := @memoMouseMove;
memo.OnKeyPress := @memoKeyPress;
//
pageControl.ActivePage := sheet;
//http://bugs.freepascal.org/view.php?id=26320
@ -154,9 +156,18 @@ begin
end;
procedure TCEEditorWidget.memoKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
end;
procedure TCEEditorWidget.memoKeyPress(Sender: TObject; var Key: Char);
begin
if (sender is TCESynMemo) then
identifierToD2Syn(TCESynMemo(Sender));
case Byte(Key) of
VK_UNKNOWN..VK_BACK: exit;
VK_PRIOR..VK_HELP: exit;
VK_F1..$91: exit;
end;
fKeyChanged := true;
beginUpdateByDelay;
end;

View File

@ -1,7 +1,7 @@
object CEMainForm: TCEMainForm
Left = 1158
Left = 1152
Height = 53
Top = 0
Top = 23
Width = 745
AllowDropFiles = True
Caption = 'Coedit'
@ -9,6 +9,7 @@ object CEMainForm: TCEMainForm
DockSite = True
Menu = mainMenu
OnDropFiles = FormDropFiles
OnResize = FormResize
OnShow = FormShow
Position = poMainFormCenter
ShowHint = True
@ -622,9 +623,81 @@ object CEMainForm: TCEMainForm
end
object MenuItem54: TMenuItem
Action = actEdIndent
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0033000000330000003300000033000000330000003300000033000000330000
0033000000330000003300000033000000330000003300000000979797C0A2A2
A2FFA0A0A0FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA0A0
A0FF9F9F9FFF9F9F9FFF9F9F9FFF9F9F9FFFA2A2A2FF979797C0A2A2A2FFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2FF9F9F9FFFFFFF
FFFFFFFFFFFF444240FF5D5A58FF6F6D6AFF73706EFF605E5BFF484645FFFFFF
FFFFFFFFFFFFFEFEFFFFFEFEFEFFFEFEFEFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFCFCFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFFEFEFEFF413F3EFF53514FFF5D5B5AFF686663FF72706EFF767471FF6A67
66FF5F5D5CFF555250FF434140FFFEFEFEFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFF8F8F8FFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFCFBFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFF3F3F3FFF5F9FDFFD19047FFF3F5F7FFF7F9FCFFFEFEFDFF4F4D4BFF6B69
68FF7F7D7BFF706D6DFF54514FFFFCFBFAFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFEFF2F4FFF2FBFFFFD2862EFFD48D3AFFEEE4DAFFFAFDFEFF504E4CFF6B69
68FF807E7BFF706E6DFF54524FFFF8F8F7FFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFEDF0F3FFDA8828FFDE943BFFDE933AFFDF9945FFF6F8FCFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFEFDFFF4F2F1FFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFEAECEEFFECF5FEFFD4872FFFD79549FFEAE0D4FFF4F7F9FF504E4CFF6C69
69FF807E7CFF706E6DFF555250FFF2F3F2FFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFE8E8E8FFEBEEF2FFD18F47FFEBEAECFFECEEF1FFF3F2F3FF514F4DFF6C6A
69FF817E7CFF716F6EFF555351FFF0EFEEFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFE7E7E6FFECEEEFFFEFF3F5FFEFF1F2FFEEEFEFFFF0F1F0FFF6F6F5FFF8F9
F8FFF9FAF9FFF9FAF9FFF5F5F4FFEAEAE9FFFFFFFFFF9F9F9FFFA0A0A0FFFFFF
FFFFE6E5E4FF42403FFF53514FFF5D5B5AFF696664FF73706EFF767472FF6B69
68FF615F5EFF575552FF464342FFE7E6E4FFFFFFFFFFA0A0A0FFA2A2A2FFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2FFA5A5A5EFA2A2
A2FFA0A0A0FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1
A1FFA1A1A1FFA1A1A1FFA1A1A1FFA0A0A0FFA2A2A2FFA5A5A5EF
}
end
object MenuItem53: TMenuItem
Action = actEdUnIndent
Bitmap.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0033000000330000003300000033000000330000003300000033000000330000
0033000000330000003300000033000000330000003300000000979797C0A2A2
A2FFA0A0A0FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA0A0
A0FF9F9F9FFF9F9F9FFF9F9F9FFF9F9F9FFFA2A2A2FF979797C0A2A2A2FFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2FF9F9F9FFFFFFF
FFFFFFFFFFFF444240FF5D5A58FF6F6D6AFF73706EFF605E5BFF484645FFFFFF
FFFFFFFFFFFFFEFEFFFFFEFEFEFFFEFEFEFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFCFCFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFFEFEFEFF413E3DFF52504EFF5D5B5BFF686664FF72706EFF767471FF6A67
66FF5F5D5CFF555250FF434140FFFEFEFEFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFF8F8F7FFFDFEFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFCFBFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFF3F3F2FFF5F7F9FFF3F5F7FFD19047FFF8FBFFFFFEFEFEFF4F4D4AFF6B69
68FF7F7D7BFF706D6DFF54514FFFFCFBFAFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFEFF2F4FFECE3D8FFD48D3AFFD2862EFFF4FCFFFFFAFCFEFF504E4CFF6B69
68FF807E7BFF706E6DFF54524FFFF8F8F7FFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFEDF0F3FFDE9743FFDE933AFFDE943BFFDB8A29FFF6F8FCFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFEFDFFF4F2F1FFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFEAECEEFFE7DFD2FFD79549FFD4872FFFEEF7FFFFF4F7F9FF504E4CFF6C69
69FF807E7CFF706E6DFF555250FFF2F3F2FFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFE8E7E7FFEAECEFFFEBEAECFFD18F47FFEDF0F4FFF3F3F3FF514F4CFF6C6A
69FF817E7CFF716F6EFF555351FFF0EFEEFFFFFFFFFF9F9F9FFF9F9F9FFFFFFF
FFFFE7E7E6FFECEDEDFFEFF1F2FFEFF2F5FFEEF0F1FFF0F1F1FFF6F6F5FFF8F9
F8FFF9FAF9FFF9FAF9FFF5F5F4FFEAEAE9FFFFFFFFFF9F9F9FFFA0A0A0FFFFFF
FFFFE6E5E4FF42403FFF53514EFF5D5B5BFF696664FF73706EFF767472FF6B69
68FF615F5EFF575552FF464342FFE7E6E4FFFFFFFFFFA0A0A0FFA2A2A2FFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA2A2A2FFA5A5A5EFA2A2
A2FFA0A0A0FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1A1FFA1A1
A1FFA1A1A1FFA1A1A1FFA1A1A1FFA0A0A0FFA2A2A2FFA5A5A5EF
}
end
object MenuItem52: TMenuItem
Caption = '-'

View File

@ -139,6 +139,7 @@ type
procedure actProjSourceExecute(Sender: TObject);
procedure actEdUnIndentExecute(Sender: TObject);
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
procedure FormResize(Sender: TObject);
procedure FormShow(Sender: TObject);
private
fUpdateCount: NativeInt;
@ -240,18 +241,23 @@ begin
mnuItemWin.Add(itm);
end;
newProj;
Height := 0;
DockMaster.MakeDockSite(Self, [akBottom], admrpChild, false);
DockMaster.MakeDockSite(Self, [akBottom], admrpChild, true);
DockMaster.OnShowOptions := @ShowAnchorDockOptions;
DockMaster.HeaderStyle := adhsPoints;
DockMaster.ManualDock(DockMaster.GetAnchorSite(fEditWidg), Self, alBottom);
DockMaster.ManualDock(DockMaster.GetAnchorSite(fMesgWidg), Self, alBottom);
DockMaster.ManualDock(DockMaster.GetAnchorSite(fStExpWidg), Self, alLeft);
DockMaster.ManualDock(DockMaster.GetAnchorSite(fFindWidg),
DockMaster.GetAnchorSite(fStExpWidg), alBottom, fStExpWidg);
width := width - fProjWidg.Width;
DockMaster.ManualDock(DockMaster.GetAnchorSite(fProjWidg), Self, alRight);
DockMaster.ManualDock(DockMaster.GetAnchorSite(fPrjCfWidg),
DockMaster.GetAnchorSite(fProjWidg), alBottom, fProjWidg);
DockMaster.GetAnchorSite(fEditWidg).Header.HeaderPosition := adlhpTop;
newProj;
end;
destructor TCEMainForm.destroy;
@ -367,6 +373,10 @@ end;
procedure TCEMainForm.FormShow(Sender: TObject);
begin
end;
procedure TCEMainForm.FormResize(Sender: TObject);
begin
end;
{$ENDREGION}
{$REGION file ******************************************************************}
@ -504,16 +514,16 @@ procedure TCEMainForm.actFileNewRunExecute(Sender: TObject);
begin
newFile;
fEditWidg.currentEditor.Text :=
'module runnable;' + #13#10 +
'' + #13#10 +
'import std.stdio;' + #13#10 +
'' + #13#10 +
'void main(string args[])' + #13#10 +
'{' + #13#10 +
' writeln("runnable module is just a `toy feature`");' + #13#10 +
' writeln;' + #13#10 +
' writeln("coedit just saves a temporary d module before compiling it and running it...");' + #13#10 +
'}' + #13#10;
'module runnable;' + LineEnding +
'' + LineEnding +
'import std.stdio;' + LineEnding +
'' + LineEnding +
'void main(string args[])' + LineEnding +
'{' + LineEnding +
' 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);
@ -553,7 +563,8 @@ begin
then exit;
//
str := fEditWidg.editor[fEditWidg.editorIndex].fileName;
fProject.addSource(str);
if fileExists(str) then fProject.addSource(str)
else dlgOkInfo('the file has not been added to the project because it does not exist');
end;
procedure TCEMainForm.actFileCloseExecute(Sender: TObject);

View File

@ -1,5 +1,5 @@
inherited CEMessagesWidget: TCEMessagesWidget
Left = 1160
Left = 1143
Height = 172
Top = 511
Width = 744
@ -30,9 +30,15 @@ inherited CEMessagesWidget: TCEMessagesWidget
item
Width = 736
end>
Font.CharSet = ANSI_CHARSET
Font.Height = -12
Font.Name = 'Lucida Console'
Font.Pitch = fpFixed
Font.Quality = fqDraft
HideSelection = False
IconOptions.WrapText = False
MultiSelect = True
ParentFont = False
ReadOnly = True
ShowColumnHeaders = False
SmallImages = imgList

View File

@ -1,27 +1,27 @@
inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
Left = 1160
Left = 1323
Height = 277
Top = 722
Width = 463
Top = 600
Width = 450
Caption = 'Project configuration'
ClientHeight = 277
ClientWidth = 463
ClientWidth = 450
inherited Back: TPanel
Height = 277
Width = 463
Width = 450
ClientHeight = 277
ClientWidth = 463
ClientWidth = 450
inherited Content: TPanel
Height = 277
Width = 463
Width = 450
ClientHeight = 277
ClientWidth = 463
ClientWidth = 450
object Tree: TTreeView[0]
Left = 4
Height = 243
Hint = 'filter configuration elements'
Top = 30
Width = 150
Width = 125
Align = alLeft
AutoExpand = True
BorderSpacing.Left = 4
@ -53,19 +53,19 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
Left = 2
Height = 24
Top = 2
Width = 459
Width = 446
Align = alTop
BorderSpacing.Around = 2
BevelOuter = bvNone
ClientHeight = 24
ClientWidth = 459
ClientWidth = 446
TabOrder = 1
object selConf: TComboBox
Left = 0
Height = 23
Hint = 'select a configuration'
Top = 1
Width = 368
Width = 355
Align = alClient
BorderSpacing.Top = 1
BorderSpacing.Right = 1
@ -75,7 +75,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
TabOrder = 0
end
object btnAddConf: TSpeedButton
Left = 369
Left = 356
Height = 24
Hint = 'add an empty configuration'
Top = 0
@ -121,7 +121,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
ShowCaption = False
end
object btnDelConf: TSpeedButton
Left = 399
Left = 386
Height = 24
Hint = 'remove selected configuration'
Top = 0
@ -167,7 +167,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
ShowCaption = False
end
object btnCloneConf: TSpeedButton
Left = 429
Left = 416
Height = 24
Hint = 'clone selected configuration'
Top = 0
@ -214,16 +214,16 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
end
end
object Splitter1: TSplitter[2]
Left = 154
Left = 129
Height = 249
Top = 28
Width = 5
end
object Grid: TTIPropertyGrid[3]
Left = 159
Left = 134
Height = 243
Top = 30
Width = 300
Width = 312
Align = alClient
BorderSpacing.Top = 4
BorderSpacing.Right = 4

View File

@ -53,6 +53,10 @@ type
//
procedure docFocused(const aDoc: TCESynMemo); override;
procedure docClose(const aDoc: TCESynMemo); override;
//
function contextName: string; override;
function contextActionCount: integer; override;
function contextAction(index: integer): TAction; override;
end;
implementation
@ -99,6 +103,26 @@ begin
UpdateByEvent;
end;
function TCESearchWidget.contextName: string;
begin
exit('Seach');
end;
function TCESearchWidget.contextActionCount: integer;
begin
exit(3);
end;
function TCESearchWidget.contextAction(index: integer): TAction;
begin
case index of
0: exit(fActFindNext);
1: exit(fActReplaceNext);
2: exit(fActReplaceAll);
else exit(nil);
end;
end;
procedure TCESearchWidget.cbToFindChange(Sender: TObject);
begin
if Updating then exit;
@ -134,7 +158,8 @@ begin
if not chkFromCur.Checked then if chkBack.Checked then
fEditor.CaretXY := Point(high(Integer), high(Integer)) else
fEditor.CaretXY := Point(0,0);
fEditor.SearchReplace(fToFind, '', getOptions);
if fEditor.SearchReplace(fToFind, '', getOptions) = 0 then
dlgOkInfo('the expression cannot be found');
UpdateByEvent;
end;

View File

@ -1,7 +1,7 @@
inherited CEStaticExplorerWidget: TCEStaticExplorerWidget
Left = 1640
Left = 999
Height = 276
Top = 721
Top = 284
Width = 261
Caption = 'Static explorer'
ClientHeight = 276
@ -37,17 +37,18 @@ inherited CEStaticExplorerWidget: TCEStaticExplorerWidget
OnKeyPress = TreeKeyPress
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRowSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
Items.Data = {
F9FFFFFF020009000000000000000000000000000000FFFFFFFF000000000000
F9FFFFFF02000A000000000000000000000000000000FFFFFFFF000000000000
00000005000000416C6961730100000001000000FFFFFFFFFFFFFFFF00000000
000000000007000000436C6173736573020000000200000002000000FFFFFFFF
00000000000000000005000000456E756D730300000003000000FFFFFFFFFFFF
FFFF0000000000000000000800000046756E6374696F6E0400000004000000FF
FFFFFFFFFFFFFF00000000000000000007000000496D706F7274730500000005
000000FFFFFFFFFFFFFFFF000000000000000000050000004D6978696E060000
0006000000FFFFFFFFFFFFFFFF00000000000000000007000000537472756374
730700000007000000FFFFFFFFFFFFFFFF000000000000000000090000005465
6D706C617465730800000008000000FFFFFFFFFFFFFFFF000000000000000000
080000005661726961626C65
000000FFFFFFFFFFFFFFFF00000000000000000009000000496E746572666163
650600000006000000FFFFFFFFFFFFFFFF000000000000000000050000004D69
78696E0700000007000000FFFFFFFFFFFFFFFF00000000000000000007000000
537472756374730800000008000000FFFFFFFFFFFFFFFF000000000000000000
0900000054656D706C617465730000000000000000FFFFFFFFFFFFFFFF000000
000000000000080000005661726961626C65
}
TreeLineColor = 14671839
TreeLinePenStyle = psSolid

View File

@ -27,7 +27,7 @@ type
fProj: TCEProject;
fAutoRefresh: boolean;
ndAlias, ndClass, ndEnum, ndFunc: TTreeNode;
ndImp, ndMix, ndStruct, ndTmp, ndVar: TTreeNode;
ndImp, ndIntf, ndMix, ndStruct, ndTmp, ndVar: TTreeNode;
procedure Rescan;
procedure TreeDblClick(Sender: TObject);
procedure actRefreshExecute(Sender: TObject);
@ -39,7 +39,6 @@ type
public
constructor create(aOwner: TComponent); override;
//
procedure docNew(const aDoc: TCESynMemo); override;
procedure docFocused(const aDoc: TCESynMemo); override;
procedure docChanged(const aDoc: TCESynMemo); override;
procedure docClose(const aDoc: TCESynMemo); override;
@ -79,10 +78,11 @@ begin
ndEnum := Tree.Items[2];
ndFunc := Tree.Items[3];
ndImp := Tree.Items[4];
ndMix := Tree.Items[5];
ndStruct := Tree.Items[6];
ndTmp := Tree.Items[7];
ndVar := Tree.Items[8];
ndIntf := Tree.Items[5];
ndMix := Tree.Items[6];
ndStruct := Tree.Items[7];
ndTmp := Tree.Items[8];
ndVar := Tree.Items[9];
//
Tree.OnDblClick := @TreeDblClick;
Tree.PopupMenu := contextMenu;
@ -134,10 +134,6 @@ begin
fProj := nil;
end;
procedure TCEStaticExplorerWidget.docNew(const aDoc: TCESynMemo);
begin
end;
procedure TCEStaticExplorerWidget.docFocused(const aDoc: TCESynMemo);
begin
fDoc := aDoc;
@ -209,11 +205,23 @@ begin
ndEnum.DeleteChildren;
ndFunc.DeleteChildren;
ndImp.DeleteChildren;
ndIntf.DeleteChildren;
ndMix.DeleteChildren;
ndStruct.DeleteChildren;
ndTmp.DeleteChildren;
ndVar.DeleteChildren;
ndAlias.Visible := false;
ndClass.Visible := false;
ndEnum.Visible := false;
ndFunc.Visible := false;
ndImp.Visible := false;
ndIntf.Visible := false;
ndMix.Visible := false;
ndStruct.Visible := false;
ndTmp.Visible := false;
ndVar.Visible := false;
if fDoc = nil then exit;
if fDoc.Lines.Count = 0 then exit;
subMemb := nil;
@ -292,17 +300,20 @@ begin
nme := memb.Items[i].GetPath('name').AsString;
case memb.Items[i].GetPath('kind').AsString of
'alias' :ndCat := Tree.Items.AddChildObject(ndAlias, nme, ln);
'class' :ndCat := Tree.Items.AddChildObject(ndClass, nme, ln);
'enum' :ndCat := Tree.Items.AddChildObject(ndEnum, nme, ln);
'function':ndCat := Tree.Items.AddChildObject(ndFunc, nme, ln);
'import' :ndCat := Tree.Items.AddChildObject(ndImp, nme, ln);
'mixin' :ndCat := Tree.Items.AddChildObject(ndMix, nme, ln);
'struct' :ndCat := Tree.Items.AddChildObject(ndStruct, nme, ln);
'template':ndCat := Tree.Items.AddChildObject(ndTmp, nme, ln);
'variable':ndCat := Tree.Items.AddChildObject(ndVar, nme, ln);
'alias' :ndCat := Tree.Items.AddChildObject(ndAlias, nme, ln);
'class' :ndCat := Tree.Items.AddChildObject(ndClass, nme, ln);
'enum' :ndCat := Tree.Items.AddChildObject(ndEnum, nme, ln);
'function' :ndCat := Tree.Items.AddChildObject(ndFunc, nme, ln);
'import' :ndCat := Tree.Items.AddChildObject(ndImp, nme, ln);
'interface' :ndCat := Tree.Items.AddChildObject(ndIntf, nme, ln);
'mixin' :ndCat := Tree.Items.AddChildObject(ndMix, nme, ln);
'struct' :ndCat := Tree.Items.AddChildObject(ndStruct, nme, ln);
'template' :ndCat := Tree.Items.AddChildObject(ndTmp, nme, ln);
'variable' :ndCat := Tree.Items.AddChildObject(ndVar, nme, ln);
end;
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

View File

@ -40,8 +40,8 @@ type
procedure UpdateByEvent; virtual;
// a descendant overrides to implement a delayed update event.
procedure UpdateByDelay; virtual;
// May be used for appplication options
published
property ID: string read fID write fID;
property updaterByLoopInterval: Integer read fLoopInter write setLoopInt;
property updaterByDelayDuration: Integer read fDelayDur write setDelayDur;
public
@ -73,10 +73,11 @@ type
function contextAction(index: integer): TAction; virtual;
// returns true if one of the three updater is processing.
property updating: boolean read fUpdating;
property ID: string read fID write fID;
end;
(**
* Holds a list of TCEWidget.
* TCEWidget list.
*)
TCEWidgetList = class(TList)
private