//
// HexView.cs: A hexadecimal viewer
//
// TODO:
// - Support searching and highlighting of the search result
// - Bug showing the last line
//
using System;
using System.IO;
namespace Terminal.Gui {
///
/// Defines the event arguments for event.
///
public class HexViewEventArgs : EventArgs {
///
/// Gets the current character position starting at one, related to the .
///
public long Position { get; private set; }
///
/// Gets the current cursor position starting at one for both, line and column.
///
public Point CursorPosition { get; private set; }
///
/// The bytes length per line.
///
public int BytesPerLine { get; private set; }
///
/// 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;
}
}
///
/// 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 location of the edit.
///
public long Position { get; }
///
/// Gets the new value for that .
///
public byte NewValue { get; }
}
}