pub struct HexViewLayout { /* private fields */ }Expand description
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.
Implementations§
Source§impl HexViewLayout
impl HexViewLayout
Sourcepub fn columns(&self) -> ColumnCount
pub fn columns(&self) -> ColumnCount
Columns rendered per row.
Sourcepub fn hex_cell_rect(&self, offset: ByteOffset) -> Option<Rect>
pub fn hex_cell_rect(&self, offset: ByteOffset) -> Option<Rect>
Screen rect of the hex cell for the given byte offset, if the offset is within the source. The rect may fall outside the currently-visible viewport – callers doing overlay painting should intersect with the viewport clip.
Sourcepub fn ascii_cell_rect(&self, offset: ByteOffset) -> Option<Rect>
pub fn ascii_cell_rect(&self, offset: ByteOffset) -> Option<Rect>
Screen rect of the ASCII cell for the given byte offset.
Sourcepub fn hex_span_rect(
&self,
row: RowIndex,
from: usize,
to: usize,
) -> Option<Rect>
pub fn hex_span_rect( &self, row: RowIndex, from: usize, to: usize, ) -> Option<Rect>
Screen rect spanning a contiguous run of cells on a single row
(from column from through column to, inclusive). Useful for
drawing a bracket over an entire row’s worth of selection. If
the range crosses multiple rows, callers should issue one span
rect per row.
Trait Implementations§
Source§impl Clone for HexViewLayout
impl Clone for HexViewLayout
Source§fn clone(&self) -> HexViewLayout
fn clone(&self) -> HexViewLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HexViewLayout
impl Debug for HexViewLayout
impl Copy for HexViewLayout
Auto Trait Implementations§
impl Freeze for HexViewLayout
impl RefUnwindSafe for HexViewLayout
impl Send for HexViewLayout
impl Sync for HexViewLayout
impl Unpin for HexViewLayout
impl UnsafeUnpin for HexViewLayout
impl UnwindSafe for HexViewLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more