mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 18:59:10 +02:00
DBG: moved window-names from IDE to debugger
git-svn-id: trunk@33336 -
This commit is contained in:
parent
4803d92e36
commit
2642e6a579
@ -1197,8 +1197,9 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
AsmWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwAssembler]);
|
||||
AsmWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtAssembler]);
|
||||
AsmWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
AsmWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1023,7 +1023,7 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
BreakPointDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwBreakPoints]);
|
||||
BreakPointDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtBreakpoints]);
|
||||
BreakPointDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
BreakPointDlgWindowCreator.OnSetDividerSize := @BreakPointDlgColSizeSetter;
|
||||
BreakPointDlgWindowCreator.OnGetDividerSize := @BreakPointDlgColSizeGetter;
|
||||
@ -1034,6 +1034,7 @@ initialization
|
||||
BreakPointDlgWindowCreator.DividerTemplate.Add('ColumnBreakAction', COL_BREAK_ACTION, drsBreakPointColWidthAction);
|
||||
BreakPointDlgWindowCreator.DividerTemplate.Add('ColumnBreakPassCnt', COL_BREAK_PASS, drsBreakPointColWidthPassCount);
|
||||
BreakPointDlgWindowCreator.DividerTemplate.Add('ColumnBreakGroup', COL_BREAK_GROUP, drsBreakPointColWidthGroup);
|
||||
BreakPointDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -809,7 +809,7 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
CallStackDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwCallStack]);
|
||||
CallStackDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtCallStack]);
|
||||
CallStackDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
CallStackDlgWindowCreator.OnSetDividerSize := @CallStackDlgColSizeSetter;
|
||||
CallStackDlgWindowCreator.OnGetDividerSize := @CallStackDlgColSizeGetter;
|
||||
@ -818,6 +818,7 @@ initialization
|
||||
CallStackDlgWindowCreator.DividerTemplate.Add('ColumnCStackSource', COL_STACK_SOURCE, drsColWidthSource);
|
||||
CallStackDlgWindowCreator.DividerTemplate.Add('ColumnCStackLine', COL_STACK_LINE, drsColWidthLine);
|
||||
CallStackDlgWindowCreator.DividerTemplate.Add('ColumnCStackFunc', COL_STACK_FUNC, drsColWidthFunc);
|
||||
CallStackDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -34,7 +34,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, ExtCtrls, ComCtrls, ActnList,
|
||||
IDEWindowIntf, IDEOptionDefs,
|
||||
BaseDebugManager, IDEWindowIntf, IDEOptionDefs,
|
||||
StdActns, ClipBrd, Menus, Dialogs, FileUtil, Debugger, DebuggerDlg,
|
||||
LazarusIDEStrConsts, EnvironmentOpts, InputHistory, IDEOptionsIntf,
|
||||
IDEImagesIntf, LazIDEIntf, debugger_eventlog_options;
|
||||
@ -313,8 +313,9 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
EventsDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwDbgEvents]);
|
||||
EventsDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtEvents]);
|
||||
EventsDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
EventsDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -180,7 +180,8 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
DbgOutputDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwDbgOutput]);
|
||||
DbgOutputDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtOutput]);
|
||||
DbgOutputDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
DbgOutputDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
@ -254,8 +254,9 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
EvaluateDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwEvaluate]);
|
||||
EvaluateDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtEvaluate]);
|
||||
EvaluateDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
EvaluateDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -361,13 +361,14 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
HistoryDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiHistory]);
|
||||
HistoryDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtHistory]);
|
||||
HistoryDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
HistoryDlgWindowCreator.OnSetDividerSize := @HistoryDlgColSizeSetter;
|
||||
HistoryDlgWindowCreator.OnGetDividerSize := @HistoryDlgColSizeGetter;
|
||||
HistoryDlgWindowCreator.DividerTemplate.Add('HistoryColCur', COL_HISTORY_CUR, drsHistoryColWidthCurrent);
|
||||
HistoryDlgWindowCreator.DividerTemplate.Add('HistoryColTime', COL_HISTORY_TIME, drsHistoryColWidthTime);
|
||||
HistoryDlgWindowCreator.DividerTemplate.Add('HistoryColLocation', COL_HISTORY_LOC, drsHistoryColWidthLocation);
|
||||
HistoryDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -552,7 +552,7 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
InspectDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwInspect]);
|
||||
InspectDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtInspect]);
|
||||
InspectDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
InspectDlgWindowCreator.OnSetDividerSize := @InspectDlgColSizeSetter;
|
||||
InspectDlgWindowCreator.OnGetDividerSize := @InspectDlgColSizeGetter;
|
||||
@ -564,6 +564,7 @@ initialization
|
||||
InspectDlgWindowCreator.DividerTemplate.Add('InspectMethType', COL_INSPECT_MTYPE, drsInspectColWidthMethType);
|
||||
InspectDlgWindowCreator.DividerTemplate.Add('InspectMethReturns', COL_INSPECT_MRETURNS, drsInspectColWidthMethReturns);
|
||||
InspectDlgWindowCreator.DividerTemplate.Add('InspectMethAddress', COL_INSPECT_MADDRESS, drsInspectColWidthMethAddress);
|
||||
InspectDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -354,12 +354,13 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
LocalsDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwLocals]);
|
||||
LocalsDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtLocals]);
|
||||
LocalsDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
LocalsDlgWindowCreator.OnSetDividerSize := @LocalsDlgColSizeSetter;
|
||||
LocalsDlgWindowCreator.OnGetDividerSize := @LocalsDlgColSizeGetter;
|
||||
LocalsDlgWindowCreator.DividerTemplate.Add('LocalsName', COL_LOCALS_NAME, drsColWidthName);
|
||||
LocalsDlgWindowCreator.DividerTemplate.Add('LocalsValue', COL_LOCALS_VALUE, drsColWidthValue);
|
||||
LocalsDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -67,8 +67,9 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
PseudeoTerminalDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwPseudoTerminal]);
|
||||
PseudeoTerminalDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtPseudoTerminal]);
|
||||
PseudeoTerminalDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
PseudeoTerminalDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -37,7 +37,7 @@ interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
IDEWindowIntf, IDEOptionDefs, DebuggerStrConst,
|
||||
BaseDebugManager, IDEWindowIntf, IDEOptionDefs, DebuggerStrConst,
|
||||
ComCtrls, ActnList, Menus, Debugger, DebuggerDlg,
|
||||
LazarusIDEStrConsts, IDEImagesIntf;
|
||||
|
||||
@ -361,12 +361,13 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
RegisterDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwRegisters]);
|
||||
RegisterDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtRegisters]);
|
||||
RegisterDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
RegisterDlgWindowCreator.OnSetDividerSize := @RegisterDlgColSizeSetter;
|
||||
RegisterDlgWindowCreator.OnGetDividerSize := @RegisterDlgColSizeGetter;
|
||||
RegisterDlgWindowCreator.DividerTemplate.Add('RegisterName', COL_REGISTER_NAME, drsColWidthName);
|
||||
RegisterDlgWindowCreator.DividerTemplate.Add('RegisterValue', COL_REGISTER_VALUE, drsColWidthValue);
|
||||
RegisterDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -258,7 +258,7 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
ThreadDlgWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwThreads]);
|
||||
ThreadDlgWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtThreads]);
|
||||
ThreadDlgWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
ThreadDlgWindowCreator.OnSetDividerSize := @ThreadsDlgColSizeSetter;
|
||||
ThreadDlgWindowCreator.OnGetDividerSize := @ThreadsDlgColSizeGetter;
|
||||
@ -269,6 +269,7 @@ initialization
|
||||
ThreadDlgWindowCreator.DividerTemplate.Add('ColumnThreadSource', COL_THREAD_SOURCE, drsColWidthSource);
|
||||
ThreadDlgWindowCreator.DividerTemplate.Add('ColumnThreadLine', COL_THREAD_LINE, drsColWidthLine);
|
||||
ThreadDlgWindowCreator.DividerTemplate.Add('ColumnThreadFunc', COL_THREAD_FUNC, drsColWidthFunc);
|
||||
ThreadDlgWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -764,12 +764,13 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
WatchWindowCreator := IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwWatches]);
|
||||
WatchWindowCreator := IDEWindowCreators.Add(DebugDialogNames[ddtWatches]);
|
||||
WatchWindowCreator.OnCreateFormProc := @CreateDebugDialog;
|
||||
WatchWindowCreator.OnSetDividerSize := @WatchesDlgColSizeSetter;
|
||||
WatchWindowCreator.OnGetDividerSize := @WatchesDlgColSizeGetter;
|
||||
WatchWindowCreator.DividerTemplate.Add('ColumnWatchExpr', COL_WATCH_EXPR, drsColWidthExpression);
|
||||
WatchWindowCreator.DividerTemplate.Add('ColumnWatchValue', COL_WATCH_VALUE, drsColWidthValue);
|
||||
WatchWindowCreator.CreateSimpleLayout;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -60,6 +60,27 @@ type
|
||||
ddtHistory
|
||||
);
|
||||
|
||||
const
|
||||
// used as ID for layout storage.
|
||||
// Do not change. Do not translate
|
||||
DebugDialogNames: array [TDebugDialogType] of string = (
|
||||
'DbgOutput',
|
||||
'DbgEvents',
|
||||
'BreakPoints',
|
||||
'Watches',
|
||||
'Locals',
|
||||
'CallStack',
|
||||
'EvaluateModify',
|
||||
'Registers',
|
||||
'Assembler',
|
||||
'Inspect',
|
||||
'PseudoTerminal',
|
||||
'Threads',
|
||||
'DbgHistory'
|
||||
);
|
||||
|
||||
type
|
||||
|
||||
{ TBaseDebugManager }
|
||||
|
||||
TDebugManagerState = (
|
||||
|
@ -236,14 +236,6 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
const
|
||||
DebugDlgIDEWindow: array[TDebugDialogType] of TNonModalIDEWindow = (
|
||||
nmiwDbgOutput, nmiwDbgEvents, nmiwBreakPoints, nmiwWatches, nmiwLocals,
|
||||
nmiwCallStack, nmiwEvaluate, nmiwRegisters, nmiwAssembler, nmiwInspect,
|
||||
nmiwPseudoTerminal, nmiwThreads, nmiHistory
|
||||
);
|
||||
|
||||
type
|
||||
|
||||
{ TManagedBreakPoint }
|
||||
@ -1350,7 +1342,7 @@ begin
|
||||
CurDialog.DisableAutoSizing;
|
||||
CurDialog.Create(Self);
|
||||
FDialogs[ADialogType]:=CurDialog;
|
||||
CurDialog.Name:=NonModalIDEWindowNames[DebugDlgIDEWindow[ADialogType]];
|
||||
CurDialog.Name:= DebugDialogNames[ADialogType];
|
||||
CurDialog.Tag := Integer(ADialogType);
|
||||
CurDialog.OnDestroy := @DebugDialogDestroy;
|
||||
case ADialogType of
|
||||
@ -1637,8 +1629,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TDebugManager.ConnectMainBarEvents;
|
||||
var
|
||||
DlgType: TDebugDialogType;
|
||||
begin
|
||||
with MainIDEBar do begin
|
||||
itmViewWatches.OnClick := @mnuViewDebugDialogClick;
|
||||
@ -1925,7 +1915,7 @@ var
|
||||
DlgType: TDebugDialogType;
|
||||
begin
|
||||
for DlgType:=Low(TDebugDialogType) to High(TDebugDialogType) do
|
||||
if ItIs(NonModalIDEWindowNames[DebugDlgIDEWindow[DlgType]]) then
|
||||
if ItIs(DebugDialogNames[DlgType]) then
|
||||
begin
|
||||
ViewDebugDialog(DlgType,false,false,DoDisableAutoSizing);
|
||||
AForm:=FDialogs[DlgType];
|
||||
|
@ -81,20 +81,6 @@ type
|
||||
nmiwClipbrdHistoryName,
|
||||
nmiwPkgGraphExplorer,
|
||||
nmiwProjectInspector,
|
||||
// debugger
|
||||
nmiwDbgOutput,
|
||||
nmiwDbgEvents,
|
||||
nmiwBreakPoints,
|
||||
nmiwWatches,
|
||||
nmiwLocals,
|
||||
nmiwCallStack,
|
||||
nmiwEvaluate,
|
||||
nmiwRegisters,
|
||||
nmiwAssembler,
|
||||
nmiwInspect,
|
||||
nmiwPseudoTerminal,
|
||||
nmiwThreads,
|
||||
nmiHistory,
|
||||
// extra
|
||||
nmiwSearchResultsViewName,
|
||||
nmiwAnchorEditor,
|
||||
@ -111,8 +97,8 @@ const
|
||||
nmiwNone,
|
||||
nmiwMainIDEName,
|
||||
nmiwSourceNoteBookName,
|
||||
nmiwDbgOutput,
|
||||
nmiwDbgEvents,
|
||||
//nmiwDbgOutput,
|
||||
//nmiwDbgEvents,
|
||||
nmiwSearchResultsViewName,
|
||||
nmiwAnchorEditor
|
||||
];
|
||||
@ -129,20 +115,6 @@ const
|
||||
'ClipBrdHistory',
|
||||
'PkgGraphExplorer',
|
||||
'ProjectInspector',
|
||||
// debugger
|
||||
'DbgOutput',
|
||||
'DbgEvents',
|
||||
'BreakPoints',
|
||||
'Watches',
|
||||
'Locals',
|
||||
'CallStack',
|
||||
'EvaluateModify',
|
||||
'Registers',
|
||||
'Assembler',
|
||||
'Inspect',
|
||||
'PseudoTerminal',
|
||||
'Threads',
|
||||
'DbgHistory',
|
||||
// extra
|
||||
'SearchResults',
|
||||
'AnchorEditor',
|
||||
|
@ -339,6 +339,7 @@ type
|
||||
procedure SetLeft(const AValue: string);
|
||||
procedure SetTop(const AValue: string);
|
||||
procedure SetRight(const AValue: string);
|
||||
procedure InitSimpleLayout(ALayout: TSimpleWindowLayout);
|
||||
public
|
||||
constructor Create(aFormName: string); overload;
|
||||
constructor Create(aFormName: string;
|
||||
@ -369,7 +370,7 @@ type
|
||||
procedure CheckBoundValue(s: string);
|
||||
procedure GetDefaultBounds(AForm: TCustomForm; out DefBounds: TRect);
|
||||
|
||||
procedure InitSimpleLayout(ALayout: TSimpleWindowLayout);
|
||||
function CreateSimpleLayout: TSimpleWindowLayout;
|
||||
// TODO: Need a WindowCreator factory, by class of TForm
|
||||
// then this data can be stored per window class
|
||||
property DividerTemplate: TSimpleWindowLayoutDividerPosList read GetDividerTemplate;
|
||||
@ -1772,6 +1773,17 @@ begin
|
||||
DefBounds.Bottom:=aBottom;
|
||||
end;
|
||||
|
||||
function TIDEWindowCreator.CreateSimpleLayout: TSimpleWindowLayout;
|
||||
var
|
||||
simple: TSimpleWindowLayout;
|
||||
begin
|
||||
if not Assigned(IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(FormName))
|
||||
then begin
|
||||
simple := IDEWindowCreators.SimpleLayoutStorage.CreateWindowLayout(FormName);
|
||||
InitSimpleLayout(simple);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIDEWindowCreator.InitSimpleLayout(ALayout: TSimpleWindowLayout);
|
||||
begin
|
||||
if FDividerTemplate <> nil then
|
||||
|
Loading…
Reference in New Issue
Block a user