pub enum ActivationPolicy {
Inherit,
SuppressOnFocusOnly,
AllowOnFocusOnly,
}Expand description
Controls whether a pointer gesture that only activated/focused the host may also activate a widget.
Policies are resolved from the hit-tested child towards its ancestors. If
no widget chooses an explicit policy, the input router uses the safe
ActivationPolicy::SuppressOnFocusOnly root fallback.
§Examples
use ailloli_ui_runtime::input::ActivationPolicy;
assert_eq!(ActivationPolicy::default(), ActivationPolicy::Inherit);Variants§
Inherit
Defer the decision to the closest ancestor with an explicit policy.
SuppressOnFocusOnly
Preserve focus handling but suppress action activation.
AllowOnFocusOnly
Deliver the gesture normally, for example to place a text caret.
Trait Implementations§
Source§impl Clone for ActivationPolicy
impl Clone for ActivationPolicy
Source§fn clone(&self) -> ActivationPolicy
fn clone(&self) -> ActivationPolicy
Returns a copy 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 ActivationPolicy
impl Debug for ActivationPolicy
Source§impl Default for ActivationPolicy
impl Default for ActivationPolicy
Source§fn default() -> ActivationPolicy
fn default() -> ActivationPolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for ActivationPolicy
impl PartialEq for ActivationPolicy
impl Copy for ActivationPolicy
impl Eq for ActivationPolicy
impl StructuralPartialEq for ActivationPolicy
Auto Trait Implementations§
impl Freeze for ActivationPolicy
impl RefUnwindSafe for ActivationPolicy
impl Send for ActivationPolicy
impl Sync for ActivationPolicy
impl Unpin for ActivationPolicy
impl UnwindSafe for ActivationPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.