public override void AddRedraw (HexEditor editor)
		{
			Margin margin = editor.Margins.FirstOrDefault (m => m.GetType () == MarginType);
			if (margin != null)
				editor.RepaintMarginArea (margin, 
				                          margin.XOffset, 
				                          (int)(Line * editor.LineHeight - editor.HexEditorData.VAdjustment.Value), 
				                          margin.Width, 
				                          editor.LineHeight);
		}
Exemple #2
0
        protected override async Task <Control> OnGetViewControlAsync(CancellationToken token, DocumentViewContent view)
        {
            view.Title = GettextCatalog.GetString("Binary");
            hexEditor  = new Mono.MHex.HexEditor();
            await Model.Load();

            hexEditor.HexEditorData.ByteBuffer = ((ByteBufferModel)Model).ByteBuffer;
            hexEditor.HexEditorStyle           = new MonoDevelopHexEditorStyle(hexEditor);
            SetOptions();
            DefaultSourceEditorOptions.Instance.Changed += Instance_Changed;
            hexEditor.HexEditorData.Changed             += delegate {
                this.HasUnsavedChanges = true;
            };
            window = new ScrollView(hexEditor);
            await LoadContent();

            return(new XwtControl(window));
        }
		public override void AddRedraw (HexEditor editor)
		{
			editor.RepaintArea (0, (int)(Line * editor.LineHeight - editor.HexEditorData.VAdjustment.Value), editor.Bounds.Width, editor.LineHeight);
		}
		public abstract void AddRedraw (HexEditor editor);