pub struct InkToolbarMenuButtonAutomationPeer { /* private fields */ }Implementations§
Source§impl InkToolbarMenuButtonAutomationPeer
impl InkToolbarMenuButtonAutomationPeer
pub fn construct(owner: &InkToolbarMenuButton) -> Self
pub fn new(owner: &InkToolbarMenuButton) -> Ref<Self>
Methods from Deref<Target = ToggleButtonAutomationPeer>§
Sourcepub fn to_ref(&self) -> Ref<ToggleButtonAutomationPeer>
pub fn to_ref(&self) -> Ref<ToggleButtonAutomationPeer>
Returns a strong reference to this object.
Sourcepub fn owner(&self) -> Ref<ToggleButton>
pub fn owner(&self) -> Ref<ToggleButton>
Gets the owning toggle button.
Sourcepub fn toggle_state(&self) -> ToggleState
pub fn toggle_state(&self) -> ToggleState
The toggle state of the button (the toggle provider contract).
Sourcepub fn toggle(&self) -> Result<(), ElementNotEnabledException>
pub fn toggle(&self) -> Result<(), ElementNotEnabledException>
Cycles through the toggle states of the button (the toggle provider contract).
Methods from Deref<Target = ContentControlAutomationPeer>§
Sourcepub fn to_ref(&self) -> Ref<ContentControlAutomationPeer>
pub fn to_ref(&self) -> Ref<ContentControlAutomationPeer>
Returns a strong reference to this object.
Sourcepub fn owner(&self) -> Ref<ContentControl>
pub fn owner(&self) -> Ref<ContentControl>
Gets the owning content control.
Methods from Deref<Target = ControlAutomationPeer>§
Sourcepub fn to_ref(&self) -> Ref<ControlAutomationPeer>
pub fn to_ref(&self) -> Ref<ControlAutomationPeer>
Returns a strong reference to this object.
Sourcepub fn get_children_core(&self) -> Option<Vec<Ref<AutomationPeer>>>
pub fn get_children_core(&self) -> Option<Vec<Ref<AutomationPeer>>>
Gets the child automation peers of the peer, or None if it has
none. The default implementation returns the peers of the visible
visual children of the owner.
Sourcepub fn get_visual_parent(&self) -> Option<Ref<Visual>>
pub fn get_visual_parent(&self) -> Option<Ref<Visual>>
Gets the visual the peer of which is the parent of this peer (not for use outside the framework).
Sourcepub fn try_owner(&self) -> Option<Ref<Control>>
pub fn try_owner(&self) -> Option<Ref<Control>>
Gets the owning control, or None if it no longer exists.
Sourcepub fn get_or_create(&self, element: &Control) -> Ref<AutomationPeer>
pub fn get_or_create(&self, element: &Control) -> Ref<AutomationPeer>
Gets or creates an automation peer for a control: this peer for its
owner, the peer of element otherwise.
Sourcepub fn invalidate_children(&self)
pub fn invalidate_children(&self)
Invalidates the peer’s children and causes a re-read from
get_children_core.
Sourcepub fn invalidate_parent(&self)
pub fn invalidate_parent(&self)
Invalidates the peer’s parent.
Methods from Deref<Target = AutomationPeer>§
Sourcepub fn to_ref(&self) -> Ref<AutomationPeer>
pub fn to_ref(&self) -> Ref<AutomationPeer>
Returns a strong reference to this object.
Sourcepub fn get_localized_control_type_core(&self) -> String
pub fn get_localized_control_type_core(&self) -> String
Gets a human-readable localized string that represents the type of the control that is associated with this automation peer.
pub fn bring_into_view_core(&self)
pub fn get_accelerator_key_core(&self) -> Option<String>
pub fn get_access_key_core(&self) -> Option<String>
pub fn get_automation_control_type_core(&self) -> AutomationControlType
pub fn get_automation_id_core(&self) -> Option<String>
pub fn get_bounding_rectangle_core(&self) -> Rect
pub fn get_or_create_children_core(&self) -> Rc<Vec<Ref<AutomationPeer>>>
pub fn get_class_name_core(&self) -> String
pub fn get_labeled_by_core(&self) -> Option<Ref<AutomationPeer>>
pub fn get_name_core(&self) -> Option<String>
pub fn get_help_text_core(&self) -> Option<String>
pub fn get_placeholder_text_core(&self) -> Option<String>
pub fn get_landmark_type_core(&self) -> Option<AutomationLandmarkType>
pub fn get_heading_level_core(&self) -> i32
pub fn get_item_type_core(&self) -> Option<String>
pub fn get_item_status_core(&self) -> Option<String>
pub fn get_parent_core(&self) -> Option<Ref<AutomationPeer>>
pub fn has_keyboard_focus_core(&self) -> bool
pub fn is_content_element_core(&self) -> bool
pub fn is_control_element_core(&self) -> bool
pub fn is_enabled_core(&self) -> bool
pub fn is_keyboard_focusable_core(&self) -> bool
pub fn is_offscreen_core(&self) -> bool
pub fn set_focus_core(&self)
pub fn get_live_setting_core(&self) -> AutomationLiveSetting
pub fn get_control_type_override_core(&self) -> AutomationControlType
pub fn get_class_name_override_core(&self) -> String
Sourcepub fn get_automation_root_core(&self) -> Option<Ref<AutomationPeer>>
pub fn get_automation_root_core(&self) -> Option<Ref<AutomationPeer>>
Gets the root of the automation tree of the peer (not for use outside the framework).
Sourcepub fn get_visual_root_core(&self) -> Option<Ref<AutomationPeer>>
pub fn get_visual_root_core(&self) -> Option<Ref<AutomationPeer>>
Gets the peer of the visual root of the element (not for use outside the framework).
Sourcepub fn to_screen_core(&self, rect: Rect) -> Option<Rect>
pub fn to_screen_core(&self, rect: Rect) -> Option<Rect>
Converts a rectangle in the coordinates of the visual root to screen coordinates (not for use outside the framework).
pub fn is_content_element_override_core(&self) -> bool
pub fn is_control_element_override_core(&self) -> bool
Sourcepub fn get_provider_core(
&self,
provider_type: ValueType,
) -> Option<Rc<dyn AnyValue>>
pub fn get_provider_core( &self, provider_type: ValueType, ) -> Option<Rc<dyn AnyValue>>
Gets the handle of the provider contract provider_type (the
type of the handle, for example Rc<dyn IInvokeProvider>) if the
peer provides it.
Sourcepub fn try_set_parent(&self, parent: Option<Ref<AutomationPeer>>) -> bool
pub fn try_set_parent(&self, parent: Option<Ref<AutomationPeer>>) -> bool
Sets the parent of the peer; returns whether the peer accepted it.
Sourcepub fn is_element_available_core(&self) -> bool
pub fn is_element_available_core(&self) -> bool
Whether the element of the peer still exists (true by default;
a ControlAutomationPeer whose control is gone answers false).
Sourcepub fn is_element_available(&self) -> bool
pub fn is_element_available(&self) -> bool
Whether the element of the peer still exists. The peer of a control
does not keep the control alive (the control owns its peer), so a
platform can still hold a peer whose control is gone; such a peer
answers every member below with an empty value (no name, no children,
no parent, no provider, not enabled) instead of reaching its control,
and a platform bridge reports the element as not available
(UIA_E_ELEMENTNOTAVAILABLE on Windows).
Sourcepub fn bring_into_view(&self)
pub fn bring_into_view(&self)
Attempts to bring the element associated with the automation peer into view.
Sourcepub fn get_accelerator_key(&self) -> Option<String>
pub fn get_accelerator_key(&self) -> Option<String>
Gets the accelerator key combinations for the element that is associated with the UI Automation peer.
Sourcepub fn get_access_key(&self) -> Option<String>
pub fn get_access_key(&self) -> Option<String>
Gets the access key for the element that is associated with the automation peer.
Sourcepub fn get_automation_control_type(&self) -> AutomationControlType
pub fn get_automation_control_type(&self) -> AutomationControlType
Gets the control type for the element that is associated with the UI Automation peer.
Sourcepub fn get_automation_id(&self) -> Option<String>
pub fn get_automation_id(&self) -> Option<String>
Gets the automation ID of the element that is associated with the automation peer.
Sourcepub fn get_bounding_rectangle(&self) -> Rect
pub fn get_bounding_rectangle(&self) -> Rect
Gets the bounding rectangle of the element that is associated with the automation peer in top-level coordinates.
Sourcepub fn get_children(&self) -> Rc<Vec<Ref<AutomationPeer>>>
pub fn get_children(&self) -> Rc<Vec<Ref<AutomationPeer>>>
Gets the child automation peers.
Sourcepub fn get_class_name(&self) -> String
pub fn get_class_name(&self) -> String
Gets a string that describes the class of the element.
Sourcepub fn get_labeled_by(&self) -> Option<Ref<AutomationPeer>>
pub fn get_labeled_by(&self) -> Option<Ref<AutomationPeer>>
Gets the automation peer for the label that is targeted to the element.
Sourcepub fn get_localized_control_type(&self) -> String
pub fn get_localized_control_type(&self) -> String
Gets a human-readable localized string that represents the type of the control that is associated with this automation peer.
Sourcepub fn get_name(&self) -> String
pub fn get_name(&self) -> String
Gets text that describes the element that is associated with this automation peer.
Sourcepub fn get_help_text(&self) -> String
pub fn get_help_text(&self) -> String
Gets text that provides help for the element that is associated with this automation peer.
Sourcepub fn get_placeholder_text(&self) -> String
pub fn get_placeholder_text(&self) -> String
Gets the placeholder text for the element that is associated with this automation peer.
Sourcepub fn get_landmark_type(&self) -> Option<AutomationLandmarkType>
pub fn get_landmark_type(&self) -> Option<AutomationLandmarkType>
Gets the control type for the element that is associated with the UI Automation peer.
Sourcepub fn get_heading_level(&self) -> i32
pub fn get_heading_level(&self) -> i32
Gets the heading level that is associated with this automation peer.
Sourcepub fn get_item_type(&self) -> Option<String>
pub fn get_item_type(&self) -> Option<String>
Gets the item type that is associated with this automation peer.
Sourcepub fn get_item_status(&self) -> Option<String>
pub fn get_item_status(&self) -> Option<String>
Gets the item status that is associated with this automation peer.
Sourcepub fn get_parent(&self) -> Option<Ref<AutomationPeer>>
pub fn get_parent(&self) -> Option<Ref<AutomationPeer>>
Gets the automation peer that is the parent of this automation peer.
Sourcepub fn get_visual_root(&self) -> Option<Ref<AutomationPeer>>
pub fn get_visual_root(&self) -> Option<Ref<AutomationPeer>>
Gets the automation peer that is the root of this automation peer’s visual tree (not for use outside the framework).
Sourcepub fn get_automation_root(&self) -> Option<Ref<AutomationPeer>>
pub fn get_automation_root(&self) -> Option<Ref<AutomationPeer>>
Gets the automation peer that is the root of this automation peer’s automation tree (not for use outside the framework).
Sourcepub fn to_screen(&self, rect: Rect) -> Option<Rect>
pub fn to_screen(&self, rect: Rect) -> Option<Rect>
Converts a rectangle in the coordinates of the visual root to screen coordinates.
Sourcepub fn has_keyboard_focus(&self) -> bool
pub fn has_keyboard_focus(&self) -> bool
Gets a value that indicates whether the element that is associated with this automation peer currently has keyboard focus.
Sourcepub fn is_content_element(&self) -> bool
pub fn is_content_element(&self) -> bool
Gets a value that indicates whether the element that is associated with this automation peer contains data that is presented to the user.
Sourcepub fn is_control_element(&self) -> bool
pub fn is_control_element(&self) -> bool
Gets a value that indicates whether the element is understood by the user as interactive or as contributing to the logical structure of the control in the GUI.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Gets a value indicating whether the control is enabled for user interaction.
Sourcepub fn is_keyboard_focusable(&self) -> bool
pub fn is_keyboard_focusable(&self) -> bool
Gets a value that indicates whether the element can accept keyboard focus.
Sourcepub fn is_offscreen(&self) -> bool
pub fn is_offscreen(&self) -> bool
Gets a value that indicates whether an element is off the screen.
Sourcepub fn set_focus(&self)
pub fn set_focus(&self)
Sets the keyboard focus on the element that is associated with this automation peer.
Shows the context menu for the element that is associated with this automation peer. Returns true if a context menu is present for the element; otherwise false.
Sourcepub fn get_live_setting(&self) -> AutomationLiveSetting
pub fn get_live_setting(&self) -> AutomationLiveSetting
Gets the current live setting that is associated with this automation peer.
Sourcepub fn get_provider<I>(&self) -> Option<Rc<I>>where
I: 'static + ?Sized,
pub fn get_provider<I>(&self) -> Option<Rc<I>>where
I: 'static + ?Sized,
Tries to get a provider of the specified contract from the peer:
peer.get_provider::<dyn IInvokeProvider>().
Returns the provider, or None if the peer does not provide it.
Sourcepub fn children_changed(
&self,
handler: impl Fn() + 'static,
) -> Rc<dyn IDisposable>
pub fn children_changed( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>
Occurs when the children of the automation peer have changed.
Sourcepub fn property_changed(
&self,
handler: impl Fn(&AutomationPropertyChangedEventArgs) + 'static,
) -> Rc<dyn IDisposable>
pub fn property_changed( &self, handler: impl Fn(&AutomationPropertyChangedEventArgs) + 'static, ) -> Rc<dyn IDisposable>
Occurs when a property value of the automation peer has changed.
Sourcepub fn raise_children_changed_event(&self)
pub fn raise_children_changed_event(&self)
Raises an event to notify the automation client the peer’s children have changed.
Sourcepub fn raise_property_changed_event(
&self,
property: &'static AutomationProperty,
old_value: Option<Rc<dyn AnyValue>>,
new_value: Option<Rc<dyn AnyValue>>,
)
pub fn raise_property_changed_event( &self, property: &'static AutomationProperty, old_value: Option<Rc<dyn AnyValue>>, new_value: Option<Rc<dyn AnyValue>>, )
Raises an event to notify the automation client of a changed property value.
Sourcepub fn events_source(&self) -> Option<Ref<AutomationPeer>>
pub fn events_source(&self) -> Option<Ref<AutomationPeer>>
The peer used as the source of this peer’s native text-edit events. This relationship is weak: delegating an event never retains a control tree, and self references or cycles do not create ownership cycles.
pub fn set_events_source(&self, value: impl Into<Nullable<AutomationPeer>>)
Sourcepub fn text_edit_text_changed(
&self,
handler: impl Fn(&TextEditTextChangedEventArgs) + 'static,
) -> Rc<dyn IDisposable>
pub fn text_edit_text_changed( &self, handler: impl Fn(&TextEditTextChangedEventArgs) + 'static, ) -> Rc<dyn IDisposable>
Observes the text-edit events explicitly raised by this peer. A platform receives the resolved EventsSource; this observation remains attached to the original peer. Disposal and the observer handle retain it weakly.
Sourcepub fn raise_text_edit_text_changed_event(
&self,
change_type: TextEditChangeType,
changed_data: Vec<String>,
)
pub fn raise_text_edit_text_changed_event( &self, change_type: TextEditChangeType, changed_data: Vec<String>, )
Raises the native text-edit event on any peer, independently of whether
it implements the TextEdit pattern. The platform creates its native
provider on demand. None has no event, matching the native contract.
EventsSource is read exactly once before invoking observers or platform code. Reentrant source changes therefore affect the next event only.
Sourcepub fn ensure_enabled(&self) -> Result<(), ElementNotEnabledException>
pub fn ensure_enabled(&self) -> Result<(), ElementNotEnabledException>
Returns the error of an element that is not enabled unless the element of the peer is enabled.
Methods from Deref<Target = FerroObject>§
Sourcepub fn dispatcher(&self) -> &Arc<Dispatcher> ⓘ
pub fn dispatcher(&self) -> &Arc<Dispatcher> ⓘ
Returns the Dispatcher that this object is associated with: the
dispatcher of the thread that owns the object.
Sourcepub fn check_access(&self) -> bool
pub fn check_access(&self) -> bool
Returns whether the calling thread is the thread that owns this object.
Sourcepub fn verify_access(&self)
pub fn verify_access(&self)
Sourcepub fn to_ref(&self) -> Ref<FerroObject>
pub fn to_ref(&self) -> Ref<FerroObject>
A strong reference to this object.
Sourcepub fn to_weak(&self) -> WeakRef<FerroObject>
pub fn to_weak(&self) -> WeakRef<FerroObject>
A weak reference to this object.
Sourcepub fn is<T>(&self) -> boolwhere
T: ObjectType,
pub fn is<T>(&self) -> boolwhere
T: ObjectType,
Whether the object is of class T or a class derived from it.
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Returns the object viewed as class T if it is one.
Sourcepub fn on_property_changed(&self, change: &FerroPropertyChangedEventArgs<'_>)
pub fn on_property_changed(&self, change: &FerroPropertyChangedEventArgs<'_>)
Invokes the on_property_changed virtual member.
Sourcepub fn inheritance_parent(&self) -> Option<Ref<FerroObject>>
pub fn inheritance_parent(&self) -> Option<Ref<FerroObject>>
The parent object that inherited property values are inherited from.
Sourcepub fn set_inheritance_parent(&self, value: impl Into<Nullable<FerroObject>>)
pub fn set_inheritance_parent(&self, value: impl Into<Nullable<FerroObject>>)
Sets the parent object that inherited property values are inherited from.
Sourcepub fn clear_value<T>(&self, property: &'static StyledProperty<T>)where
T: PropertyValue,
pub fn clear_value<T>(&self, property: &'static StyledProperty<T>)where
T: PropertyValue,
Clears a property’s local value.
Sourcepub fn get_value<T>(&self, property: &'static StyledProperty<T>) -> Twhere
T: PropertyValue,
pub fn get_value<T>(&self, property: &'static StyledProperty<T>) -> Twhere
T: PropertyValue,
Gets a property value.
Sourcepub fn get_base_value<T>(
&self,
property: &'static StyledProperty<T>,
) -> Option<T>where
T: PropertyValue,
pub fn get_base_value<T>(
&self,
property: &'static StyledProperty<T>,
) -> Option<T>where
T: PropertyValue,
Gets a property’s base value: the value excluding animated values.
Returns None if the value comes from inheritance or the default.
Sourcepub fn is_animating(&self, property: &FerroProperty) -> bool
pub fn is_animating(&self, property: &FerroProperty) -> bool
Checks whether a property is animating.
Sourcepub fn is_set(&self, property: &FerroProperty) -> bool
pub fn is_set(&self, property: &FerroProperty) -> bool
Checks whether a styled property has a value assigned to it or a binding targeting it.
Sourcepub fn has_local_value_binding(&self, property: &FerroProperty) -> bool
pub fn has_local_value_binding(&self, property: &FerroProperty) -> bool
Whether a local-value binding targets this property, including direct
properties and observable bindings. Unlike is_set, this does not rely
on a styled property’s effective-value entry. It does not inspect bindings
at style/template priorities.
Sourcepub fn set_value<T>(&self, property: &'static StyledProperty<T>, value: T)where
T: PropertyValue,
pub fn set_value<T>(&self, property: &'static StyledProperty<T>, value: T)where
T: PropertyValue,
Sets a property value with local value priority.
Sourcepub fn set_value_with_priority<T>(
&self,
property: &'static StyledProperty<T>,
value: T,
priority: BindingPriority,
) -> Option<Rc<dyn IDisposable>>where
T: PropertyValue,
pub fn set_value_with_priority<T>(
&self,
property: &'static StyledProperty<T>,
value: T,
priority: BindingPriority,
) -> Option<Rc<dyn IDisposable>>where
T: PropertyValue,
Sets a property value with the given priority. For priorities other than local value, disposing the returned handle removes the value.
Sourcepub fn set_current_value<T>(
&self,
property: &'static StyledProperty<T>,
value: T,
)where
T: PropertyValue,
pub fn set_current_value<T>(
&self,
property: &'static StyledProperty<T>,
value: T,
)where
T: PropertyValue,
Sets the value of a property without changing its value source.
This is used by a component that programmatically sets the value of one of its own properties without disabling an application’s declared use of the property: the effective value changes, but existing bindings and styles continue to work. The new value has the property’s current priority.
Sourcepub fn bind_binding(
&self,
property: &'static FerroProperty,
binding: &dyn BindingBase,
) -> Rc<dyn BindingExpressionBase>
pub fn bind_binding( &self, property: &'static FerroProperty, binding: &dyn BindingBase, ) -> Rc<dyn BindingExpressionBase>
Binds a property to a binding. Returns the binding expression which represents the binding instance on this object.
Sourcepub fn bind_binding_with_anchor(
&self,
property: &'static FerroProperty,
binding: &dyn BindingBase,
anchor: Option<&Ref<FerroObject>>,
) -> Rc<dyn BindingExpressionBase>
pub fn bind_binding_with_anchor( &self, property: &'static FerroProperty, binding: &dyn BindingBase, anchor: Option<&Ref<FerroObject>>, ) -> Rc<dyn BindingExpressionBase>
Binds a property to a binding.
Some bindings need context to locate their source: a data context,
named elements or resources. If this object is not an element, or is
not yet attached to the tree, anchor provides that context.
Sourcepub fn bind_binding_with_priority(
&self,
property: &'static FerroProperty,
binding: &dyn BindingBase,
priority: BindingPriority,
anchor: Option<&Ref<FerroObject>>,
) -> Rc<dyn BindingExpressionBase>
pub fn bind_binding_with_priority( &self, property: &'static FerroProperty, binding: &dyn BindingBase, priority: BindingPriority, anchor: Option<&Ref<FerroObject>>, ) -> Rc<dyn BindingExpressionBase>
Binds a property to a binding at the given priority, whatever the default priority of the binding is. Disposing the returned expression removes the binding.
An addition (no upstream counterpart): the values of WinUI’s visual
states are bound at BindingPriority::Animation.
Sourcepub fn indexer(&self, binding: &IndexerDescriptor) -> IndexerBinding
pub fn indexer(&self, binding: &IndexerDescriptor) -> IndexerBinding
Gets a binding to a property of this object: the indexer taking an
IndexerDescriptor
(source[!Property] is source.indexer(&Property.bind())).
Sourcepub fn bind_indexer(
&self,
binding: &IndexerDescriptor,
value: &dyn BindingBase,
) -> Rc<dyn BindingExpressionBase>
pub fn bind_indexer( &self, binding: &IndexerDescriptor, value: &dyn BindingBase, ) -> Rc<dyn BindingExpressionBase>
Binds the property of an
IndexerDescriptor to a binding:
the setter of the indexer (target[!Property] = binding is
target.bind_indexer(&Property.bind(), &binding)).
Sourcepub fn bind<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<T>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<T>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a property to an observable.
Sourcepub fn bind_value<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<BindingValue<T>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_value<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<BindingValue<T>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a property to an observable of binding values.
Sourcepub fn bind_untyped<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_untyped<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a property to an observable of untyped values.
Sourcepub fn coerce_value(&self, property: &'static FerroProperty)
pub fn coerce_value(&self, property: &'static FerroProperty)
Coerces the specified property.
Sourcepub fn get_direct_value<T>(&self, property: &'static DirectPropertyBase<T>) -> Twhere
T: PropertyValue,
pub fn get_direct_value<T>(&self, property: &'static DirectPropertyBase<T>) -> Twhere
T: PropertyValue,
Gets a direct property value.
Sourcepub fn set_direct_value<T>(
&self,
property: &'static DirectPropertyBase<T>,
value: T,
)where
T: PropertyValue,
pub fn set_direct_value<T>(
&self,
property: &'static DirectPropertyBase<T>,
value: T,
)where
T: PropertyValue,
Sets a direct property value.
Sourcepub fn clear_direct_value<T>(&self, property: &'static DirectPropertyBase<T>)where
T: PropertyValue,
pub fn clear_direct_value<T>(&self, property: &'static DirectPropertyBase<T>)where
T: PropertyValue,
Resets a direct property to its unset value.
Sourcepub fn bind_direct<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<T>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_direct<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<T>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a direct property to an observable.
Sourcepub fn bind_direct_value<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<BindingValue<T>>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_direct_value<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<BindingValue<T>>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a direct property to an observable of binding values.
Sourcepub fn bind_direct_untyped<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_direct_untyped<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a direct property to an observable of untyped values.
Sourcepub fn set_and_raise<T>(
&self,
property: &'static DirectPropertyBase<T>,
field: &RefCell<T>,
value: T,
) -> boolwhere
T: PropertyValue,
pub fn set_and_raise<T>(
&self,
property: &'static DirectPropertyBase<T>,
field: &RefCell<T>,
value: T,
) -> boolwhere
T: PropertyValue,
Sets the backing field of a direct property, raising a change notification if the value changed. Returns true if it changed.
Sourcepub fn set_and_raise_cell<T>(
&self,
property: &'static DirectPropertyBase<T>,
field: &Cell<T>,
value: T,
) -> boolwhere
T: PropertyValue + Copy,
pub fn set_and_raise_cell<T>(
&self,
property: &'static DirectPropertyBase<T>,
field: &Cell<T>,
value: T,
) -> boolwhere
T: PropertyValue + Copy,
set_and_raise for Copy values stored in a
Cell.
Sourcepub fn get_value_untyped(
&self,
property: &'static FerroProperty,
) -> Rc<dyn AnyValue>
pub fn get_value_untyped( &self, property: &'static FerroProperty, ) -> Rc<dyn AnyValue>
Gets a property value as an untyped value.
Sourcepub fn set_value_untyped(
&self,
property: &'static FerroProperty,
value: &(dyn Any + 'static),
priority: BindingPriority,
) -> Option<Rc<dyn IDisposable>>
pub fn set_value_untyped( &self, property: &'static FerroProperty, value: &(dyn Any + 'static), priority: BindingPriority, ) -> Option<Rc<dyn IDisposable>>
Sets a property from an untyped value, which must hold exactly the property’s value type or the unset marker.
Sourcepub fn set_current_value_untyped(
&self,
property: &'static FerroProperty,
value: &(dyn Any + 'static),
)
pub fn set_current_value_untyped( &self, property: &'static FerroProperty, value: &(dyn Any + 'static), )
set_current_value with an untyped value.
Sourcepub fn clear_value_untyped(&self, property: &'static FerroProperty)
pub fn clear_value_untyped(&self, property: &'static FerroProperty)
Clears a property’s local value.
Sourcepub fn bind_property_untyped(
&self,
property: &'static FerroProperty,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>
pub fn bind_property_untyped( &self, property: &'static FerroProperty, source: Rc<dyn IObservable<Rc<dyn AnyValue>>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>
Binds a property to an observable of untyped values.
Sourcepub fn property_changed(
&self,
handler: impl Fn(&FerroPropertyChangedEventArgs<'_>) + 'static,
) -> Rc<dyn IDisposable>
pub fn property_changed( &self, handler: impl Fn(&FerroPropertyChangedEventArgs<'_>) + 'static, ) -> Rc<dyn IDisposable>
Subscribes to property changes on this object. Disposing the returned handle unsubscribes.
Sourcepub fn add_property_changed_handler(
&self,
handler: Rc<dyn Fn(&FerroPropertyChangedEventArgs<'_>)>,
) -> u64
pub fn add_property_changed_handler( &self, handler: Rc<dyn Fn(&FerroPropertyChangedEventArgs<'_>)>, ) -> u64
Subscribes handler to property changes on this object and returns
the token that remove_property_changed_handler
takes: property_changed for a subscriber
that keeps the object and the token itself, so that no handle is made.
Sourcepub fn remove_property_changed_handler(&self, token: u64) -> bool
pub fn remove_property_changed_handler(&self, token: u64) -> bool
Ends a subscription of add_property_changed_handler.
Sourcepub fn property_changed_subscriber_count(&self) -> usize
pub fn property_changed_subscriber_count(&self) -> usize
The number of subscribers to property changes on this object (a diagnostics member, used by tests to verify that subscriptions are released).
Sourcepub fn raise_property_changed<T>(
&self,
property: &'static FerroProperty,
old_value: Option<&T>,
new_value: &T,
priority: BindingPriority,
is_effective_value: bool,
)where
T: PropertyValue,
pub fn raise_property_changed<T>(
&self,
property: &'static FerroProperty,
old_value: Option<&T>,
new_value: &T,
priority: BindingPriority,
is_effective_value: bool,
)where
T: PropertyValue,
Raises a property changed notification.
Sourcepub fn raise_direct_property_changed<T>(
&self,
property: &'static DirectPropertyBase<T>,
old_value: &T,
new_value: &T,
)where
T: PropertyValue,
pub fn raise_direct_property_changed<T>(
&self,
property: &'static DirectPropertyBase<T>,
old_value: &T,
new_value: &T,
)where
T: PropertyValue,
Raises a property changed notification for a direct property.
Trait Implementations§
Source§impl AutomationPeerImpl for InkToolbarMenuButtonAutomationPeer
impl AutomationPeerImpl for InkToolbarMenuButtonAutomationPeer
fn get_class_name_core(_this: &Self) -> String
fn get_automation_control_type_core(_this: &Self) -> AutomationControlType
Source§fn get_localized_control_type_core(this: &Self) -> String
fn get_localized_control_type_core(this: &Self) -> String
fn get_name_core(this: &Self) -> Option<String>
Source§fn get_provider_core(
this: &Self,
provider_type: ValueType,
) -> Option<BoxedValue>
fn get_provider_core( this: &Self, provider_type: ValueType, ) -> Option<BoxedValue>
provider_type (the
type of the handle, for example Rc<dyn IInvokeProvider>) if the
peer provides it.fn bring_into_view_core(this: &Self)
fn get_accelerator_key_core(this: &Self) -> Option<String>
fn get_access_key_core(this: &Self) -> Option<String>
fn get_automation_id_core(this: &Self) -> Option<String>
fn get_bounding_rectangle_core(this: &Self) -> Rect
fn get_or_create_children_core(this: &Self) -> Rc<Vec<Ref<AutomationPeer>>>
fn get_labeled_by_core(this: &Self) -> Option<Ref<AutomationPeer>>
fn get_help_text_core(this: &Self) -> Option<String>
fn get_placeholder_text_core(this: &Self) -> Option<String>
fn get_landmark_type_core(this: &Self) -> Option<AutomationLandmarkType>
fn get_heading_level_core(this: &Self) -> i32
fn get_item_type_core(this: &Self) -> Option<String>
fn get_item_status_core(this: &Self) -> Option<String>
fn get_parent_core(this: &Self) -> Option<Ref<AutomationPeer>>
fn has_keyboard_focus_core(this: &Self) -> bool
fn is_content_element_core(this: &Self) -> bool
fn is_control_element_core(this: &Self) -> bool
fn is_enabled_core(this: &Self) -> bool
fn is_keyboard_focusable_core(this: &Self) -> bool
fn is_offscreen_core(this: &Self) -> bool
fn set_focus_core(this: &Self)
fn get_live_setting_core(this: &Self) -> AutomationLiveSetting
fn get_control_type_override_core(this: &Self) -> AutomationControlType
fn get_class_name_override_core(this: &Self) -> String
Source§fn get_automation_root_core(this: &Self) -> Option<Ref<AutomationPeer>>
fn get_automation_root_core(this: &Self) -> Option<Ref<AutomationPeer>>
Source§fn get_visual_root_core(this: &Self) -> Option<Ref<AutomationPeer>>
fn get_visual_root_core(this: &Self) -> Option<Ref<AutomationPeer>>
Source§fn to_screen_core(this: &Self, rect: Rect) -> Option<Rect>
fn to_screen_core(this: &Self, rect: Rect) -> Option<Rect>
fn is_content_element_override_core(this: &Self) -> bool
fn is_control_element_override_core(this: &Self) -> bool
Source§fn try_set_parent(this: &Self, parent: Option<Ref<AutomationPeer>>) -> bool
fn try_set_parent(this: &Self, parent: Option<Ref<AutomationPeer>>) -> bool
Source§fn is_element_available_core(this: &Self) -> bool
fn is_element_available_core(this: &Self) -> bool
ControlAutomationPeer whose control is gone answers false).Source§impl ControlAutomationPeerImpl for InkToolbarMenuButtonAutomationPeer
impl ControlAutomationPeerImpl for InkToolbarMenuButtonAutomationPeer
Source§fn get_children_core(this: &Self) -> Option<Vec<Ref<AutomationPeer>>>
fn get_children_core(this: &Self) -> Option<Vec<Ref<AutomationPeer>>>
None if it has
none. The default implementation returns the peers of the visible
visual children of the owner.Source§impl Deref for InkToolbarMenuButtonAutomationPeer
impl Deref for InkToolbarMenuButtonAutomationPeer
Source§type Target = ToggleButtonAutomationPeer
type Target = ToggleButtonAutomationPeer
Source§fn deref(&self) -> &ToggleButtonAutomationPeer
fn deref(&self) -> &ToggleButtonAutomationPeer
Source§impl FerroObjectImpl for InkToolbarMenuButtonAutomationPeer
impl FerroObjectImpl for InkToolbarMenuButtonAutomationPeer
Source§fn constructed(this: &Self)
fn constructed(this: &Self)
parent_constructed first.Source§fn on_property_changed_core(
this: &Self,
change: &FerroPropertyChangedEventArgs<'_>,
)
fn on_property_changed_core( this: &Self, change: &FerroPropertyChangedEventArgs<'_>, )
on_property_changed instead.Source§fn on_property_changed(this: &Self, change: &FerroPropertyChangedEventArgs<'_>)
fn on_property_changed(this: &Self, change: &FerroPropertyChangedEventArgs<'_>)
Source§fn update_data_validation(
this: &Self,
property: &'static FerroProperty,
state: BindingValueType,
error: Option<&BindingError>,
)
fn update_data_validation( this: &Self, property: &'static FerroProperty, state: BindingValueType, error: Option<&BindingError>, )
Source§impl ObjectType for InkToolbarMenuButtonAutomationPeer
impl ObjectType for InkToolbarMenuButtonAutomationPeer
Source§type Parent = ToggleButtonAutomationPeer
type Parent = ToggleButtonAutomationPeer
Source§type VTable = <ToggleButtonAutomationPeer as ObjectType>::VTable
type VTable = <ToggleButtonAutomationPeer as ObjectType>::VTable
Source§fn vtable() -> &'static Self::VTable
fn vtable() -> &'static Self::VTable
Self.Source§fn register_class()
fn register_class()
impl<T> Subclassable<T> for InkToolbarMenuButtonAutomationPeerwhere
ToggleButtonAutomationPeer: Subclassable<T>,
Auto Trait Implementations§
impl !Freeze for InkToolbarMenuButtonAutomationPeer
impl !RefUnwindSafe for InkToolbarMenuButtonAutomationPeer
impl !Send for InkToolbarMenuButtonAutomationPeer
impl !Sync for InkToolbarMenuButtonAutomationPeer
impl !UnwindSafe for InkToolbarMenuButtonAutomationPeer
impl Unpin for InkToolbarMenuButtonAutomationPeer
impl UnsafeUnpin for InkToolbarMenuButtonAutomationPeer
Blanket Implementations§
Source§impl<T> AutomationPeerImplExt for Twhere
T: AutomationPeerImpl,
impl<T> AutomationPeerImplExt for Twhere
T: AutomationPeerImpl,
Source§fn parent_get_localized_control_type_core(this: &Self) -> String
fn parent_get_localized_control_type_core(this: &Self) -> String
Source§fn parent_bring_into_view_core(this: &Self)
fn parent_bring_into_view_core(this: &Self)
Source§fn parent_get_accelerator_key_core(this: &Self) -> Option<String>
fn parent_get_accelerator_key_core(this: &Self) -> Option<String>
Source§fn parent_get_access_key_core(this: &Self) -> Option<String>
fn parent_get_access_key_core(this: &Self) -> Option<String>
Source§fn parent_get_automation_control_type_core(this: &Self) -> AutomationControlType
fn parent_get_automation_control_type_core(this: &Self) -> AutomationControlType
Source§fn parent_get_automation_id_core(this: &Self) -> Option<String>
fn parent_get_automation_id_core(this: &Self) -> Option<String>
Source§fn parent_get_bounding_rectangle_core(this: &Self) -> Rect
fn parent_get_bounding_rectangle_core(this: &Self) -> Rect
Source§fn parent_get_or_create_children_core(
this: &Self,
) -> Rc<Vec<Ref<AutomationPeer>>>
fn parent_get_or_create_children_core( this: &Self, ) -> Rc<Vec<Ref<AutomationPeer>>>
Source§fn parent_get_class_name_core(this: &Self) -> String
fn parent_get_class_name_core(this: &Self) -> String
Source§fn parent_get_labeled_by_core(this: &Self) -> Option<Ref<AutomationPeer>>
fn parent_get_labeled_by_core(this: &Self) -> Option<Ref<AutomationPeer>>
Source§fn parent_get_name_core(this: &Self) -> Option<String>
fn parent_get_name_core(this: &Self) -> Option<String>
Source§fn parent_get_help_text_core(this: &Self) -> Option<String>
fn parent_get_help_text_core(this: &Self) -> Option<String>
Source§fn parent_get_placeholder_text_core(this: &Self) -> Option<String>
fn parent_get_placeholder_text_core(this: &Self) -> Option<String>
Source§fn parent_get_landmark_type_core(this: &Self) -> Option<AutomationLandmarkType>
fn parent_get_landmark_type_core(this: &Self) -> Option<AutomationLandmarkType>
Source§fn parent_get_heading_level_core(this: &Self) -> i32
fn parent_get_heading_level_core(this: &Self) -> i32
Source§fn parent_get_item_type_core(this: &Self) -> Option<String>
fn parent_get_item_type_core(this: &Self) -> Option<String>
Source§fn parent_get_item_status_core(this: &Self) -> Option<String>
fn parent_get_item_status_core(this: &Self) -> Option<String>
Source§fn parent_get_parent_core(this: &Self) -> Option<Ref<AutomationPeer>>
fn parent_get_parent_core(this: &Self) -> Option<Ref<AutomationPeer>>
Source§fn parent_has_keyboard_focus_core(this: &Self) -> bool
fn parent_has_keyboard_focus_core(this: &Self) -> bool
Source§fn parent_is_content_element_core(this: &Self) -> bool
fn parent_is_content_element_core(this: &Self) -> bool
Source§fn parent_is_control_element_core(this: &Self) -> bool
fn parent_is_control_element_core(this: &Self) -> bool
Source§fn parent_is_enabled_core(this: &Self) -> bool
fn parent_is_enabled_core(this: &Self) -> bool
Source§fn parent_is_keyboard_focusable_core(this: &Self) -> bool
fn parent_is_keyboard_focusable_core(this: &Self) -> bool
Source§fn parent_is_offscreen_core(this: &Self) -> bool
fn parent_is_offscreen_core(this: &Self) -> bool
Source§fn parent_set_focus_core(this: &Self)
fn parent_set_focus_core(this: &Self)
Source§fn parent_get_live_setting_core(this: &Self) -> AutomationLiveSetting
fn parent_get_live_setting_core(this: &Self) -> AutomationLiveSetting
Source§fn parent_get_control_type_override_core(this: &Self) -> AutomationControlType
fn parent_get_control_type_override_core(this: &Self) -> AutomationControlType
Source§fn parent_get_class_name_override_core(this: &Self) -> String
fn parent_get_class_name_override_core(this: &Self) -> String
Source§fn parent_get_automation_root_core(this: &Self) -> Option<Ref<AutomationPeer>>
fn parent_get_automation_root_core(this: &Self) -> Option<Ref<AutomationPeer>>
Source§fn parent_get_visual_root_core(this: &Self) -> Option<Ref<AutomationPeer>>
fn parent_get_visual_root_core(this: &Self) -> Option<Ref<AutomationPeer>>
Source§fn parent_to_screen_core(this: &Self, rect: Rect) -> Option<Rect>
fn parent_to_screen_core(this: &Self, rect: Rect) -> Option<Rect>
Source§fn parent_is_content_element_override_core(this: &Self) -> bool
fn parent_is_content_element_override_core(this: &Self) -> bool
Source§fn parent_is_control_element_override_core(this: &Self) -> bool
fn parent_is_control_element_override_core(this: &Self) -> bool
Source§fn parent_get_provider_core(
this: &Self,
provider_type: ValueType,
) -> Option<Rc<dyn AnyValue>>
fn parent_get_provider_core( this: &Self, provider_type: ValueType, ) -> Option<Rc<dyn AnyValue>>
Source§fn parent_try_set_parent(
this: &Self,
parent: Option<Ref<AutomationPeer>>,
) -> bool
fn parent_try_set_parent( this: &Self, parent: Option<Ref<AutomationPeer>>, ) -> bool
Source§fn parent_is_element_available_core(this: &Self) -> bool
fn parent_is_element_available_core(this: &Self) -> bool
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more