//
// 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 byte position in the steam.
/// The edit position.
/// Line bytes length.
public HexViewEventArgs (long address, Point position, int lineLength)
{
Address = address;
Position = position;
BytesPerLine = lineLength;
}
/// The bytes length per line.
public int BytesPerLine { get; private set; }
/// Gets the current edit position.
public Point Position { get; private set; }
/// Gets the byte position in the .
public long Address { get; private set; }
}
/// Defines the event arguments for event.
public class HexViewEditEventArgs : EventArgs
{
/// Creates a new instance of the class.
///
///
public HexViewEditEventArgs (long address, byte newValue)
{
Address = address;
NewValue = newValue;
}
/// Gets the new value for that .
public byte NewValue { get; }
/// Gets the address of the edit in the stream.
public long Address { get; }
}