Adds copy to clipboard menu in debugoutput dialog.

git-svn-id: trunk@16548 -
This commit is contained in:
sekelsenmat 2008-09-11 17:19:02 +00:00
parent 781f6e7a6c
commit 451adf3573
4 changed files with 39 additions and 23 deletions

View File

@ -1,29 +1,30 @@
object DbgOutputForm: TDbgOutputForm
inherited DbgOutputForm: TDbgOutputForm
Left = 108
Height = 200
Top = 140
Width = 400
Caption = 'Debug output'
ClientHeight = 200
ClientWidth = 400
OnClose = FormClose
OnCreate = FormCreate
HorzScrollBar.Page = 401
VertScrollBar.Page = 201
Left = 108
Height = 200
Top = 140
Width = 400
object txtOutput: TMemo
Align = alClient
PopupMenu = mnuPopup
PopupMenu = mnuPopup
TabOrder = 0
object txtOutput: TMemo[0]
Height = 200
Width = 400
Align = alClient
PopupMenu = mnuPopup
TabOrder = 0
end
object mnuPopup: TPopupMenu
left = 400
object mnuPopup: TPopupMenu[1]
left = 336
top = 96
object popClear: TMenuItem
Caption = '&Clear'
OnClick = popClearClick
end
object popCopyAll: TMenuItem
Caption = 'Copy all output to clipboard'
OnClick = popCopyAllClick
end
end
end

View File

@ -1,10 +1,13 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TDbgOutputForm','FORMDATA',[
'TPF0'#14'TDbgOutputForm'#13'DbgOutputForm'#7'Caption'#6#12'Debug output'#12
+'ClientHeight'#3#200#0#11'ClientWidth'#3#144#1#7'OnClose'#7#9'FormClose'#8'O'
+'nCreate'#7#10'FormCreate'#18'HorzScrollBar.Page'#3#145#1#18'VertScrollBar.P'
+'age'#3#201#0#4'Left'#2'l'#6'Height'#3#200#0#3'Top'#3#140#0#5'Width'#3#144#1
+#0#5'TMemo'#9'txtOutput'#5'Align'#7#8'alClient'#9'PopupMenu'#7#8'mnuPopup'#9
+'PopupMenu'#7#8'mnuPopup'#8'TabOrder'#2#0#6'Height'#3#200#0#5'Width'#3#144#1
+#0#0#10'TPopupMenu'#8'mnuPopup'#4'left'#3#144#1#3'top'#2'`'#0#9'TMenuItem'#8
+'popClear'#7'Caption'#6#6'&Clear'#7'OnClick'#7#13'popClearClick'#0#0#0#0
'TPF0'#241#14'TDbgOutputForm'#13'DbgOutputForm'#4'Left'#2'l'#6'Height'#3#200#0
+#3'Top'#3#140#0#5'Width'#3#144#1#7'Caption'#6#12'Debug output'#12'ClientHeig'
+'ht'#3#200#0#11'ClientWidth'#3#144#1#7'OnClose'#7#9'FormClose'#8'OnCreate'#7
+#10'FormCreate'#0#242#2#0#5'TMemo'#9'txtOutput'#6'Height'#3#200#0#5'Width'#3
+#144#1#5'Align'#7#8'alClient'#9'PopupMenu'#7#8'mnuPopup'#8'TabOrder'#2#0#0#0
+#242#2#1#10'TPopupMenu'#8'mnuPopup'#4'left'#3'P'#1#3'top'#2'`'#0#9'TMenuItem'
+#8'popClear'#7'Caption'#6#6'&Clear'#7'OnClick'#7#13'popClearClick'#0#0#9'TMe'
+'nuItem'#10'popCopyAll'#7'Caption'#6#28'Copy all output to clipboard'#7'OnCl'
+'ick'#7#15'popCopyAllClick'#0#0#0#0
]);

View File

@ -34,17 +34,22 @@ unit DBGOutputForm;
interface
uses
Classes, Graphics, Controls, Forms, Dialogs, LResources,
Classes, Graphics, Controls, Forms, Dialogs, LResources, Clipbrd,
Buttons, StdCtrls, Menus, DebuggerDlg;
type
{ TDbgOutputForm }
TDbgOutputForm = class(TDebuggerDlg)
popCopyAll: TMenuItem;
txtOutput: TMemo;
mnuPopup: TPopupMenu;
popClear: TMenuItem;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure popClearClick(Sender: TObject);
procedure popCopyAllClick(Sender: TObject);
private
protected
procedure Loaded; override;
@ -103,6 +108,11 @@ begin
Clear;
end;
procedure TDbgOutputForm.popCopyAllClick(Sender: TObject);
begin
Clipboard.AsText := txtOutput.Text;
end;
initialization
{$I dbgoutputform.lrs}

View File

@ -1376,6 +1376,8 @@ begin
ecEditorBottom: SetResult(VK_DOWN,[ssMeta],VK_UNKNOWN,[]);
// selection
ecSelLineStart: SetResult(VK_HOME, [ssShift],VK_LEFT,[ssMeta,ssShift]);
ecSelLineEnd: SetResult(VK_END, [ssShift],VK_RIGHT,[ssMeta,ssShift]);
ecSelEditorTop: SetResult(VK_HOME, [ssShift,ssCtrl],VK_UNKNOWN,[]);
ecSelEditorBottom: SetResult(VK_END, [ssShift,ssCtrl],VK_UNKNOWN,[]);
end;