pub struct ClickController { /* private fields */ }Expand description
Reports clicks: press, track in and out of the Widget, release.
The press is “captured” by the engine, so the release arrives even when the pointer is outside.
Reports ControllerEvent::ClickPressed, ControllerEvent::ClickArmed as the pointer
leaves and re-enters, then ControllerEvent::Clicked if released while armed, otherwise
ControllerEvent::ClickCancelled. Only events addressed to the owning Widget count, so a
press that bubbles up from a child is not a click on the parent.
Implementations§
Trait Implementations§
Source§impl Controller for ClickController
impl Controller for ClickController
Source§fn handle(
&mut self,
widget: WidgetId,
event: &Event,
out: &mut Vec<ControllerEvent>,
)
fn handle( &mut self, widget: WidgetId, event: &Event, out: &mut Vec<ControllerEvent>, )
Examines one event and reports any result.
§Arguments
widget- The ID of the owningWidget.event- The event theWidgetreceived.out- Where results are pushed.
Source§fn event_mask(&self) -> EventMask
fn event_mask(&self) -> EventMask
Returns the event classes this controller needs.
§Returns
The mask added to the Widget’s event mask.
Auto Trait Implementations§
impl Freeze for ClickController
impl RefUnwindSafe for ClickController
impl Send for ClickController
impl Sync for ClickController
impl Unpin for ClickController
impl UnsafeUnpin for ClickController
impl UnwindSafe for ClickController
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