pub struct EventCx<'a, M> {
pub rect: Rect,
pub content: Rect,
pub state: ElementState,
pub style: &'a ComputedStyle,
/* private fields */
}Expand description
What a widget can do while handling an event.
Fields§
§rect: RectThe element’s border box.
content: RectThe element’s content box.
state: ElementStateThe element’s state at the time of the event.
style: &'a ComputedStyleThe element’s computed style.
Implementations§
Source§impl<M> EventCx<'_, M>
impl<M> EventCx<'_, M>
pub fn change(&mut self, text: String)
pub fn toggle(&mut self, checked: bool)
pub fn submit(&mut self, text: String)
Sourcepub fn request_focus(&mut self)
pub fn request_focus(&mut self)
Asks for keyboard focus to move to this element.
Sourcepub fn mark_changed(&mut self)
pub fn mark_changed(&mut self)
Tells the framework the widget’s appearance or size changed, so styles and layout are recomputed before the next paint.
Auto Trait Implementations§
impl<'a, M> !RefUnwindSafe for EventCx<'a, M>
impl<'a, M> !Send for EventCx<'a, M>
impl<'a, M> !Sync for EventCx<'a, M>
impl<'a, M> !UnwindSafe for EventCx<'a, M>
impl<'a, M> Freeze for EventCx<'a, M>
impl<'a, M> Unpin for EventCx<'a, M>
impl<'a, M> UnsafeUnpin for EventCx<'a, M>
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