mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-24 11:28:17 +02:00
IDE: added anchordocking controls
git-svn-id: trunk@14396 -
This commit is contained in:
parent
081402952b
commit
b502da52e6
@ -40,12 +40,12 @@ interface
|
|||||||
uses
|
uses
|
||||||
// FCL+LCL
|
// FCL+LCL
|
||||||
Classes, SysUtils, LCLProc, LCLType, LResources, Forms, Controls, Graphics,
|
Classes, SysUtils, LCLProc, LCLType, LResources, Forms, Controls, Graphics,
|
||||||
Dialogs, Buttons, ComCtrls, Menus,
|
Dialogs, Buttons, ComCtrls, Menus, LDockCtrl,
|
||||||
// CodeTools
|
// CodeTools
|
||||||
CodeToolManager, CodeAtom, CodeCache, CodeTree, KeywordFuncLists,
|
CodeToolManager, CodeAtom, CodeCache, CodeTree, KeywordFuncLists,
|
||||||
FindDeclarationTool, DirectivesTree, PascalParserTool,
|
FindDeclarationTool, DirectivesTree, PascalParserTool,
|
||||||
// IDE Intf
|
// IDE Intf
|
||||||
IDECommands, MenuIntf,
|
LazIDEIntf, IDECommands, MenuIntf,
|
||||||
// IDE
|
// IDE
|
||||||
LazarusIDEStrConsts, EnvironmentOpts, IDEOptionDefs, InputHistory, IDEProcs,
|
LazarusIDEStrConsts, EnvironmentOpts, IDEOptionDefs, InputHistory, IDEProcs,
|
||||||
CodeExplOpts, StdCtrls, ExtCtrls;
|
CodeExplOpts, StdCtrls, ExtCtrls;
|
||||||
@ -91,6 +91,7 @@ type
|
|||||||
RefreshSpeedButton: TSpeedButton;
|
RefreshSpeedButton: TSpeedButton;
|
||||||
ModeSpeedButton: TSpeedButton;
|
ModeSpeedButton: TSpeedButton;
|
||||||
TreePopupmenu: TPopupMenu;
|
TreePopupmenu: TPopupMenu;
|
||||||
|
ControlDocker: TLazControlDocker;
|
||||||
procedure CodeExplorerViewClose(Sender: TObject;
|
procedure CodeExplorerViewClose(Sender: TObject;
|
||||||
var CloseAction: TCloseAction);
|
var CloseAction: TCloseAction);
|
||||||
procedure CodeExplorerViewCreate(Sender: TObject);
|
procedure CodeExplorerViewCreate(Sender: TObject);
|
||||||
@ -310,7 +311,12 @@ begin
|
|||||||
Name:=NonModalIDEWindowNames[nmiwCodeExplorerName];
|
Name:=NonModalIDEWindowNames[nmiwCodeExplorerName];
|
||||||
Caption := lisMenuViewCodeExplorer;
|
Caption := lisMenuViewCodeExplorer;
|
||||||
EnvironmentOptions.IDEWindowLayoutList.Apply(Self,Name);
|
EnvironmentOptions.IDEWindowLayoutList.Apply(Self,Name);
|
||||||
|
ControlDocker:=TLazControlDocker.Create(Self);
|
||||||
|
ControlDocker.Name:='CodeExplorer';
|
||||||
|
{$IFDEF EnableIDEDocking}
|
||||||
|
ControlDocker.Manager:=LazarusIDE.DockingManager;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
RefreshSpeedButton.Hint:=dlgUnitDepRefresh;
|
RefreshSpeedButton.Hint:=dlgUnitDepRefresh;
|
||||||
OptionsSpeedButton.Hint:=dlgFROpts;
|
OptionsSpeedButton.Hint:=dlgFROpts;
|
||||||
CodeFilterEdit.Text:=lisCEFilter;
|
CodeFilterEdit.Text:=lisCEFilter;
|
||||||
|
@ -34,14 +34,14 @@ uses
|
|||||||
Classes, SysUtils, StrUtils,
|
Classes, SysUtils, StrUtils,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, LResources, StdCtrls, Buttons, ComCtrls, Controls, Dialogs,
|
LCLProc, LResources, StdCtrls, Buttons, ComCtrls, Controls, Dialogs,
|
||||||
ExtCtrls, Forms, Graphics,
|
LDockCtrl, ExtCtrls, Forms, Graphics,
|
||||||
// Synedit
|
// Synedit
|
||||||
SynEdit,
|
SynEdit,
|
||||||
// codetools
|
// codetools
|
||||||
FileProcs, CodeAtom, CodeCache, CodeToolManager,
|
FileProcs, CodeAtom, CodeCache, CodeToolManager,
|
||||||
Laz_DOM, Laz_XMLRead, Laz_XMLWrite,
|
Laz_DOM, Laz_XMLRead, Laz_XMLWrite,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
IDEHelpIntf, LazHelpIntf,
|
LazIDEIntf, IDEHelpIntf, LazHelpIntf,
|
||||||
// IDE
|
// IDE
|
||||||
IDEOptionDefs, EnvironmentOpts,
|
IDEOptionDefs, EnvironmentOpts,
|
||||||
IDEProcs, LazarusIDEStrConsts, FPDocSelectInherited, FPDocSelectLink,
|
IDEProcs, LazarusIDEStrConsts, FPDocSelectInherited, FPDocSelectLink,
|
||||||
@ -96,6 +96,7 @@ type
|
|||||||
InsertLinkSpeedButton: TSpeedButton;
|
InsertLinkSpeedButton: TSpeedButton;
|
||||||
UnderlineFormatButton: TSpeedButton;
|
UnderlineFormatButton: TSpeedButton;
|
||||||
SeeAlsoTabSheet: TTabSheet;
|
SeeAlsoTabSheet: TTabSheet;
|
||||||
|
ControlDocker: TLazControlDocker;
|
||||||
procedure AddLinkButtonClick(Sender: TObject);
|
procedure AddLinkButtonClick(Sender: TObject);
|
||||||
procedure AddLinkToInheritedButtonClick(Sender: TObject);
|
procedure AddLinkToInheritedButtonClick(Sender: TObject);
|
||||||
procedure BrowseExampleButtonClick(Sender: TObject);
|
procedure BrowseExampleButtonClick(Sender: TObject);
|
||||||
@ -280,6 +281,11 @@ begin
|
|||||||
|
|
||||||
Name := NonModalIDEWindowNames[nmiwFPDocEditorName];
|
Name := NonModalIDEWindowNames[nmiwFPDocEditorName];
|
||||||
EnvironmentOptions.IDEWindowLayoutList.Apply(Self, Name);
|
EnvironmentOptions.IDEWindowLayoutList.Apply(Self, Name);
|
||||||
|
ControlDocker:=TLazControlDocker.Create(Self);
|
||||||
|
ControlDocker.Name:='FPDocEditor';
|
||||||
|
{$IFDEF EnableIDEDocking}
|
||||||
|
ControlDocker.Manager:=LazarusIDE.DockingManager;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPDocEditor.FormDestroy(Sender: TObject);
|
procedure TFPDocEditor.FormDestroy(Sender: TObject);
|
||||||
|
@ -1605,6 +1605,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.SetupObjectInspector;
|
procedure TMainIDE.SetupObjectInspector;
|
||||||
|
var
|
||||||
|
OIControlDocker: TLazControlDocker;
|
||||||
begin
|
begin
|
||||||
ObjectInspector1 := TObjectInspectorDlg.Create(OwningComponent);
|
ObjectInspector1 := TObjectInspectorDlg.Create(OwningComponent);
|
||||||
ObjectInspector1.BorderStyle:=bsSizeable;
|
ObjectInspector1.BorderStyle:=bsSizeable;
|
||||||
@ -1621,6 +1623,11 @@ begin
|
|||||||
ObjectInspector1.OnShowOptions:=@OIOnShowOptions;
|
ObjectInspector1.OnShowOptions:=@OIOnShowOptions;
|
||||||
ObjectInspector1.OnViewIssues:=@OIOnViewIssues;
|
ObjectInspector1.OnViewIssues:=@OIOnViewIssues;
|
||||||
ObjectInspector1.OnDestroy:=@OIOnDestroy;
|
ObjectInspector1.OnDestroy:=@OIOnDestroy;
|
||||||
|
OIControlDocker:=TLazControlDocker.Create(ObjectInspector1);
|
||||||
|
OIControlDocker.Name:='ObjectInspector';
|
||||||
|
{$IFDEF EnableIDEDocking}
|
||||||
|
OIControlDocker.Manager:=LazarusIDE.DockingManager;
|
||||||
|
{$ENDIF}
|
||||||
IDECmdScopeObjectInspectorOnly.AddWindowClass(TObjectInspectorDlg);
|
IDECmdScopeObjectInspectorOnly.AddWindowClass(TObjectInspectorDlg);
|
||||||
|
|
||||||
GlobalDesignHook:=TPropertyEditorHook.Create;
|
GlobalDesignHook:=TPropertyEditorHook.Create;
|
||||||
|
@ -40,7 +40,9 @@ uses
|
|||||||
MemCheck,
|
MemCheck,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, StdCtrls, Forms, Controls, Buttons, Menus, ComCtrls, ExtCtrls,
|
Classes, StdCtrls, Forms, Controls, Buttons, Menus, ComCtrls, ExtCtrls,
|
||||||
Dialogs, MenuIntf;
|
Dialogs, LDockCtrl,
|
||||||
|
// IDEIntf
|
||||||
|
MenuIntf, LazIDEIntf;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TMainIDEBar }
|
{ TMainIDEBar }
|
||||||
@ -335,6 +337,8 @@ type
|
|||||||
private
|
private
|
||||||
FOldWindowState: TWindowState;
|
FOldWindowState: TWindowState;
|
||||||
public
|
public
|
||||||
|
ControlDocker: TLazControlDocker;
|
||||||
|
constructor Create(TheOwner: TComponent); override;
|
||||||
procedure HideIDE;
|
procedure HideIDE;
|
||||||
procedure UnhideIDE;
|
procedure UnhideIDE;
|
||||||
end;
|
end;
|
||||||
@ -346,6 +350,17 @@ implementation
|
|||||||
|
|
||||||
{ TMainIDEBar }
|
{ TMainIDEBar }
|
||||||
|
|
||||||
|
constructor TMainIDEBar.Create(TheOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(TheOwner);
|
||||||
|
|
||||||
|
ControlDocker:=TLazControlDocker.Create(Self);
|
||||||
|
ControlDocker.Name:='MainIDEBar';
|
||||||
|
{$IFDEF EnableIDEDocking}
|
||||||
|
ControlDocker.Manager:=LazarusIDE.DockingManager;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainIDEBar.HideIDE;
|
procedure TMainIDEBar.HideIDE;
|
||||||
begin
|
begin
|
||||||
if WindowState=wsMinimized then exit;
|
if WindowState=wsMinimized then exit;
|
||||||
|
@ -41,8 +41,8 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, AVL_Tree,
|
Classes, SysUtils, AVL_Tree,
|
||||||
LCLProc, LResources, ClipBrd, Controls, Dialogs, FileUtil, Forms, Menus,
|
LCLProc, LResources, ClipBrd, Controls, Dialogs, FileUtil, Forms, Menus,
|
||||||
StdCtrls, ComCtrls,
|
StdCtrls, ComCtrls, LDockCtrl,
|
||||||
IDEExternToolIntf, IDECommands, MenuIntf, IDEMsgIntf,
|
IDEExternToolIntf, IDECommands, MenuIntf, IDEMsgIntf, LazIDEIntf,
|
||||||
DialogProcs, EnvironmentOpts,
|
DialogProcs, EnvironmentOpts,
|
||||||
LazarusIDEStrConsts, IDEOptionDefs, IDEProcs, InputHistory, KeyMapping;
|
LazarusIDEStrConsts, IDEOptionDefs, IDEProcs, InputHistory, KeyMapping;
|
||||||
|
|
||||||
@ -110,6 +110,7 @@ type
|
|||||||
procedure UpdateMsgSrcPos(Line: TLazMessageLine);
|
procedure UpdateMsgSrcPos(Line: TLazMessageLine);
|
||||||
function GetLines(Index: integer): TIDEMessageLine; override;
|
function GetLines(Index: integer): TIDEMessageLine; override;
|
||||||
public
|
public
|
||||||
|
ControlDocker: TLazControlDocker;
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure DeleteLine(Index: integer);
|
procedure DeleteLine(Index: integer);
|
||||||
@ -302,7 +303,12 @@ begin
|
|||||||
MsgSaveAllToFileIDEMenuCommand.OnClick := @SaveAllToFileMenuItemClick;
|
MsgSaveAllToFileIDEMenuCommand.OnClick := @SaveAllToFileMenuItemClick;
|
||||||
|
|
||||||
EnvironmentOptions.IDEWindowLayoutList.Apply(Self, Name);
|
EnvironmentOptions.IDEWindowLayoutList.Apply(Self, Name);
|
||||||
|
ControlDocker:=TLazControlDocker.Create(Self);
|
||||||
|
ControlDocker.Name:='Messages';
|
||||||
|
{$IFDEF EnableIDEDocking}
|
||||||
|
ControlDocker.Manager:=LazarusIDE.DockingManager;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
FQuickFixItems:=TFPList.Create;
|
FQuickFixItems:=TFPList.Create;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, AvgLvlTree, LResources, Forms, Controls, Buttons,
|
Classes, SysUtils, LCLProc, AvgLvlTree, LResources, Forms, Controls, Buttons,
|
||||||
ComCtrls, StdCtrls, Menus, Dialogs, Graphics, FileUtil,
|
LDockCtrl, ComCtrls, StdCtrls, Menus, Dialogs, Graphics, FileUtil,
|
||||||
IDECommands,
|
LazIDEIntf, IDECommands,
|
||||||
LazarusIDEStrConsts, IDEProcs, IDEOptionDefs, EnvironmentOpts,
|
LazarusIDEStrConsts, IDEProcs, IDEOptionDefs, EnvironmentOpts,
|
||||||
Project, AddToProjectDlg, PackageSystem, PackageDefs;
|
Project, AddToProjectDlg, PackageSystem, PackageDefs;
|
||||||
|
|
||||||
@ -70,6 +70,7 @@ type
|
|||||||
OptionsBitBtn: TBitBtn;
|
OptionsBitBtn: TBitBtn;
|
||||||
ItemsTreeView: TTreeView;
|
ItemsTreeView: TTreeView;
|
||||||
ItemsPopupMenu: TPopupMenu;
|
ItemsPopupMenu: TPopupMenu;
|
||||||
|
ControlDocker: TLazControlDocker;
|
||||||
procedure AddBitBtnClick(Sender: TObject);
|
procedure AddBitBtnClick(Sender: TObject);
|
||||||
procedure ItemsPopupMenuPopup(Sender: TObject);
|
procedure ItemsPopupMenuPopup(Sender: TObject);
|
||||||
procedure ItemsTreeViewDblClick(Sender: TObject);
|
procedure ItemsTreeViewDblClick(Sender: TObject);
|
||||||
@ -689,17 +690,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TProjectInspectorForm.Create(TheOwner: TComponent);
|
constructor TProjectInspectorForm.Create(TheOwner: TComponent);
|
||||||
var
|
|
||||||
ALayout: TIDEWindowLayout;
|
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
Name:=NonModalIDEWindowNames[nmiwProjectInspector];
|
Name:=NonModalIDEWindowNames[nmiwProjectInspector];
|
||||||
Caption:=lisMenuProjectInspector;
|
Caption:=lisMenuProjectInspector;
|
||||||
KeyPreview:=true;
|
KeyPreview:=true;
|
||||||
|
|
||||||
ALayout:=EnvironmentOptions.IDEWindowLayoutList.ItemByFormID(Name);
|
EnvironmentOptions.IDEWindowLayoutList.Apply(Self,Name);
|
||||||
ALayout.Form:=TForm(Self);
|
ControlDocker:=TLazControlDocker.Create(Self);
|
||||||
ALayout.Apply;
|
ControlDocker.Name:='ProjectInspector';
|
||||||
|
{$IFDEF EnableIDEDocking}
|
||||||
|
ControlDocker.Manager:=LazarusIDE.DockingManager;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
SetupComponents;
|
SetupComponents;
|
||||||
KeyPreview:=true;
|
KeyPreview:=true;
|
||||||
|
@ -44,6 +44,7 @@ uses
|
|||||||
Classes, SysUtils, Math, Controls, LCLProc, LCLType, LResources, LCLIntf,
|
Classes, SysUtils, Math, Controls, LCLProc, LCLType, LResources, LCLIntf,
|
||||||
FileUtil, Forms, Buttons, ComCtrls, Dialogs, StdCtrls, GraphType, Graphics,
|
FileUtil, Forms, Buttons, ComCtrls, Dialogs, StdCtrls, GraphType, Graphics,
|
||||||
Translations, ClipBrd, TypInfo, Extctrls, Menus, HelpIntfs, LazHelpIntf,
|
Translations, ClipBrd, TypInfo, Extctrls, Menus, HelpIntfs, LazHelpIntf,
|
||||||
|
LDockCtrl,
|
||||||
// codetools
|
// codetools
|
||||||
CodeToolManager, CodeCache, SourceLog,
|
CodeToolManager, CodeCache, SourceLog,
|
||||||
// synedit
|
// synedit
|
||||||
@ -612,6 +613,7 @@ type
|
|||||||
public
|
public
|
||||||
FindReplaceDlgHistoryIndex: array[TFindDlgComponent] of integer;
|
FindReplaceDlgHistoryIndex: array[TFindDlgComponent] of integer;
|
||||||
FindReplaceDlgUserText: array[TFindDlgComponent] of string;
|
FindReplaceDlgUserText: array[TFindDlgComponent] of string;
|
||||||
|
ControlDocker: TLazControlDocker;
|
||||||
|
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -2969,6 +2971,11 @@ begin
|
|||||||
SourceEditorWindow:=Self;
|
SourceEditorWindow:=Self;
|
||||||
|
|
||||||
EnvironmentOptions.IDEWindowLayoutList.Apply(Self,Name);
|
EnvironmentOptions.IDEWindowLayoutList.Apply(Self,Name);
|
||||||
|
ControlDocker:=TLazControlDocker.Create(Self);
|
||||||
|
ControlDocker.Name:='SourceEditor';
|
||||||
|
{$IFDEF EnableIDEDocking}
|
||||||
|
ControlDocker.Manager:=LazarusIDE.DockingManager;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
FSourceEditorList := TList.Create;
|
FSourceEditorList := TList.Create;
|
||||||
FUnUsedEditorComponents := TList.Create;
|
FUnUsedEditorComponents := TList.Create;
|
||||||
|
Loading…
Reference in New Issue
Block a user