pub struct DefaultButtonInputHandler;Expand description
Default implementation of ButtonInputHandler
Trait Implementations§
Source§impl ButtonInputHandler for DefaultButtonInputHandler
impl ButtonInputHandler for DefaultButtonInputHandler
Source§fn hit_test(&self, mouse_x: f64, mouse_y: f64, rect: &Rect) -> bool
fn hit_test(&self, mouse_x: f64, mouse_y: f64, rect: &Rect) -> bool
Test if mouse position is inside button rect
Source§fn is_click(
&self,
press_x: f64,
press_y: f64,
release_x: f64,
release_y: f64,
rect: &Rect,
) -> bool
fn is_click( &self, press_x: f64, press_y: f64, release_x: f64, release_y: f64, rect: &Rect, ) -> bool
Detect if button was clicked
Source§fn next_focus(&self, current_id: &str, all_ids: &[String]) -> String
fn next_focus(&self, current_id: &str, all_ids: &[String]) -> String
Get next focus target when Tab is pressed
Source§fn prev_focus(&self, current_id: &str, all_ids: &[String]) -> String
fn prev_focus(&self, current_id: &str, all_ids: &[String]) -> String
Get previous focus target when Shift+Tab is pressed
Source§fn is_activation_key(&self, key: &str) -> bool
fn is_activation_key(&self, key: &str) -> bool
Check if key activates button (like click)
Source§impl Clone for DefaultButtonInputHandler
impl Clone for DefaultButtonInputHandler
Source§fn clone(&self) -> DefaultButtonInputHandler
fn clone(&self) -> DefaultButtonInputHandler
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 DefaultButtonInputHandler
impl Debug for DefaultButtonInputHandler
Source§impl Default for DefaultButtonInputHandler
impl Default for DefaultButtonInputHandler
Source§fn default() -> DefaultButtonInputHandler
fn default() -> DefaultButtonInputHandler
Returns the “default value” for a type. Read more
impl Copy for DefaultButtonInputHandler
Auto Trait Implementations§
impl Freeze for DefaultButtonInputHandler
impl RefUnwindSafe for DefaultButtonInputHandler
impl Send for DefaultButtonInputHandler
impl Sync for DefaultButtonInputHandler
impl Unpin for DefaultButtonInputHandler
impl UnsafeUnpin for DefaultButtonInputHandler
impl UnwindSafe for DefaultButtonInputHandler
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