public TextSelection(Mono.TextEditor.MonoTextEditor textArea) { _textEditor = textArea; _textView = textArea; _textEditor.SelectionChanged += OnSelectionChanged; }
public SpaceReservationManager(string name, int rank, Mono.TextEditor.MonoTextEditor view) { this.Name = name; this.Rank = rank; _view = view; _view.Closed += this.OnViewClosed; }
static string GetRevisionText(Mono.TextEditor.MonoTextEditor editor, Revision rev) { if (!editor.Document.ReadOnly) { return(GettextCatalog.GetString("(working copy)")); } if (rev == null) { return(GettextCatalog.GetString("(base)")); } return(string.Format(GettextCatalog.GetString("(revision {0})"), rev.ToString())); }
public DiffWidget(VersionControlDocumentInfo info, bool viewOnly = false) { this.info = info; this.Build(); comparisonWidget = new ComparisonWidget(viewOnly); buttonNext = new DocumentToolButton(Gtk.Stock.GoUp, GettextCatalog.GetString("Previous Change")); buttonPrev = new DocumentToolButton(Gtk.Stock.GoDown, GettextCatalog.GetString("Next Change")); labelOverview = new Gtk.Label() { Xalign = 0 }; buttonDiff = new Gtk.Button(GettextCatalog.GetString("Unified Diff")); this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext(); this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev(); notebook1.Page = 0; vboxComparisonView.PackStart(comparisonWidget, true, true, 0); comparisonWidget.Show(); comparisonWidget.DiffChanged += delegate { labelOverview.Markup = LabelText; SetButtonSensitivity(); }; comparisonWidget.SetVersionControlInfo(info); this.buttonDiff.Clicked += HandleButtonDiffhandleClicked; diffTextEditor = new global::Mono.TextEditor.MonoTextEditor(new Mono.TextEditor.TextDocument(), CommonTextEditorOptions.Instance); diffTextEditor.Document.MimeType = "text/x-diff"; diffTextEditor.Options.ShowFoldMargin = false; diffTextEditor.Options.ShowIconMargin = false; diffTextEditor.Options.DrawIndentationMarkers = PropertyService.Get("DrawIndentationMarkers", false); diffTextEditor.Document.ReadOnly = true; scrolledwindow1.Child = diffTextEditor; diffTextEditor.Show(); SetButtonSensitivity(); }
public MDSpaceReservationStack(Dictionary <string, int> orderedManagerDefinitions, Mono.TextEditor.MonoTextEditor view) { _orderedManagerDefinitions = orderedManagerDefinitions; _view = view; }
public int GetLineInCenter(Mono.TextEditor.MonoTextEditor editor) { double midY = editor.VAdjustment.Value + editor.Allocation.Height / 2; return(editor.YToLine(midY)); }
public DiffWidget (VersionControlDocumentInfo info, bool viewOnly = false) { this.info = info; this.Build (); comparisonWidget = new ComparisonWidget (viewOnly); buttonNext = new DocumentToolButton (Gtk.Stock.GoUp, GettextCatalog.GetString ("Previous Change")); buttonPrev = new DocumentToolButton (Gtk.Stock.GoDown, GettextCatalog.GetString ("Next Change")); labelOverview = new Gtk.Label () { Xalign = 0 }; buttonDiff = new Gtk.Button (GettextCatalog.GetString ("Unified Diff")); this.buttonNext.Clicked += (sender, args) => ComparisonWidget.GotoNext (); this.buttonPrev.Clicked += (sender, args) => ComparisonWidget.GotoPrev (); notebook1.Page = 0; vboxComparisonView.PackStart (comparisonWidget, true, true, 0); comparisonWidget.Show (); comparisonWidget.DiffChanged += delegate { labelOverview.Markup = LabelText; SetButtonSensitivity (); }; comparisonWidget.SetVersionControlInfo (info); this.buttonDiff.Clicked += HandleButtonDiffhandleClicked; diffTextEditor = new global::Mono.TextEditor.MonoTextEditor (new Mono.TextEditor.TextDocument (), CommonTextEditorOptions.Instance); diffTextEditor.Document.MimeType = "text/x-diff"; diffTextEditor.Options.ShowFoldMargin = false; diffTextEditor.Options.ShowIconMargin = false; diffTextEditor.Options.DrawIndentationMarkers = PropertyService.Get ("DrawIndentationMarkers", false); diffTextEditor.Document.ReadOnly = true; scrolledwindow1.Child = diffTextEditor; diffTextEditor.Show (); SetButtonSensitivity (); }