Expand description
Reusable egui hex-view widget.
Renders bytes from a HexSource in a virtualised scroll view with a
configurable number of hex columns (16 by default), an address column,
and an ASCII sidebar. Supports click, shift-click, and drag across
arbitrary row boundaries to extend the selection. Highlights are
painted as contiguous bars across each row for readability.
Structs§
- Byte
Palette - Palette for byte-class tinting. Each variant of [
ByteClass] maps to one colour. Rendered text remains readable via the view’s contrast-adjustment. - Byte
Style - Foreground + background colour choice for a single byte cell.
Returned by a
ByteStylerFnso the consumer can fully override the built-in palette’s decision per byte (e.g. to highlight a matched pattern, a diff, or bytes pointed to by a parsed template). - HexView
- HexView
Layout - Immutable snapshot of the HexView’s per-frame geometry. Values are in screen coordinates (absolute, already accounting for scroll). Only valid within the current egui frame.
- HexView
Response - Value
Gradient - Every byte value gets a unique colour from a fixed HSL hue wheel. Saturation and lightness are tuned per theme/mode so the resulting colours stay readable under the view’s fixed text contrast rules.
Enums§
- Highlight
Palette - Colour source for byte-value tinting. Plugins can hand a fully-
specified 256-entry table via
Self::Customso a template run can override the user’s default palette for the duration. - Value
Highlight - Where the byte-value palette should be applied.
Type Aliases§
- Address
Formatter Fn - Formatter for address-column labels. Receives the offset of the row’s first byte and the width (in characters) the built-in address uses, returns the string to render. Default formats as uppercase zero-padded hex.
- Byte
Styler Fn - Per-byte styler. Receives each byte’s value and absolute file offset
and returns a
ByteStyle. Consumers can use this to drive their own colour logic (search hits, struct-field overlays, diff colours, etc.) without subclassing the widget. - Column
Header Formatter Fn - Formatter for the column-header row above the hex/ascii panes. Receives the zero-based column index and returns its label. Default renders an uppercase hex digit.
- Context
Menu Fn - Callback type for context menu rendering – invoked on right-click anywhere in the hex or ASCII pane.