IDE: editor file manager: dockable

git-svn-id: trunk@41969 -
This commit is contained in:
mattias 2013-07-02 16:07:39 +00:00
parent 219041d762
commit 036500ffba
4 changed files with 24 additions and 16 deletions

View File

@ -5,9 +5,10 @@ unit EditorFileManager;
interface interface
uses uses
Classes, sysutils, Forms, Controls, CheckLst, ButtonPanel, StdCtrls, Classes, sysutils, Forms, Controls, CheckLst, ButtonPanel, StdCtrls, Buttons,
Buttons, ExtCtrls, Menus, LCLProc, LCLType, IDEImagesIntf, LazIDEIntf, ExtCtrls, Menus, LCLProc, LCLType, IDEImagesIntf, LazIDEIntf, IDEHelpIntf,
IDEHelpIntf, SrcEditorIntf, SourceEditor, LazarusIDEStrConsts, ListFilterEdit; SrcEditorIntf, IDEWindowIntf, SourceEditor, LazarusIDEStrConsts,
ListFilterEdit;
type type
@ -64,20 +65,20 @@ type
property SortAlphabetically: boolean read FSortAlphabetically write SetSortAlphabetically; property SortAlphabetically: boolean read FSortAlphabetically write SetSortAlphabetically;
end; end;
procedure ShowEditorFileManagerForm; var
EditorFileManagerForm: TEditorFileManagerForm;
procedure ShowEditorFileManagerForm(BringToFront: boolean);
implementation implementation
{$R *.lfm} {$R *.lfm}
var procedure ShowEditorFileManagerForm(BringToFront: boolean);
EditorFileManagerForm: TEditorFileManagerForm;
procedure ShowEditorFileManagerForm;
begin begin
if EditorFileManagerForm = nil then if EditorFileManagerForm = Nil then
EditorFileManagerForm := TEditorFileManagerForm.Create(SourceEditorManager); Application.CreateForm(TEditorFileManagerForm, EditorFileManagerForm);
EditorFileManagerForm.Show; IDEWindowCreators.ShowForm(EditorFileManagerForm,BringToFront);
end; end;
{ TEditorFileManagerForm } { TEditorFileManagerForm }

View File

@ -81,7 +81,8 @@ type
nmiwClipbrdHistoryName, nmiwClipbrdHistoryName,
nmiwPkgGraphExplorer, nmiwPkgGraphExplorer,
nmiwProjectInspector, nmiwProjectInspector,
// extra nmiwEditorFileManager,
// not shown at startup
nmiwSearchResultsViewName, nmiwSearchResultsViewName,
nmiwAnchorEditor, nmiwAnchorEditor,
nmiwTabOrderEditor, nmiwTabOrderEditor,
@ -116,7 +117,8 @@ const
'ClipBrdHistory', 'ClipBrdHistory',
'PkgGraphExplorer', 'PkgGraphExplorer',
'ProjectInspector', 'ProjectInspector',
// extra 'EditorFileManager',
// not shown at startup
'SearchResults', 'SearchResults',
'AnchorEditor', 'AnchorEditor',
'TabOrderEditor', 'TabOrderEditor',

View File

@ -2305,6 +2305,8 @@ begin
nil,@CreateIDEWindow,'250','250','',''); nil,@CreateIDEWindow,'250','250','','');
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwComponentList], IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwComponentList],
nil,@CreateIDEWindow,'250','250','',''); nil,@CreateIDEWindow,'250','250','','');
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwEditorFileManager],
nil,@CreateIDEWindow,'200','200','','');
end; end;
procedure TMainIDE.RestoreIDEWindows; procedure TMainIDE.RestoreIDEWindows;
@ -4974,7 +4976,7 @@ end;
procedure TMainIDE.mnuWindowManagerClicked(Sender: TObject); procedure TMainIDE.mnuWindowManagerClicked(Sender: TObject);
begin begin
ShowEditorFileManagerForm; ShowEditorFileManagerForm(true);
end; end;
procedure TMainIDE.SaveEnvironment(Immediately: boolean); procedure TMainIDE.SaveEnvironment(Immediately: boolean);
@ -6133,6 +6135,11 @@ begin
DoShowComponentList(false); DoShowComponentList(false);
AForm:=ComponentListForm; AForm:=ComponentListForm;
end end
else if ItIs(NonModalIDEWindowNames[nmiwEditorFileManager]) then
begin
ShowEditorFileManagerForm(false);
AForm:=EditorFileManagerForm;
end
else if ItIs(DefaultObjectInspectorName) then else if ItIs(DefaultObjectInspectorName) then
begin begin
DoShowInspector(false); DoShowInspector(false);

View File

@ -269,9 +269,7 @@ begin
if UnitDependenciesWindow = Nil then if UnitDependenciesWindow = Nil then
Application.CreateForm(TUnitDependenciesWindow, UnitDependenciesWindow); Application.CreateForm(TUnitDependenciesWindow, UnitDependenciesWindow);
if Show then if Show then
begin
IDEWindowCreators.ShowForm(UnitDependenciesWindow,BringToFront); IDEWindowCreators.ShowForm(UnitDependenciesWindow,BringToFront);
end;
end; end;
function CompareUDBaseNodes(UDNode1, UDNode2: Pointer): integer; function CompareUDBaseNodes(UDNode1, UDNode2: Pointer): integer;