pub struct OverridableContextAction<T: ActionIntent + ?Sized> { /* private fields */ }Expand description
Dart’s _OverridableContextAction: the overridable form of a ContextAction.
Implementations§
Source§impl<T: ActionIntent + ?Sized> OverridableContextAction<T>
impl<T: ActionIntent + ?Sized> OverridableContextAction<T>
Sourcepub fn new(
app: &mut App,
default_action: ActionRef,
lookup_context: BuildContext,
) -> Ref<OverridableContextAction<T>>
pub fn new( app: &mut App, default_action: ActionRef, lookup_context: BuildContext, ) -> Ref<OverridableContextAction<T>>
Dart’s _OverridableContextAction(defaultAction:, lookupContext:); reached through
AnyAction::overridable.
Trait Implementations§
Source§impl<T: ActionIntent + ?Sized> Action for OverridableContextAction<T>
impl<T: ActionIntent + ?Sized> Action for OverridableContextAction<T>
Source§fn action_data(self: Handle<Self>, app: &App) -> &ActionData
fn action_data(self: Handle<Self>, app: &App) -> &ActionData
Source§fn action_data_mut(self: Handle<Self>, app: &mut App) -> &mut ActionData
fn action_data_mut(self: Handle<Self>, app: &mut App) -> &mut ActionData
See
action_data.Source§fn is_enabled(self: Handle<Self>, app: &mut App, intent: &T) -> bool
fn is_enabled(self: Handle<Self>, app: &mut App, intent: &T) -> bool
Returns true if the action is enabled and is ready to be invoked. Read more
Source§fn invoke(self: Handle<Self>, app: &mut App, intent: &T) -> Option<Rc<dyn Any>>
fn invoke(self: Handle<Self>, app: &mut App, intent: &T) -> Option<Rc<dyn Any>>
Called when the action is to be performed. Read more
Source§fn make_overridable_action(
self: Handle<Self>,
app: &mut App,
context: BuildContext,
) -> ActionRef
fn make_overridable_action( self: Handle<Self>, app: &mut App, context: BuildContext, ) -> ActionRef
Dart’s
Action._makeOverridableAction: the overridable form of this action, which
AnyAction::overridable hands back.Source§fn update_calling_action(
self: Handle<Self>,
app: &mut App,
value: Option<ActionRef>,
)
fn update_calling_action( self: Handle<Self>, app: &mut App, value: Option<ActionRef>, )
Sets
calling_action; overridden by the overridable actions so
that the default action sees it too.Source§fn consumes_key(self: Handle<Self>, app: &mut App, intent: &T) -> bool
fn consumes_key(self: Handle<Self>, app: &mut App, intent: &T) -> bool
Indicates whether this action should treat key events mapped to this action as being
“handled” when it is invoked via the key event. Read more
Source§fn debug_fill_properties(
self: Handle<Self>,
app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( self: Handle<Self>, app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
Action.debugFillProperties, from Diagnosticable: an action adds its own
fields.Source§fn intent_type() -> TypeId
fn intent_type() -> TypeId
Gets the type of intent this action responds to.
Source§fn to_key_event_result(
self: Handle<Self>,
app: &mut App,
intent: &Self::Intent,
invoke_result: Option<&Rc<dyn Any>>,
) -> KeyEventResult
fn to_key_event_result( self: Handle<Self>, app: &mut App, intent: &Self::Intent, invoke_result: Option<&Rc<dyn Any>>, ) -> KeyEventResult
Source§fn add_action_listener(
self: Handle<Self>,
app: &mut App,
listener: ActionListenerCallback,
)
fn add_action_listener( self: Handle<Self>, app: &mut App, listener: ActionListenerCallback, )
Register a callback to listen for changes to the state of this action. Read more
Source§fn remove_action_listener(
self: Handle<Self>,
app: &mut App,
listener: &ActionListenerCallback,
)
fn remove_action_listener( self: Handle<Self>, app: &mut App, listener: &ActionListenerCallback, )
Remove a previously registered closure from the list of closures that are notified when
the object changes. Read more
Source§impl<T: ActionIntent + ?Sized> ContextAction for OverridableContextAction<T>
impl<T: ActionIntent + ?Sized> ContextAction for OverridableContextAction<T>
Source§fn is_enabled(
self: Handle<Self>,
app: &mut App,
intent: &T,
context: Option<BuildContext>,
) -> bool
fn is_enabled( self: Handle<Self>, app: &mut App, intent: &T, context: Option<BuildContext>, ) -> bool
Returns true if the action is enabled and is ready to be invoked. Read more
Auto Trait Implementations§
impl<T> !RefUnwindSafe for OverridableContextAction<T>
impl<T> !Send for OverridableContextAction<T>
impl<T> !Sync for OverridableContextAction<T>
impl<T> !UnwindSafe for OverridableContextAction<T>
impl<T> Forget for OverridableContextAction<T>where
T: ?Sized,
impl<T> Freeze for OverridableContextAction<T>
impl<T> Move for OverridableContextAction<T>where
T: ?Sized,
impl<T> Unpin for OverridableContextAction<T>
impl<T> UnsafeUnpin for OverridableContextAction<T>where
*const u8 is !null: UnsafeUnpin,
PhantomData<Rc<dyn Fn(&mut App, AnyAction)>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static ActionVTable: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
&'static ElementVTable: UnsafeUnpin,
PhantomData<fn(&T)>: UnsafeUnpin,
T: ?Sized,
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