33
33
using MonoDevelop.Core;
34
34
using MonoDevelop.Ide.Gui;
35
using MonoDevelop.Ide.Gui.Content;
35
36
using MonoDevelop.Components.Commands;
36
37
using MonoDevelop.Ide.Commands;
37
38
using TextEditor = Mono.TextEditor.TextEditor;
38
39
using Mono.TextEditor;
39
40
using Mono.Debugging.Client;
41
using Mono.TextEditor.Highlighting;
41
43
namespace MonoDevelop.Debugger
43
public class DisassemblyView: AbstractViewContent
45
public class DisassemblyView: AbstractViewContent, IClipboardHandler
45
47
Gtk.ScrolledWindow sw;
46
48
Mono.TextEditor.TextEditor editor;
66
68
editor.Document.ReadOnly = true;
68
70
editor.Options = new MonoDevelop.Ide.Gui.CommonTextEditorOptions () {
69
ShowEolMarkers = false,
70
ShowInvalidLines = false,
71
71
ShowLineNumberMargin = false,
354
354
var cf = DebuggingService.CurrentFrame;
355
355
ci.Enabled = cf != null && addressLines.ContainsKey (GetAddrId (cf.Address, cf.AddressSpace));
358
#region IClipboardHandler implementation
360
void IClipboardHandler.Cut ()
362
throw new NotSupportedException ();
365
void IClipboardHandler.Copy ()
367
editor.RunAction (ClipboardActions.Copy);
370
void IClipboardHandler.Paste ()
372
throw new NotSupportedException ();
375
void IClipboardHandler.Delete ()
377
throw new NotSupportedException ();
380
void IClipboardHandler.SelectAll ()
382
editor.RunAction (SelectionActions.SelectAll);
385
bool IClipboardHandler.EnableCut {
386
get { return false; }
389
bool IClipboardHandler.EnableCopy {
390
get { return !editor.SelectionRange.IsEmpty; }
393
bool IClipboardHandler.EnablePaste {
394
get { return false; }
397
bool IClipboardHandler.EnableDelete {
398
get { return false; }
401
bool IClipboardHandler.EnableSelectAll {
359
class AsmLineMarker: TextMarker
408
class AsmLineMarker: TextLineMarker
361
410
public override ChunkStyle GetStyle (ChunkStyle baseStyle)
363
412
ChunkStyle st = new ChunkStyle (baseStyle);
364
st.CairoColor = new Cairo.Color (125, 125, 125);
413
st.Foreground = new Cairo.Color (125, 125, 125);