// // HexView.cs: A hexadecimal viewer // // TODO: // - Support searching and highlighting of the search result // - Bug showing the last line // namespace Terminal.Gui; /// Defines the event arguments for event. public class HexViewEventArgs : EventArgs { /// Initializes a new instance of /// The character position. /// The cursor position. /// Line bytes length. public HexViewEventArgs (long pos, Point cursor, int lineLength) { Position = pos; CursorPosition = cursor; BytesPerLine = lineLength; } /// The bytes length per line. public int BytesPerLine { get; private set; } /// Gets the current cursor position starting at one for both, line and column. public Point CursorPosition { get; private set; } /// Gets the current character position starting at one, related to the . public long Position { get; private set; } } /// Defines the event arguments for event. public class HexViewEditEventArgs : EventArgs { /// Creates a new instance of the class. /// /// public HexViewEditEventArgs (long position, byte newValue) { Position = position; NewValue = newValue; } /// Gets the new value for that . public byte NewValue { get; } /// Gets the location of the edit. public long Position { get; } }