mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 18:29:12 +02:00
InspectDlg: add button "add watch"
git-svn-id: trunk@65146 -
This commit is contained in:
parent
30d807f741
commit
c942b091f8
@ -154,5 +154,18 @@ object IDEInspectDlg: TIDEInspectDlg
|
|||||||
Caption = 'ToolButton4'
|
Caption = 'ToolButton4'
|
||||||
Style = tbsDivider
|
Style = tbsDivider
|
||||||
end
|
end
|
||||||
|
object BtnAddWatch: TToolButton
|
||||||
|
Left = 188
|
||||||
|
Top = 2
|
||||||
|
Caption = 'Add Watch'
|
||||||
|
OnClick = BtnAddWatchClick
|
||||||
|
end
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 180
|
||||||
|
Height = 22
|
||||||
|
Top = 2
|
||||||
|
Caption = 'ToolButton3'
|
||||||
|
Style = tbsSeparator
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -60,12 +60,15 @@ type
|
|||||||
ToolBar1: TToolBar;
|
ToolBar1: TToolBar;
|
||||||
btnUseInstance: TToolButton;
|
btnUseInstance: TToolButton;
|
||||||
btnBackward: TToolButton;
|
btnBackward: TToolButton;
|
||||||
|
BtnAddWatch: TToolButton;
|
||||||
ToolButton2: TToolButton;
|
ToolButton2: TToolButton;
|
||||||
btnColClass: TToolButton;
|
btnColClass: TToolButton;
|
||||||
btnColType: TToolButton;
|
btnColType: TToolButton;
|
||||||
btnColVisibility: TToolButton;
|
btnColVisibility: TToolButton;
|
||||||
btnForward: TToolButton;
|
btnForward: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
ToolButton4: TToolButton;
|
ToolButton4: TToolButton;
|
||||||
|
procedure BtnAddWatchClick(Sender: TObject);
|
||||||
procedure btnBackwardClick(Sender: TObject);
|
procedure btnBackwardClick(Sender: TObject);
|
||||||
procedure btnColClassClick(Sender: TObject);
|
procedure btnColClassClick(Sender: TObject);
|
||||||
procedure btnForwardClick(Sender: TObject);
|
procedure btnForwardClick(Sender: TObject);
|
||||||
@ -300,6 +303,27 @@ begin
|
|||||||
GotoHistory(FHistoryIndex - 1);
|
GotoHistory(FHistoryIndex - 1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIDEInspectDlg.BtnAddWatchClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
w: TCurrentWatch;
|
||||||
|
begin
|
||||||
|
if DebugBoss = nil then
|
||||||
|
exit;
|
||||||
|
DebugBoss.Watches.CurrentWatches.BeginUpdate;
|
||||||
|
try
|
||||||
|
w := DebugBoss.Watches.CurrentWatches.Find(FExpression);
|
||||||
|
if w = nil then
|
||||||
|
w := DebugBoss.Watches.CurrentWatches.Add(FExpression);
|
||||||
|
if (w <> nil) then begin
|
||||||
|
w.Enabled := True;
|
||||||
|
DebugBoss.ViewDebugDialog(ddtWatches, False);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
DebugBoss.Watches.CurrentWatches.EndUpdate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIDEInspectDlg.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure TIDEInspectDlg.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
if (Key = VK_ESCAPE) and not Docked then
|
if (Key = VK_ESCAPE) and not Docked then
|
||||||
@ -797,6 +821,7 @@ begin
|
|||||||
btnBackward.Caption := '';
|
btnBackward.Caption := '';
|
||||||
btnForward.ImageIndex := IDEImages.LoadImage('arrow_right');
|
btnForward.ImageIndex := IDEImages.LoadImage('arrow_right');
|
||||||
btnForward.Caption := '';
|
btnForward.Caption := '';
|
||||||
|
BtnAddWatch.Caption:=lisInspectAddWatch;
|
||||||
|
|
||||||
btnUseInstance.Enabled := False;
|
btnUseInstance.Enabled := False;
|
||||||
btnColClass.Enabled := False;
|
btnColClass.Enabled := False;
|
||||||
|
@ -559,6 +559,7 @@ resourcestring
|
|||||||
lisInspectClassInherit = '%s: class %s inherits from %s';
|
lisInspectClassInherit = '%s: class %s inherits from %s';
|
||||||
lisInspectUnavailableError = '%s: unavailable (error: %s)';
|
lisInspectUnavailableError = '%s: unavailable (error: %s)';
|
||||||
lisInspectPointerTo = 'Pointer to %s';
|
lisInspectPointerTo = 'Pointer to %s';
|
||||||
|
lisInspectAddWatch = 'Add watch';
|
||||||
lisColClass = 'Class';
|
lisColClass = 'Class';
|
||||||
lisColVisibility = 'Visibility';
|
lisColVisibility = 'Visibility';
|
||||||
lisColReturns = 'Returns';
|
lisColReturns = 'Returns';
|
||||||
|
Loading…
Reference in New Issue
Block a user