コード例 #1
0
        public DisassemblyView()
        {
            DocumentTitle = GettextCatalog.GetString("Disassembly");

            sw                = new Gtk.ScrolledWindow();
            editor            = TextEditorFactory.CreateNewEditor();
            editor.IsReadOnly = true;
            asmMarker         = TextMarkerFactory.CreateAsmLineMarker(editor);

            editor.Options = DefaultSourceEditorOptions.PlainEditor;

            sw.AddWithViewport(editor);
            sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.ShowAll();
            sw.Vadjustment.ValueChanged      += OnScrollEditor;
            sw.VScrollbar.ButtonPressEvent   += OnPress;
            sw.VScrollbar.ButtonReleaseEvent += OnRelease;
            sw.VScrollbar.Events             |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask;
            sw.ShadowType = Gtk.ShadowType.In;

            sw.Sensitive = false;

            DebuggingService.StoppedEvent += OnStop;
        }
コード例 #2
0
 public void RemoveMarker(ITextLineMarker lineMarker)
 {
     if (lineMarker == null)
     {
         throw new ArgumentNullException(nameof(lineMarker));
     }
     textEditorImpl.RemoveMarker(lineMarker);
 }
コード例 #3
0
 public void AddMarker(int lineNumber, ITextLineMarker lineMarker)
 {
     if (lineMarker == null)
     {
         throw new ArgumentNullException(nameof(lineMarker));
     }
     AddMarker(GetLine(lineNumber), lineMarker);
 }
コード例 #4
0
 public void AddMarker(IDocumentLine line, ITextLineMarker lineMarker)
 {
     if (line == null)
     {
         throw new ArgumentNullException(nameof(line));
     }
     if (lineMarker == null)
     {
         throw new ArgumentNullException(nameof(lineMarker));
     }
     textEditorImpl.AddMarker(line, lineMarker);
 }
コード例 #5
0
ファイル: DisassemblyView.cs プロジェクト: kdubau/monodevelop
		public DisassemblyView ()
		{
			ContentName = GettextCatalog.GetString ("Disassembly");
			sw = new Gtk.ScrolledWindow ();
			editor = TextEditorFactory.CreateNewEditor ();
			editor.IsReadOnly = true;
			asmMarker = TextMarkerFactory.CreateAsmLineMarker (editor);

			editor.Options = DefaultSourceEditorOptions.PlainEditor;
			
			sw.AddWithViewport (editor);
			sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
			sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
			sw.ShowAll ();
			sw.Vadjustment.ValueChanged += OnScrollEditor;
			sw.VScrollbar.ButtonPressEvent += OnPress;
			sw.VScrollbar.ButtonReleaseEvent += OnRelease;
			sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask;
			sw.ShadowType = Gtk.ShadowType.In;
			
			sw.Sensitive = false;

			DebuggingService.StoppedEvent += OnStop;
		}
コード例 #6
0
		void ITextEditorImpl.RemoveMarker (ITextLineMarker lineMarker)
		{
			var debugPair = lineMarker as DebugMarkerPair;
			if (debugPair != null) {
				debugPair.Remove ();
				return;
			}
			var textLineMarker = lineMarker as TextLineMarker;
			if (textLineMarker == null)
				throw new InvalidOperationException ("Tried to add an incompatible text marker.");
			TextEditor.Document.RemoveMarker (textLineMarker);
		}
コード例 #7
0
		void ITextEditorImpl.AddMarker (IDocumentLine line, ITextLineMarker lineMarker)
		{
			var debugPair = lineMarker as DebugMarkerPair;
			if (debugPair != null) {
				debugPair.AddTo (TextEditor.Document, ((DocumentLineWrapper)line).Line);
				return;
			}
			var textLineMarker = lineMarker as TextLineMarker;
			if (textLineMarker == null)
				throw new InvalidOperationException ("Tried to add an incompatible text marker. Use the MarkerHost to create compatible ones.");

			if (lineMarker is IUnitTestMarker) {
				var actionMargin = TextEditor.ActionMargin;
				if (actionMargin != null) {
					actionMargin.IsVisible = true;
				}
			}

			TextEditor.Document.AddMarker (((DocumentLineWrapper)line).Line, textLineMarker);
		}