DBG: added toolbars to some of the dbg dialogs
git-svn-id: trunk@28486 -
9
.gitattributes
vendored
@ -4150,19 +4150,28 @@ images/debugger/callstack_more.png -text
|
||||
images/debugger/callstack_show.png -text
|
||||
images/debugger/callstack_top.png -text
|
||||
images/debugger/debugger.png -text svneol=unset#image/png
|
||||
images/debugger/debugger__gen_setting.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_breakpoints.png -text svneol=unset#image/png
|
||||
images/debugger/debugger_call_stack.png -text svneol=unset#image/png
|
||||
images/debugger/debugger_current_line.png -text
|
||||
images/debugger/debugger_current_line_breakpoint.png -text
|
||||
images/debugger/debugger_current_line_disabled_breakpoint.png -text svneol=unset#image/png
|
||||
images/debugger/debugger_disable.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_disable_all.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_enable.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_enable_all.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_evaluate.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_inspect.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_modify.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_nosource_line.png -text
|
||||
images/debugger/debugger_options.png -text svneol=unset#image/png
|
||||
images/debugger/debugger_output.png -text svneol=unset#image/png
|
||||
images/debugger/debugger_power.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_power_grey.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_show_execution_point.png -text svneol=unset#image/png
|
||||
images/debugger/debugger_source_line.png -text
|
||||
images/debugger/debugger_trashcan.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_trashcan_all.png -text svneol=unset#images/png
|
||||
images/debugger/debugger_watches.png -text svneol=unset#image/png
|
||||
images/designer/Order_back_one.png -text
|
||||
images/designer/Order_forward_one.png -text
|
||||
|
||||
@ -12,8 +12,10 @@ inherited BreakpointsDlg: TBreakpointsDlg
|
||||
ClientWidth = 560
|
||||
OnCreate = BreakpointsDlgCREATE
|
||||
Visible = True
|
||||
object lvBreakPoints: TListView
|
||||
Height = 205
|
||||
object lvBreakPoints: TListView[0]
|
||||
Left = 0
|
||||
Height = 179
|
||||
Top = 26
|
||||
Width = 560
|
||||
HelpType = htKeyword
|
||||
Align = alClient
|
||||
@ -52,14 +54,74 @@ inherited BreakpointsDlg: TBreakpointsDlg
|
||||
SortType = stText
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
OnClick = lvBreakPointsClick
|
||||
OnColumnClick = lvBreakPointsColumnClick
|
||||
OnDblClick = lvBreakPointsDBLCLICK
|
||||
OnKeyDown = lvBreakPointsKeyDown
|
||||
OnSelectItem = lvBreakPointsSelectItem
|
||||
end
|
||||
object mnuPopup: TPopupMenu
|
||||
OnPopup = mnuPopupPopup
|
||||
object ToolBar1: TToolBar[1]
|
||||
Left = 0
|
||||
Height = 26
|
||||
Top = 0
|
||||
Width = 560
|
||||
Caption = 'ToolBar1'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
object ToolButtonEnable: TToolButton
|
||||
Left = 1
|
||||
Top = 2
|
||||
Action = actEnableSelected
|
||||
end
|
||||
object ToolButtonDisable: TToolButton
|
||||
Left = 24
|
||||
Top = 2
|
||||
Action = actDisableSelected
|
||||
end
|
||||
object ToolButtonTrash: TToolButton
|
||||
Left = 47
|
||||
Top = 2
|
||||
Action = actDeleteSelected
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 70
|
||||
Top = 2
|
||||
Width = 8
|
||||
Caption = 'ToolButton6'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButtonEnableAll: TToolButton
|
||||
Left = 78
|
||||
Top = 2
|
||||
Action = actEnableAll
|
||||
end
|
||||
object ToolButtonDisableAll: TToolButton
|
||||
Left = 101
|
||||
Top = 2
|
||||
Action = actDisableAll
|
||||
end
|
||||
object ToolButtonTrashAll: TToolButton
|
||||
Left = 124
|
||||
Top = 2
|
||||
Action = actDeleteAll
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 147
|
||||
Top = 2
|
||||
Width = 8
|
||||
Caption = 'ToolButton10'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButtonProperties: TToolButton
|
||||
Left = 155
|
||||
Top = 2
|
||||
Action = actProperties
|
||||
end
|
||||
end
|
||||
object mnuPopup: TPopupMenu[2]
|
||||
left = 24
|
||||
top = 8
|
||||
top = 40
|
||||
object popShow: TMenuItem
|
||||
Caption = 'Show'
|
||||
Default = True
|
||||
@ -81,49 +143,86 @@ inherited BreakpointsDlg: TBreakpointsDlg
|
||||
Caption = '-'
|
||||
end
|
||||
object popProperties: TMenuItem
|
||||
Caption = '&Properties'
|
||||
OnClick = popPropertiesClick
|
||||
Action = actProperties
|
||||
end
|
||||
object popEnabled: TMenuItem
|
||||
Caption = '&Enabled'
|
||||
ShortCut = 16462
|
||||
Action = actToggleCurrentEnable
|
||||
ShowAlwaysCheckable = True
|
||||
OnClick = popEnabledClick
|
||||
end
|
||||
object popDelete: TMenuItem
|
||||
Caption = '&Delete'
|
||||
ShortCut = 46
|
||||
OnClick = popDeleteClick
|
||||
Action = actDeleteSelected
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object popDisableAll: TMenuItem
|
||||
Caption = 'D&isable All'
|
||||
OnClick = popDisableAllClick
|
||||
Action = actDisableAll
|
||||
end
|
||||
object popEnableAll: TMenuItem
|
||||
Caption = '&Enable All'
|
||||
OnClick = popEnableAllClick
|
||||
Action = actEnableAll
|
||||
end
|
||||
object popDeleteAll: TMenuItem
|
||||
Caption = '&Delete All'
|
||||
OnClick = popDeleteAllClick
|
||||
Action = actDeleteAll
|
||||
end
|
||||
object N3: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object popDisableAllSameSource: TMenuItem
|
||||
Caption = 'Disable All in same source'
|
||||
OnClick = popDisableAllSameSourceCLICK
|
||||
Action = actDisableAllInSrc
|
||||
end
|
||||
object popEnableAllSameSource: TMenuItem
|
||||
Caption = 'Enable All in same source'
|
||||
OnClick = popEnableAllSameSourceCLICK
|
||||
Action = actEnableAllInSrc
|
||||
end
|
||||
object popDeleteAllSameSource: TMenuItem
|
||||
Caption = 'Delete All in same source'
|
||||
OnClick = popDeleteAllSameSourceCLICK
|
||||
Action = actDeleteAllInSrc
|
||||
end
|
||||
end
|
||||
object ActionList1: TActionList[3]
|
||||
left = 108
|
||||
top = 49
|
||||
object actToggleCurrentEnable: TAction
|
||||
Caption = 'actToggleCurrentEnable'
|
||||
OnExecute = popEnabledClick
|
||||
end
|
||||
object actEnableSelected: TAction
|
||||
Caption = 'actEnableSelected'
|
||||
OnExecute = actEnableSelectedExecute
|
||||
end
|
||||
object actDisableSelected: TAction
|
||||
Caption = 'actDisableSelected'
|
||||
OnExecute = actDisableSelectedExecute
|
||||
end
|
||||
object actDeleteSelected: TAction
|
||||
Caption = 'actDeleteSelected'
|
||||
OnExecute = popDeleteClick
|
||||
end
|
||||
object actEnableAll: TAction
|
||||
Caption = 'actEnableAll'
|
||||
OnExecute = popEnableAllClick
|
||||
end
|
||||
object actDisableAll: TAction
|
||||
Caption = 'actDisableAll'
|
||||
OnExecute = popDisableAllClick
|
||||
end
|
||||
object actDeleteAll: TAction
|
||||
Caption = 'actDeleteAll'
|
||||
OnExecute = popDeleteAllClick
|
||||
end
|
||||
object actEnableAllInSrc: TAction
|
||||
Caption = 'actEnableAllInSrc'
|
||||
OnExecute = popEnableAllSameSourceCLICK
|
||||
end
|
||||
object actDisableAllInSrc: TAction
|
||||
Caption = 'actDisableAllInSrc'
|
||||
OnExecute = popDisableAllSameSourceCLICK
|
||||
end
|
||||
object actDeleteAllInSrc: TAction
|
||||
Caption = 'actDeleteAllInSrc'
|
||||
OnExecute = popDeleteAllSameSourceCLICK
|
||||
end
|
||||
object actProperties: TAction
|
||||
Caption = 'actProperties'
|
||||
OnExecute = popPropertiesClick
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -39,7 +39,8 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
Buttons, Menus, ComCtrls, IDEProcs, Debugger, DebuggerDlg, lclType, MainBase;
|
||||
Buttons, Menus, ComCtrls, IDEProcs, Debugger, DebuggerDlg, lclType, ActnList, MainBase,
|
||||
IDEImagesIntf;
|
||||
|
||||
type
|
||||
TBreakPointsDlgState = (
|
||||
@ -50,6 +51,18 @@ type
|
||||
{ TBreakPointsDlg }
|
||||
|
||||
TBreakPointsDlg = class(TDebuggerDlg)
|
||||
actProperties: TAction;
|
||||
actToggleCurrentEnable: TAction;
|
||||
actDeleteAllInSrc: TAction;
|
||||
actEnableSelected: TAction;
|
||||
actDisableSelected: TAction;
|
||||
actDeleteSelected: TAction;
|
||||
actEnableAll: TAction;
|
||||
actDisableAll: TAction;
|
||||
actDeleteAll: TAction;
|
||||
actEnableAllInSrc: TAction;
|
||||
actDisableAllInSrc: TAction;
|
||||
ActionList1: TActionList;
|
||||
lvBreakPoints: TListView;
|
||||
N0: TMenuItem;
|
||||
popShow: TMenuItem;
|
||||
@ -68,12 +81,25 @@ type
|
||||
popDisableAllSameSource: TMenuItem;
|
||||
popEnableAllSameSource: TMenuItem;
|
||||
popDeleteAllSameSource: TMenuItem;
|
||||
ToolBar1: TToolBar;
|
||||
ToolButtonProperties: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButtonEnable: TToolButton;
|
||||
ToolButtonDisable: TToolButton;
|
||||
ToolButtonTrash: TToolButton;
|
||||
ToolButton6: TToolButton;
|
||||
ToolButtonEnableAll: TToolButton;
|
||||
ToolButtonDisableAll: TToolButton;
|
||||
ToolButtonTrashAll: TToolButton;
|
||||
procedure actDisableSelectedExecute(Sender: TObject);
|
||||
procedure actEnableSelectedExecute(Sender: TObject);
|
||||
procedure BreakpointsDlgCREATE(Sender: TObject);
|
||||
procedure lvBreakPointsClick(Sender: TObject);
|
||||
procedure lvBreakPointsColumnClick(Sender: TObject; Column: TListColumn);
|
||||
procedure lvBreakPointsDBLCLICK(Sender: TObject);
|
||||
procedure lvBreakPointsKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure mnuPopupPopup(Sender: TObject);
|
||||
procedure lvBreakPointsSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
|
||||
procedure popAddSourceBPClick(Sender: TObject);
|
||||
procedure popDeleteAllSameSourceCLICK(Sender: TObject);
|
||||
procedure popDisableAllSameSourceCLICK(Sender: TObject);
|
||||
@ -90,6 +116,7 @@ type
|
||||
FBreakPoints: TIDEBreakPoints;
|
||||
FBreakpointsNotification: TIDEBreakPointsNotification;
|
||||
FStates: TBreakPointsDlgStates;
|
||||
FLockActionUpdate: Integer;
|
||||
procedure BreakPointAdd(const ASender: TIDEBreakPoints;
|
||||
const ABreakpoint: TIDEBreakPoint);
|
||||
procedure BreakPointUpdate(const ASender: TIDEBreakPoints;
|
||||
@ -247,7 +274,46 @@ begin
|
||||
FBreakpointsNotification.OnAdd := @BreakPointAdd;
|
||||
FBreakpointsNotification.OnUpdate := @BreakPointUpdate;
|
||||
FBreakpointsNotification.OnRemove := @BreakPointRemove;
|
||||
end;
|
||||
|
||||
ActionList1.Images := IDEImages.Images_16;
|
||||
ToolBar1.Images := IDEImages.Images_16;
|
||||
mnuPopup.Images := IDEImages.Images_16;
|
||||
|
||||
actEnableSelected.Caption := lisDbgItemEnable;
|
||||
actEnableSelected.Hint := lisDbgItemEnableHint;
|
||||
actEnableSelected.ImageIndex := IDEImages.LoadImage(16, 'debugger_enable');
|
||||
|
||||
actDisableSelected.Caption := lisDbgItemDisable;
|
||||
actDisableSelected.Hint := lisDbgItemDisableHint;
|
||||
actDisableSelected.ImageIndex := IDEImages.LoadImage(16, 'debugger_disable');
|
||||
|
||||
actDeleteSelected.Caption := liswlDelete; //lisDbgItemDelete;
|
||||
actDeleteSelected.Hint := lisDbgItemDeleteHint;
|
||||
actDeleteSelected.ImageIndex := IDEImages.LoadImage(16, 'debugger_trashcan');
|
||||
|
||||
actEnableAll.Caption := lisEnableAll; //lisDbgAllItemEnable;
|
||||
actEnableAll.Hint := lisDbgAllItemEnableHint;
|
||||
actEnableAll.ImageIndex := IDEImages.LoadImage(16, 'debugger_enable_all');
|
||||
|
||||
actDisableAll.Caption := liswlDIsableAll; //lisDbgAllItemDisable;
|
||||
actDisableAll.Hint := lisDbgAllItemDisableHint;
|
||||
actDisableAll.ImageIndex := IDEImages.LoadImage(16, 'debugger_disable_all');
|
||||
|
||||
actDeleteAll.Caption := lisDeleteAll; //lisDbgAllItemDelete;
|
||||
actDeleteAll.Hint := lisDbgAllItemDeleteHint;
|
||||
actDeleteAll.ImageIndex := IDEImages.LoadImage(16, 'debugger_trashcan_all');
|
||||
|
||||
actProperties.Caption:= liswlProperties;
|
||||
actProperties.ImageIndex := IDEImages.LoadImage(16, 'debugger__gen_setting');
|
||||
|
||||
actToggleCurrentEnable.Caption:= liswlEnabled;
|
||||
|
||||
actEnableAllInSrc.Caption:= lisEnableAllInSameSource;
|
||||
actDisableAllInSrc.Caption:= lisDisableAllInSameSource;
|
||||
actDeleteAllInSrc.Caption:= lisDeleteAllInSameSource;
|
||||
|
||||
FLockActionUpdate := 0;
|
||||
end;
|
||||
|
||||
destructor TBreakPointsDlg.Destroy;
|
||||
begin
|
||||
@ -279,19 +345,42 @@ begin
|
||||
popShow.Caption:= lisShow;
|
||||
popAdd.Caption:= dlgEdAdd;
|
||||
popAddSourceBP.Caption:= lisSourceBreakpoint;
|
||||
popProperties.Caption:= liswlProperties;
|
||||
popEnabled.Caption:= liswlEnabled;
|
||||
popDelete.Caption:= liswlDelete;
|
||||
popDisableAll.Caption:= liswlDIsableAll;
|
||||
popEnableAll.Caption:= lisEnableAll;
|
||||
popDeleteAll.Caption:= lisDeleteAll;
|
||||
popDisableAllSameSource.Caption:= lisDisableAllInSameSource;
|
||||
popEnableAllSameSource.Caption:= lisEnableAllInSameSource;
|
||||
popDeleteAllSameSource.Caption:= lisDeleteAllInSameSource;
|
||||
end;
|
||||
|
||||
procedure TBreakPointsDlg.actEnableSelectedExecute(Sender: TObject);
|
||||
var
|
||||
n: Integer;
|
||||
Item: TListItem;
|
||||
begin
|
||||
for n := 0 to lvBreakPoints.Items.Count -1 do
|
||||
begin
|
||||
Item := lvBreakPoints.Items[n];
|
||||
if Item.Selected then
|
||||
TIDEBreakPoint(Item.Data).Enabled := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TBreakPointsDlg.actDisableSelectedExecute(Sender: TObject);
|
||||
var
|
||||
n: Integer;
|
||||
Item: TListItem;
|
||||
begin
|
||||
for n := 0 to lvBreakPoints.Items.Count -1 do
|
||||
begin
|
||||
Item := lvBreakPoints.Items[n];
|
||||
if Item.Selected then
|
||||
TIDEBreakPoint(Item.Data).Enabled := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TBreakPointsDlg.lvBreakPointsClick(Sender: TObject);
|
||||
begin
|
||||
lvBreakPointsSelectItem(nil, nil, False);
|
||||
end;
|
||||
|
||||
procedure TBreakPointsDlg.lvBreakPointsDBLCLICK(Sender: TObject);
|
||||
begin
|
||||
lvBreakPointsSelectItem(nil, nil, False);
|
||||
JumpToCurrentBreakPoint;
|
||||
end;
|
||||
|
||||
@ -335,43 +424,65 @@ begin
|
||||
Key := 0
|
||||
else
|
||||
inherited;;
|
||||
lvBreakPointsSelectItem(nil, nil, False);
|
||||
end;
|
||||
|
||||
|
||||
procedure TBreakPointsDlg.mnuPopupPopup(Sender: TObject);
|
||||
procedure TBreakPointsDlg.lvBreakPointsSelectItem(Sender: TObject; Item: TListItem;
|
||||
Selected: Boolean);
|
||||
var
|
||||
Enable: Boolean;
|
||||
ItemSelected: Boolean;
|
||||
SelCanEnable, SelCanDisable: Boolean;
|
||||
AllCanEnable, AllCanDisable: Boolean;
|
||||
CurBreakPoint: TIDEBreakPoint;
|
||||
i: Integer;
|
||||
begin
|
||||
Enable := lvBreakPoints.Selected <> nil;
|
||||
if Enable then
|
||||
if FLockActionUpdate > 0 then exit;
|
||||
|
||||
ItemSelected := lvBreakPoints.Selected <> nil;
|
||||
if ItemSelected then
|
||||
CurBreakPoint:=TIDEBreakPoint(lvBreakPoints.Selected.Data)
|
||||
else
|
||||
CurBreakPoint:=nil;
|
||||
popProperties.Enabled := Enable;
|
||||
popEnabled.Enabled := Enable;
|
||||
if CurBreakPoint<>nil then
|
||||
popEnabled.Checked := CurBreakPoint.Enabled
|
||||
else
|
||||
popEnabled.Checked := false;
|
||||
popDelete.Enabled := Enable;
|
||||
|
||||
// 'All in same source' menuitems
|
||||
popDisableAllSameSource.Enabled := Enable;
|
||||
popDeleteAllSameSource.Enabled := Enable;
|
||||
popEnableAllSameSource.Enabled := Enable;
|
||||
SelCanEnable := False;
|
||||
SelCanDisable := False;
|
||||
AllCanEnable := False;
|
||||
allCanDisable := False;
|
||||
for i := 0 to lvBreakPoints.Items.Count - 1 do begin
|
||||
if lvBreakPoints.Items[i].Data = nil then
|
||||
continue;
|
||||
if lvBreakPoints.Items[i].Selected then begin
|
||||
SelCanEnable := SelCanEnable or not TIDEBreakPoint(lvBreakPoints.Items[i].Data).Enabled;
|
||||
SelCanDisable := SelCanDisable or TIDEBreakPoint(lvBreakPoints.Items[i].Data).Enabled;
|
||||
end;
|
||||
AllCanEnable := AllCanEnable or not TIDEBreakPoint(lvBreakPoints.Items[i].Data).Enabled;
|
||||
AllCanDisable := AllCanDisable or TIDEBreakPoint(lvBreakPoints.Items[i].Data).Enabled;
|
||||
end;
|
||||
|
||||
// 'All' menuitems
|
||||
Enable := lvBreakPoints.Items.Count>0;
|
||||
popDisableAll.Enabled := Enable;
|
||||
popDeleteAll.Enabled := Enable;
|
||||
popEnableAll.Enabled := Enable;
|
||||
actToggleCurrentEnable.Enabled := ItemSelected;
|
||||
actToggleCurrentEnable.Checked := (CurBreakPoint <> nil) and CurBreakPoint.Enabled;
|
||||
|
||||
actEnableSelected.Enabled := SelCanEnable;
|
||||
actDisableSelected.Enabled := SelCanDisable;
|
||||
actDeleteSelected.Enabled := ItemSelected;
|
||||
|
||||
actEnableAll.Enabled := AllCanEnable;
|
||||
actDisableAll.Enabled := AllCanDisable;
|
||||
actDeleteAll.Enabled := lvBreakPoints.Items.Count > 0;
|
||||
|
||||
actEnableAllInSrc.Enabled := ItemSelected;
|
||||
actDisableAllInSrc.Enabled := ItemSelected;
|
||||
actDeleteAllInSrc.Enabled := ItemSelected;
|
||||
|
||||
actProperties.Enabled := ItemSelected;
|
||||
popShow.Enabled := ItemSelected;
|
||||
end;
|
||||
|
||||
procedure TBreakPointsDlg.popAddSourceBPClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure TBreakPointsDlg.popDeleteAllSameSourceCLICK(Sender: TObject);
|
||||
var
|
||||
n: Integer;
|
||||
@ -564,6 +675,8 @@ begin
|
||||
if ABreakpoint.Group = nil
|
||||
then AnItem.SubItems[5] := ''
|
||||
else AnItem.SubItems[5] := ABreakpoint.Group.Name;
|
||||
|
||||
lvBreakPointsSelectItem(nil, nil, False);
|
||||
end;
|
||||
|
||||
procedure TBreakPointsDlg.UpdateAll;
|
||||
@ -576,10 +689,13 @@ begin
|
||||
exit;
|
||||
end;
|
||||
Exclude(FStates,bpdsItemsNeedUpdate);
|
||||
inc(FLockActionUpdate);
|
||||
for i:=0 to lvBreakPoints.Items.Count-1 do begin
|
||||
CurItem:=lvBreakPoints.Items[i];
|
||||
UpdateItem(CurItem,TIDEBreakPoint(CurItem.Data));
|
||||
end;
|
||||
dec(FLockActionUpdate);
|
||||
lvBreakPointsSelectItem(nil, nil, False);
|
||||
end;
|
||||
|
||||
procedure TBreakPointsDlg.DeleteSelectedBreakpoints;
|
||||
|
||||
@ -10,8 +10,8 @@ inherited CallStackDlg: TCallStackDlg
|
||||
Visible = True
|
||||
object lvCallStack: TListView[0]
|
||||
Left = 0
|
||||
Height = 206
|
||||
Top = 40
|
||||
Height = 166
|
||||
Top = 80
|
||||
Width = 562
|
||||
Align = alClient
|
||||
Columns = <
|
||||
@ -46,7 +46,7 @@ inherited CallStackDlg: TCallStackDlg
|
||||
end
|
||||
object ToolBar1: TToolBar[1]
|
||||
Left = 0
|
||||
Height = 40
|
||||
Height = 80
|
||||
Top = 0
|
||||
Width = 562
|
||||
AutoSize = True
|
||||
@ -54,34 +54,36 @@ inherited CallStackDlg: TCallStackDlg
|
||||
ButtonWidth = 50
|
||||
Caption = 'tbButtons'
|
||||
EdgeBorders = []
|
||||
ParentShowHint = False
|
||||
ShowCaptions = True
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
object ToolButtonShow: TToolButton
|
||||
Left = 1
|
||||
Left = 110
|
||||
Top = 0
|
||||
Action = actShow
|
||||
ImageIndex = 0
|
||||
end
|
||||
object ToolButtonCurrent: TToolButton
|
||||
Left = 51
|
||||
Left = 160
|
||||
Top = 0
|
||||
Action = actSetCurrent
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 101
|
||||
Left = 210
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'ToolButton4'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButtonMore: TToolButton
|
||||
Left = 171
|
||||
Left = 280
|
||||
Top = 0
|
||||
Action = actViewMore
|
||||
ImageIndex = 1
|
||||
end
|
||||
object ToolButtonMax: TToolButton
|
||||
Left = 109
|
||||
Left = 218
|
||||
Top = 0
|
||||
Action = actViewLimit
|
||||
Caption = 'Max 10'
|
||||
@ -89,45 +91,45 @@ inherited CallStackDlg: TCallStackDlg
|
||||
Style = tbsDropDown
|
||||
end
|
||||
object ToolButtonGoto: TToolButton
|
||||
Left = 379
|
||||
Left = 488
|
||||
Top = 0
|
||||
Action = actViewGoto
|
||||
ImageIndex = 4
|
||||
end
|
||||
object ToolButtonCopyAll: TToolButton
|
||||
Left = 437
|
||||
Top = 0
|
||||
Left = 1
|
||||
Top = 40
|
||||
Action = actCopyAll
|
||||
ImageIndex = 5
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 429
|
||||
Left = 102
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'ToolButton8'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 221
|
||||
Left = 330
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'ToolButton9'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButtonTop: TToolButton
|
||||
Left = 229
|
||||
Left = 338
|
||||
Top = 0
|
||||
Action = actViewTop
|
||||
ImageIndex = 2
|
||||
end
|
||||
object ToolButtonBottom: TToolButton
|
||||
Left = 279
|
||||
Left = 388
|
||||
Top = 0
|
||||
Action = actViewBottom
|
||||
ImageIndex = 3
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 329
|
||||
Left = 438
|
||||
Height = 40
|
||||
Top = 0
|
||||
Width = 50
|
||||
@ -145,6 +147,23 @@ inherited CallStackDlg: TCallStackDlg
|
||||
Text = '0'
|
||||
end
|
||||
end
|
||||
object ToolButtonPower: TToolButton
|
||||
Left = 1
|
||||
Top = 0
|
||||
AllowAllUp = True
|
||||
AutoSize = True
|
||||
Caption = 'ToolButtonPower'
|
||||
Down = True
|
||||
OnClick = ToolButtonPowerClick
|
||||
Style = tbsCheck
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 538
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'ToolButton2'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
end
|
||||
object mnuPopup: TPopupMenu[2]
|
||||
left = 224
|
||||
|
||||
@ -56,6 +56,8 @@ type
|
||||
actSetCurrent: TAction;
|
||||
actShow: TAction;
|
||||
popToggle: TMenuItem;
|
||||
ToolButtonPower: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButtonTop: TToolButton;
|
||||
ToolButtonBottom: TToolButton;
|
||||
ToolButtonCopyAll: TToolButton;
|
||||
@ -90,6 +92,7 @@ type
|
||||
procedure lvCallStackClick(Sender: TObject);
|
||||
procedure lvCallStackKeyPress(Sender: TObject; var Key: char);
|
||||
procedure popCountClick(Sender: TObject);
|
||||
procedure ToolButtonPowerClick(Sender: TObject);
|
||||
procedure txtGotoKeyPress(Sender: TObject; var Key: char);
|
||||
procedure lvCallStackDBLCLICK(Sender: TObject);
|
||||
procedure actCopyAllClick(Sender: TObject);
|
||||
@ -103,6 +106,7 @@ type
|
||||
FViewCount: Integer;
|
||||
FViewLimit: Integer;
|
||||
FViewStart: Integer;
|
||||
FPowerImgIdx, FPowerImgIdxGrey: Integer;
|
||||
function GetImageIndex(Entry: TCallStackEntry): Integer;
|
||||
procedure SetBreakPoints(const AValue: TIDEBreakPoints);
|
||||
procedure SetViewLimit(const AValue: Integer);
|
||||
@ -171,6 +175,7 @@ end;
|
||||
|
||||
procedure TCallStackDlg.CallStackChanged(Sender: TObject);
|
||||
begin
|
||||
if not ToolButtonPower.Down then exit;
|
||||
if FViewStart = 0
|
||||
then UpdateView
|
||||
else SetViewStart(0);
|
||||
@ -179,6 +184,7 @@ end;
|
||||
|
||||
procedure TCallStackDlg.CallStackCurrent(Sender: TObject);
|
||||
begin
|
||||
if not ToolButtonPower.Down then exit;
|
||||
UpdateView;
|
||||
end;
|
||||
|
||||
@ -224,6 +230,7 @@ var
|
||||
First, Count: Integer;
|
||||
Source: String;
|
||||
begin
|
||||
if not ToolButtonPower.Down then exit;
|
||||
BeginUpdate;
|
||||
try
|
||||
if (CallStack = nil) or (CallStack.Count=0)
|
||||
@ -403,6 +410,16 @@ begin
|
||||
actViewLimit.Caption := TMenuItem(Sender).Caption;
|
||||
end;
|
||||
|
||||
procedure TCallStackDlg.ToolButtonPowerClick(Sender: TObject);
|
||||
begin
|
||||
if ToolButtonPower.Down
|
||||
then begin
|
||||
ToolButtonPower.ImageIndex := FPowerImgIdx;
|
||||
UpdateView;
|
||||
end
|
||||
else ToolButtonPower.ImageIndex := FPowerImgIdxGrey;
|
||||
end;
|
||||
|
||||
procedure TCallStackDlg.txtGotoKeyPress(Sender: TObject; var Key: char);
|
||||
begin
|
||||
case Key of
|
||||
@ -452,11 +469,15 @@ end;
|
||||
|
||||
procedure TCallStackDlg.actViewMoreExecute(Sender: TObject);
|
||||
begin
|
||||
ToolButtonPower.Down := False;
|
||||
ToolButtonPowerClick(nil);
|
||||
ViewLimit := ViewLimit + FViewCount;
|
||||
end;
|
||||
|
||||
procedure TCallStackDlg.actViewTopExecute(Sender: TObject);
|
||||
begin
|
||||
ToolButtonPower.Down := False;
|
||||
ToolButtonPowerClick(nil);
|
||||
SetViewStart(0);
|
||||
end;
|
||||
|
||||
@ -487,6 +508,8 @@ var
|
||||
i: integer;
|
||||
begin
|
||||
Caption:= lisMenuViewCallStack;
|
||||
ToolButtonPower.Caption := lisDbgWinPower;
|
||||
ToolButtonPower.Hint := lisDbgWinPowerHint;
|
||||
ToolButtonShow.Caption:= lisShow;
|
||||
ToolButtonCurrent.Caption:= lisCurrent;
|
||||
for i:= 0 to mnuLimit.Items.Count-1 do
|
||||
@ -508,6 +531,9 @@ begin
|
||||
ToolButtonBottom.ImageIndex := IDEImages.LoadImage(16, 'callstack_bottom');
|
||||
ToolButtonGoto.ImageIndex := IDEImages.LoadImage(16, 'callstack_goto');
|
||||
ToolButtonCopyAll.ImageIndex := IDEImages.LoadImage(16, 'laz_copy');
|
||||
FPowerImgIdx := IDEImages.LoadImage(16, 'debugger_power');
|
||||
FPowerImgIdxGrey := IDEImages.LoadImage(16, 'debugger_power_grey');
|
||||
ToolButtonPower.ImageIndex := FPowerImgIdx;
|
||||
|
||||
lvCallStack.SmallImages := IDEImages.Images_16;
|
||||
imgCurrentLine := IDEImages.LoadImage(16, 'debugger_current_line');
|
||||
@ -545,13 +571,17 @@ end;
|
||||
|
||||
procedure TCallStackDlg.actViewLimitExecute(Sender: TObject);
|
||||
begin
|
||||
ToolButtonPower.Down := False;
|
||||
ToolButtonPowerClick(nil);
|
||||
ViewLimit := FViewCount;
|
||||
end;
|
||||
|
||||
procedure TCallStackDlg.SetViewStart(AStart: Integer);
|
||||
begin
|
||||
if CallStack = nil then Exit;
|
||||
|
||||
ToolButtonPower.Down := False;
|
||||
ToolButtonPowerClick(nil);
|
||||
|
||||
if (AStart > CallStack.Count - FViewLimit)
|
||||
then AStart := CallStack.Count - FViewLimit;
|
||||
if AStart < 0 then AStart := 0;
|
||||
@ -595,6 +625,8 @@ end;
|
||||
|
||||
procedure TCallStackDlg.SetViewLimit(const AValue: Integer);
|
||||
begin
|
||||
ToolButtonPower.Down := False;
|
||||
ToolButtonPowerClick(nil);
|
||||
if FViewLimit = AValue then Exit;
|
||||
if (CallStack <> nil)
|
||||
and (FViewStart + FViewLimit >= CallStack.Count)
|
||||
|
||||
@ -11,12 +11,11 @@ inherited WatchesDlg: TWatchesDlg
|
||||
ClientWidth = 500
|
||||
OnClose = FormClose
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
object lvWatches: TListView[0]
|
||||
Left = 0
|
||||
Height = 200
|
||||
Top = 0
|
||||
Height = 174
|
||||
Top = 26
|
||||
Width = 500
|
||||
Align = alClient
|
||||
Columns = <
|
||||
@ -37,42 +36,158 @@ inherited WatchesDlg: TWatchesDlg
|
||||
OnKeyDown = lvWatchesKeyDown
|
||||
OnSelectItem = lvWatchesSelectItem
|
||||
end
|
||||
object mnuPopup: TPopupMenu[1]
|
||||
object ToolBar1: TToolBar[1]
|
||||
Left = 0
|
||||
Height = 26
|
||||
Top = 0
|
||||
Width = 500
|
||||
Caption = 'ToolBar1'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 1
|
||||
object ToolButtonPower: TToolButton
|
||||
Left = 1
|
||||
Top = 2
|
||||
Action = actPower
|
||||
AllowAllUp = True
|
||||
Style = tbsCheck
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 24
|
||||
Top = 2
|
||||
Width = 4
|
||||
Caption = 'ToolButton2'
|
||||
Style = tbsDivider
|
||||
end
|
||||
object ToolButtonEnable: TToolButton
|
||||
Left = 51
|
||||
Top = 2
|
||||
Action = actEnableSelected
|
||||
end
|
||||
object ToolButtonDisable: TToolButton
|
||||
Left = 74
|
||||
Top = 2
|
||||
Action = actDisableSelected
|
||||
end
|
||||
object ToolButtonTrash: TToolButton
|
||||
Left = 97
|
||||
Top = 2
|
||||
Action = actDeleteSelected
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 120
|
||||
Top = 2
|
||||
Width = 4
|
||||
Caption = 'ToolButton6'
|
||||
Style = tbsDivider
|
||||
end
|
||||
object ToolButtonEnableAll: TToolButton
|
||||
Left = 124
|
||||
Top = 2
|
||||
Action = actEnableAll
|
||||
end
|
||||
object ToolButtonDisableAll: TToolButton
|
||||
Left = 147
|
||||
Top = 2
|
||||
Action = actDisableAll
|
||||
end
|
||||
object ToolButtonTrashAll: TToolButton
|
||||
Left = 170
|
||||
Top = 2
|
||||
Action = actDeleteAll
|
||||
end
|
||||
object ToolButton10: TToolButton
|
||||
Left = 193
|
||||
Top = 2
|
||||
Width = 4
|
||||
Caption = 'ToolButton10'
|
||||
Style = tbsDivider
|
||||
end
|
||||
object ToolButtonAdd: TToolButton
|
||||
Left = 28
|
||||
Top = 2
|
||||
Action = actAddWatch
|
||||
end
|
||||
object ToolButtonProperties: TToolButton
|
||||
Left = 197
|
||||
Top = 2
|
||||
Action = actProperties
|
||||
end
|
||||
end
|
||||
object mnuPopup: TPopupMenu[2]
|
||||
left = 100
|
||||
top = 96
|
||||
object popAdd: TMenuItem
|
||||
Caption = '&Add'
|
||||
OnClick = popAddClick
|
||||
Action = actAddWatch
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object popProperties: TMenuItem
|
||||
Caption = '&Properties'
|
||||
OnClick = popPropertiesClick
|
||||
Action = actProperties
|
||||
end
|
||||
object popEnabled: TMenuItem
|
||||
Caption = '&Enabled'
|
||||
OnClick = popEnabledClick
|
||||
Action = actToggleCurrentEnable
|
||||
end
|
||||
object popDelete: TMenuItem
|
||||
Caption = '&Delete'
|
||||
OnClick = popDeleteClick
|
||||
Action = actDeleteSelected
|
||||
end
|
||||
object N2: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object popDisableAll: TMenuItem
|
||||
Caption = 'D&isable All'
|
||||
OnClick = popDisableAllClick
|
||||
Action = actDisableAll
|
||||
end
|
||||
object popEnableAll: TMenuItem
|
||||
Caption = 'E&nable All'
|
||||
OnClick = popEnableAllClick
|
||||
Action = actEnableAll
|
||||
end
|
||||
object popDeleteAll: TMenuItem
|
||||
Caption = 'De&lete All'
|
||||
OnClick = popDeleteAllClick
|
||||
Action = actDeleteAll
|
||||
end
|
||||
end
|
||||
object ActionList1: TActionList[3]
|
||||
left = 184
|
||||
top = 88
|
||||
object actPower: TAction
|
||||
Caption = 'actPower'
|
||||
Checked = True
|
||||
OnExecute = actPowerExecute
|
||||
end
|
||||
object actToggleCurrentEnable: TAction
|
||||
Caption = 'actToggleCurrentEnable'
|
||||
OnExecute = popEnabledClick
|
||||
end
|
||||
object actAddWatch: TAction
|
||||
Caption = 'actAddWatch'
|
||||
OnExecute = popAddClick
|
||||
end
|
||||
object actEnableSelected: TAction
|
||||
Caption = 'actEnableSelected'
|
||||
OnExecute = actEnableSelectedExecute
|
||||
end
|
||||
object actDisableSelected: TAction
|
||||
Caption = 'actDisableSelected'
|
||||
OnExecute = actDisableSelectedExecute
|
||||
end
|
||||
object actDeleteSelected: TAction
|
||||
Caption = 'actDeleteSelected'
|
||||
OnExecute = popDeleteClick
|
||||
end
|
||||
object actEnableAll: TAction
|
||||
Caption = 'actEnableAll'
|
||||
OnExecute = popEnableAllClick
|
||||
end
|
||||
object actDisableAll: TAction
|
||||
Caption = 'actDisableAll'
|
||||
OnExecute = popDisableAllClick
|
||||
end
|
||||
object actDeleteAll: TAction
|
||||
Caption = 'actDeleteAll'
|
||||
OnExecute = popDeleteAllClick
|
||||
end
|
||||
object actProperties: TAction
|
||||
Caption = 'actProperties'
|
||||
OnExecute = popPropertiesClick
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -39,7 +39,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, Buttons, Menus, ComCtrls, LCLType,
|
||||
StdCtrls, Buttons, Menus, ComCtrls, LCLType, ActnList, IDEImagesIntf,
|
||||
LazarusIDEStrConsts, Debugger, DebuggerDlg, BaseDebugManager;
|
||||
|
||||
type
|
||||
@ -47,6 +47,17 @@ type
|
||||
{ TWatchesDlg }
|
||||
|
||||
TWatchesDlg = class(TDebuggerDlg)
|
||||
actDeleteAll: TAction;
|
||||
actDeleteSelected: TAction;
|
||||
actDisableAll: TAction;
|
||||
actDisableSelected: TAction;
|
||||
actEnableAll: TAction;
|
||||
actEnableSelected: TAction;
|
||||
actAddWatch: TAction;
|
||||
actToggleCurrentEnable: TAction;
|
||||
actPower: TAction;
|
||||
ActionList1: TActionList;
|
||||
actProperties: TAction;
|
||||
lvWatches: TListView;
|
||||
mnuPopup: TPopupMenu;
|
||||
popAdd: TMenuItem;
|
||||
@ -58,9 +69,24 @@ type
|
||||
popDisableAll: TMenuItem;
|
||||
popEnableAll: TMenuItem;
|
||||
popDeleteAll: TMenuItem;
|
||||
ToolBar1: TToolBar;
|
||||
ToolButtonProperties: TToolButton;
|
||||
ToolButtonAdd: TToolButton;
|
||||
ToolButtonPower: TToolButton;
|
||||
ToolButton10: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButtonEnable: TToolButton;
|
||||
ToolButtonDisable: TToolButton;
|
||||
ToolButtonTrash: TToolButton;
|
||||
ToolButton6: TToolButton;
|
||||
ToolButtonEnableAll: TToolButton;
|
||||
ToolButtonDisableAll: TToolButton;
|
||||
ToolButtonTrashAll: TToolButton;
|
||||
procedure actDisableSelectedExecute(Sender: TObject);
|
||||
procedure actEnableSelectedExecute(Sender: TObject);
|
||||
procedure actPowerExecute(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure lvWatchesDblClick(Sender: TObject);
|
||||
procedure lvWatchesKeyDown(Sender: TObject; var Key: Word;
|
||||
@ -76,6 +102,7 @@ type
|
||||
private
|
||||
FWatches: TIDEWatches;
|
||||
FWatchesNotification: TIDEWatchesNotification;
|
||||
FPowerImgIdx, FPowerImgIdxGrey: Integer;
|
||||
function GetSelected: TIDEWatch;
|
||||
procedure SetWatches(const AValue: TIDEWatches);
|
||||
procedure WatchAdd(const ASender: TIDEWatches; const AWatch: TIDEWatch);
|
||||
@ -83,6 +110,7 @@ type
|
||||
procedure WatchRemove(const ASender: TIDEWatches; const AWatch: TIDEWatch);
|
||||
|
||||
procedure UpdateItem(const AItem: TListItem; const AWatch: TIDEWatch);
|
||||
procedure UpdateAll;
|
||||
protected
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -106,7 +134,53 @@ begin
|
||||
FWatchesNotification.OnAdd := @WatchAdd;
|
||||
FWatchesNotification.OnUpdate := @WatchUpdate;
|
||||
FWatchesNotification.OnRemove := @WatchRemove;
|
||||
|
||||
|
||||
ActionList1.Images := IDEImages.Images_16;
|
||||
ToolBar1.Images := IDEImages.Images_16;
|
||||
mnuPopup.Images := IDEImages.Images_16;
|
||||
|
||||
FPowerImgIdx := IDEImages.LoadImage(16, 'debugger_power');
|
||||
FPowerImgIdxGrey := IDEImages.LoadImage(16, 'debugger_power_grey');
|
||||
actPower.ImageIndex := FPowerImgIdx;
|
||||
actPower.Caption := lisDbgWinPower;
|
||||
actPower.Hint := lisDbgWinPowerHint;
|
||||
|
||||
actAddWatch.Caption:=liswlAdd;
|
||||
actAddWatch.ImageIndex := IDEImages.LoadImage(16, 'laz_add');
|
||||
|
||||
actToggleCurrentEnable.Caption := liswlEnabled;
|
||||
|
||||
actEnableSelected.Caption := lisDbgItemEnable;
|
||||
actEnableSelected.Hint := lisDbgItemEnableHint;
|
||||
actEnableSelected.ImageIndex := IDEImages.LoadImage(16, 'debugger_enable');
|
||||
|
||||
actDisableSelected.Caption := lisDbgItemDisable;
|
||||
actDisableSelected.Hint := lisDbgItemDisableHint;
|
||||
actDisableSelected.ImageIndex := IDEImages.LoadImage(16, 'debugger_disable');
|
||||
|
||||
actDeleteSelected.Caption := liswlDelete; //lisDbgItemDelete;
|
||||
actDeleteSelected.Hint := lisDbgItemDeleteHint;
|
||||
actDeleteSelected.ImageIndex := IDEImages.LoadImage(16, 'debugger_trashcan');
|
||||
|
||||
actEnableAll.Caption := liswlENableAll; //lisDbgAllItemEnable;
|
||||
actEnableAll.Hint := lisDbgAllItemEnableHint;
|
||||
actEnableAll.ImageIndex := IDEImages.LoadImage(16, 'debugger_enable_all');
|
||||
|
||||
actDisableAll.Caption := liswlDIsableAll; //lisDbgAllItemDisable;
|
||||
actDisableAll.Hint := lisDbgAllItemDisableHint;
|
||||
actDisableAll.ImageIndex := IDEImages.LoadImage(16, 'debugger_disable_all');
|
||||
|
||||
actDeleteAll.Caption := liswlDeLeteAll; //lisDbgAllItemDelete;
|
||||
actDeleteAll.Hint := lisDbgAllItemDeleteHint;
|
||||
actDeleteAll.ImageIndex := IDEImages.LoadImage(16, 'debugger_trashcan_all');
|
||||
|
||||
actProperties.Caption:= liswlProperties;
|
||||
actProperties.ImageIndex := IDEImages.LoadImage(16, 'debugger__gen_setting');
|
||||
|
||||
Caption:=liswlWatchList;
|
||||
|
||||
lvWatches.Columns[0].Caption:=liswlExpression;
|
||||
lvWatches.Columns[1].Caption:=dlgValueColor;
|
||||
lvWatches.Column[0].Width := 100;
|
||||
lvWatches.Column[1].Width := 200;
|
||||
end;
|
||||
@ -164,15 +238,44 @@ end;
|
||||
|
||||
procedure TWatchesDlg.lvWatchesSelectItem(Sender: TObject; AItem: TListItem; Selected: Boolean);
|
||||
var
|
||||
Enable: Boolean;
|
||||
ItemSelected: Boolean;
|
||||
Watch: TIDEWatch;
|
||||
SelCanEnable, SelCanDisable: Boolean;
|
||||
AllCanEnable, AllCanDisable: Boolean;
|
||||
i: Integer;
|
||||
begin
|
||||
Watch := GetSelected;
|
||||
Enable := Watch <> nil;
|
||||
popProperties.Enabled := Enable;
|
||||
popEnabled.Enabled := Enable;
|
||||
popDelete.Enabled := Enable;
|
||||
popEnabled.Checked := Enable and Watch.Enabled;
|
||||
ItemSelected := lvWatches.Selected <> nil;
|
||||
if ItemSelected then
|
||||
Watch:=TIDEWatch(lvWatches.Selected.Data)
|
||||
else
|
||||
Watch:=nil;
|
||||
SelCanEnable := False;
|
||||
SelCanDisable := False;
|
||||
AllCanEnable := False;
|
||||
AllCanDisable := False;
|
||||
for i := 0 to lvWatches.Items.Count - 1 do begin
|
||||
if lvWatches.Items[i].Data = nil then
|
||||
continue;
|
||||
if lvWatches.Items[i].Selected then begin
|
||||
SelCanEnable := SelCanEnable or not TIDEWatch(lvWatches.Items[i].Data).Enabled;
|
||||
SelCanDisable := SelCanDisable or TIDEWatch(lvWatches.Items[i].Data).Enabled;
|
||||
end;
|
||||
AllCanEnable := AllCanEnable or not TIDEWatch(lvWatches.Items[i].Data).Enabled;
|
||||
AllCanDisable := AllCanDisable or TIDEWatch(lvWatches.Items[i].Data).Enabled;
|
||||
end;
|
||||
|
||||
actToggleCurrentEnable.Enabled := ItemSelected;
|
||||
actToggleCurrentEnable.Checked := ItemSelected and Watch.Enabled;
|
||||
|
||||
actEnableSelected.Enabled := SelCanEnable;
|
||||
actDisableSelected.Enabled := SelCanDisable;
|
||||
actDeleteSelected.Enabled := ItemSelected;
|
||||
|
||||
actEnableAll.Enabled := AllCanEnable;
|
||||
actDisableAll.Enabled := AllCanDisable;
|
||||
actDeleteAll.Enabled := lvWatches.Items.Count > 0;
|
||||
|
||||
actProperties.Enabled := ItemSelected;
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.lvWatchesDblClick(Sender: TObject);
|
||||
@ -183,20 +286,6 @@ begin
|
||||
popAddClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption:=liswlWatchList;
|
||||
lvWatches.Columns[0].Caption:=liswlExpression;
|
||||
lvWatches.Columns[1].Caption:=dlgValueColor;
|
||||
popAdd.Caption:=liswlAdd;
|
||||
popProperties.Caption:=liswlProperties;
|
||||
popEnabled.Caption:=liswlEnabled;
|
||||
popDelete.Caption:=liswlDelete;
|
||||
popDisableAll.Caption:=liswlDIsableAll;
|
||||
popEnableAll.Caption:=liswlENableAll;
|
||||
popDeleteAll.Caption:=liswlDeLeteAll;
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
//DebugLn('TWatchesDlg.FormDestroy ',DbgSName(Self));
|
||||
@ -212,6 +301,46 @@ begin
|
||||
//DebugLn('TWatchesDlg.FormClose ',dbgs(ord(CloseAction)));
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.actPowerExecute(Sender: TObject);
|
||||
begin
|
||||
if ToolButtonPower.Down
|
||||
then begin
|
||||
actPower.ImageIndex := FPowerImgIdx;
|
||||
ToolButtonPower.ImageIndex := FPowerImgIdx;
|
||||
UpdateAll;
|
||||
end
|
||||
else begin
|
||||
actPower.ImageIndex := FPowerImgIdxGrey;
|
||||
ToolButtonPower.ImageIndex := FPowerImgIdxGrey;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.actEnableSelectedExecute(Sender: TObject);
|
||||
var
|
||||
n: Integer;
|
||||
Item: TListItem;
|
||||
begin
|
||||
for n := 0 to lvWatches.Items.Count -1 do
|
||||
begin
|
||||
Item := lvWatches.Items[n];
|
||||
if Item.Selected then
|
||||
TIDEWatch(Item.Data).Enabled := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.actDisableSelectedExecute(Sender: TObject);
|
||||
var
|
||||
n: Integer;
|
||||
Item: TListItem;
|
||||
begin
|
||||
for n := 0 to lvWatches.Items.Count -1 do
|
||||
begin
|
||||
Item := lvWatches.Items[n];
|
||||
if Item.Selected then
|
||||
TIDEWatch(Item.Data).Enabled := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.lvWatchesKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
@ -326,9 +455,18 @@ begin
|
||||
// Expression
|
||||
// Result
|
||||
AItem.Caption := AWatch.Expression;
|
||||
if not ToolButtonPower.Down then exit;
|
||||
AItem.SubItems[0] := ClearMultiline(AWatch.Value);
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.UpdateAll;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i:=0 to FWatches.Count-1 do
|
||||
WatchUpdate(FWatches, FWatches.Items[i]);
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.WatchAdd(const ASender: TIDEWatches; const AWatch: TIDEWatch);
|
||||
var
|
||||
Item: TListItem;
|
||||
@ -347,6 +485,7 @@ begin
|
||||
if Watch <> nil then Watch.Enabled := True;
|
||||
|
||||
UpdateItem(Item, AWatch);
|
||||
lvWatchesSelectItem(nil, nil, False);
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.WatchUpdate(const ASender: TIDEWatches; const AWatch: TIDEWatch);
|
||||
@ -359,11 +498,14 @@ begin
|
||||
if Item = nil
|
||||
then WatchAdd(ASender, AWatch)
|
||||
else UpdateItem(Item, AWatch);
|
||||
|
||||
lvWatchesSelectItem(nil, nil, False);
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.WatchRemove(const ASender: TIDEWatches; const AWatch: TIDEWatch);
|
||||
begin
|
||||
lvWatches.Items.FindData(AWatch).Free;
|
||||
lvWatchesSelectItem(nil, nil, False);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -4510,6 +4510,23 @@ resourcestring
|
||||
lisMovePage = 'Move Page ...';
|
||||
lisFileSettings = 'File Settings ...';
|
||||
|
||||
// Debugger Dialogs
|
||||
lisDbgWinPower = 'On/Off';
|
||||
lisDbgWinPowerHint = 'Disable/Enable updates for the entire window';
|
||||
|
||||
lisDbgItemEnable = 'Enable';
|
||||
lisDbgItemEnableHint = 'Enable';
|
||||
lisDbgItemDisable = 'Disable';
|
||||
lisDbgItemDisableHint = 'Disable';
|
||||
lisDbgItemDelete = 'Delete';
|
||||
lisDbgItemDeleteHint = 'Delete';
|
||||
lisDbgAllItemEnable = 'Enable all';
|
||||
lisDbgAllItemEnableHint = 'Enable all';
|
||||
lisDbgAllItemDisable = 'Disable all';
|
||||
lisDbgAllItemDisableHint = 'Disable all';
|
||||
lisDbgAllItemDelete = 'Delete all';
|
||||
lisDbgAllItemDeleteHint = 'Delete all';
|
||||
|
||||
// Call Stack Dialog
|
||||
lisShow = 'Show';
|
||||
lisCurrent = 'Current';
|
||||
|
||||
BIN
images/debugger/debugger__gen_setting.png
Normal file
|
After Width: | Height: | Size: 312 B |
BIN
images/debugger/debugger_disable.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
images/debugger/debugger_disable_all.png
Normal file
|
After Width: | Height: | Size: 402 B |
BIN
images/debugger/debugger_enable.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
images/debugger/debugger_enable_all.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
images/debugger/debugger_power.png
Normal file
|
After Width: | Height: | Size: 313 B |
BIN
images/debugger/debugger_power_grey.png
Normal file
|
After Width: | Height: | Size: 327 B |
BIN
images/debugger/debugger_trashcan.png
Normal file
|
After Width: | Height: | Size: 160 B |
BIN
images/debugger/debugger_trashcan_all.png
Normal file
|
After Width: | Height: | Size: 221 B |
12459
images/laz_images.lrs
@ -175,7 +175,16 @@ debugger/callstack_top.png
|
||||
debugger/debugger_current_line.png
|
||||
debugger/debugger_current_line_breakpoint.png
|
||||
debugger/debugger_current_line_disabled_breakpoint.png
|
||||
debugger/debugger_disable.png
|
||||
debugger/debugger_disable_all.png
|
||||
debugger/debugger_enable.png
|
||||
debugger/debugger_enable_all.png
|
||||
debugger/debugger_power.png
|
||||
debugger/debugger_power_grey.png
|
||||
debugger/debugger_trashcan.png
|
||||
debugger/debugger_trashcan_all.png
|
||||
debugger/debugger.png
|
||||
debugger/debugger__gen_setting.png
|
||||
debugger/debugger_breakpoints.png
|
||||
debugger/debugger_call_stack.png
|
||||
debugger/debugger_evaluate.png
|
||||
|
||||