Skip to main content

EventWindow

Struct EventWindow 

Source
pub struct EventWindow { /* private fields */ }
Expand description

Themed overlay that displays recent input events.

Implementations§

Source§

impl EventWindow

Source

pub fn is_visible(&self) -> bool

Whether the window is currently visible.

Source

pub fn entry_count(&self) -> usize

Number of entries currently in the list.

Source

pub fn is_enabled(&self) -> bool

Whether event collection is enabled.

Source

pub fn set_enabled(&mut self, val: bool)

Enable or disable event collection. When disabled, push_event is a no-op.

Source

pub fn diag_state(&self) -> u32

Packed event-window diagnostic state.

Source

pub fn draw_seq(&self) -> u32

Monotonic draw sequence number.

Source

pub fn set_frozen(&mut self, val: bool)

Freeze event aging. While frozen, handle_event(Tick) is a no-op so entries don’t age or expire during multi-frame dirty renders.

Source

pub fn is_frozen(&self) -> bool

Whether event aging is currently frozen.

Source

pub fn set_dma2d_mode(&mut self, val: bool)

Enable DMA2D rendering mode. When true, draw() becomes a no-op because the DMA2D overlay pipeline handles rendering externally.

Source

pub fn is_dma2d_mode(&self) -> bool

Whether DMA2D rendering mode is active.

Source

pub fn for_each_visible<F: FnMut(usize, &str)>(&self, f: F)

Iterate visible entries, calling f(line_index, text) for each.

Source

pub fn font(&self) -> &'static BitmapFont

Reference to the font used for text rendering.

Source

pub fn padding(&self) -> i32

Inner padding in pixels.

Source

pub fn line_height(&self) -> i32

Line height: font scaled_height + gap.

Source

pub fn push_event(&mut self, text: String)

Push a pre-formatted event string into the display list.

Trait Implementations§

Source§

impl Widget for EventWindow

Source§

fn bounds(&self) -> Rect

Return the area this widget occupies relative to its parent.
Source§

fn draw(&self, renderer: &mut dyn Renderer)

Render the widget using the provided Renderer.
Source§

fn handle_event(&mut self, event: &Event) -> bool

Handle an event and return true if it was consumed. Read more
Source§

fn clear_region(&mut self) -> Option<Rect>

Return a region (in draw/landscape coordinates) that should be restored from the pristine background copy, or None. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.