Class HexView
An hex viewer and editor
View over a
System.IO.Stream
Inheritance
System.Object
HexView
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Terminal.Gui.dll
Syntax
public class HexView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Constructors
HexView()
Declaration
HexView(Stream)
Declaration
public HexView(Stream source)
Parameters
Type |
Name |
Description |
System.IO.Stream |
source |
The System.IO.Stream to view and edit as hex, this System.IO.Stream must support seeking, or an exception will be thrown. |
Properties
AllowEdits
Gets or sets whether this
HexView allow editing of the
System.IO.Stream
of the underlying
System.IO.Stream.
Declaration
public bool AllowEdits { get; set; }
Property Value
Type |
Description |
System.Boolean |
true if allow edits; otherwise, false . |
DesiredCursorVisibility
Get / Set the wished cursor when the field is focused
Declaration
public CursorVisibility DesiredCursorVisibility { get; set; }
Property Value
DisplayStart
Sets or gets the offset into the
System.IO.Stream that will displayed at the top of the
HexView
Declaration
public long DisplayStart { get; set; }
Property Value
Type |
Description |
System.Int64 |
The display start. |
Edits
Gets a
System.Collections.Generic.SortedDictionary`2 describing the edits done to the
HexView.
Each Key indicates an offset where an edit was made and the Value is the changed byte.
Declaration
public IReadOnlyDictionary<long, byte> Edits { get; }
Property Value
Type |
Description |
System.Collections.Generic.IReadOnlyDictionary<System.Int64, System.Byte> |
The edits. |
Frame
Declaration
public override Rect Frame { get; set; }
Property Value
Overrides
Source
Sets or gets the
System.IO.Stream the
HexView is operating on; the stream must support seeking (
System.IO.Stream.CanSeek == true).
Declaration
public Stream Source { get; set; }
Property Value
Type |
Description |
System.IO.Stream |
The source. |
Methods
ApplyEdits()
This method applies andy edits made to the
System.IO.Stream and resets the
contents of the
Edits property
Declaration
PositionCursor()
Declaration
public override void PositionCursor()
Overrides
ProcessKey(KeyEvent)
Declaration
public override bool ProcessKey(KeyEvent keyEvent)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
Redraw(Rect)
Declaration
public override void Redraw(Rect bounds)
Parameters
Type |
Name |
Description |
Rect |
bounds |
|
Overrides
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize