/* Copyright (C) 2014-2019 de4dot@gmail.com This file is part of dnSpy dnSpy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. dnSpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with dnSpy. If not, see . */ using System; using System.Windows; using System.Windows.Media; using dnSpy.Contracts.Hex.Formatting; using VSTE = Microsoft.VisualStudio.Text.Editor; namespace dnSpy.Contracts.Hex.Editor { /// /// WPF hex view /// public abstract class WpfHexView : HexView { /// /// Constructor /// protected WpfHexView() { } /// /// Gets the UI element /// public abstract FrameworkElement VisualElement { get; } /// /// Gets/sets the background brush /// public abstract Brush? Background { get; set; } /// /// Raised when the background property has changed /// public abstract event EventHandler? BackgroundBrushChanged; /// /// Gets/sets the zoom level between 20% to 400% /// public abstract double ZoomLevel { get; set; } /// /// Raised when the zoom level has changed /// public abstract event EventHandler? ZoomLevelChanged; /// /// Gets the formatted line source /// public abstract HexFormattedLineSource FormattedLineSource { get; } /// /// Gets the line transform source /// public abstract HexLineTransformSource LineTransformSource { get; } /// /// Gets the WPF hex view lines /// public abstract WpfHexViewLineCollection WpfHexViewLines { get; } /// /// Gets an adornment layer /// /// Name of adornment layer /// public abstract HexAdornmentLayer GetAdornmentLayer(string name); /// /// Gets the space reservation manager /// /// Name of space reservation manager /// public abstract HexSpaceReservationManager GetSpaceReservationManager(string name); /// /// Gets the line that contains the position /// /// Position /// public abstract WpfHexViewLine GetWpfHexViewLineContainingBufferPosition(HexBufferPoint bufferPosition); } }