Skip to main content

CommandBar

Struct CommandBar 

Source
pub struct CommandBar { /* private fields */ }
Expand description

A command bar that provides primary commands displayed inline and secondary commands accessible via an overflow menu.

Implementations§

Source§

impl CommandBar

Source

pub const TYPE: &'static TypeInfo = <CommandBar as ::ferroui_base::StaticType>::TYPE

The runtime type of this class.

Source

pub fn to_ref(&self) -> Ref<CommandBar>

Returns a strong reference to this object.

Source§

impl CommandBar

Source

pub fn primary_commands_property() -> &'static StyledProperty<Option<CommandBarElementList>>

Defines the PrimaryCommands property.

Source

pub fn secondary_commands_property() -> &'static StyledProperty<Option<CommandBarElementList>>

Defines the SecondaryCommands property.

Source

pub fn content_property() -> &'static StyledProperty<Option<BoxedValue>>

Defines the Content property.

Source

pub fn default_label_position_property() -> &'static StyledProperty<CommandBarDefaultLabelPosition>

Defines the DefaultLabelPosition property.

Source

pub fn is_dynamic_overflow_enabled_property() -> &'static StyledProperty<bool>

Defines the IsDynamicOverflowEnabled property.

Source

pub fn overflow_button_visibility_property() -> &'static StyledProperty<CommandBarOverflowButtonVisibility>

Defines the OverflowButtonVisibility property.

Source

pub fn is_open_property() -> &'static StyledProperty<bool>

Defines the IsOpen property.

Source

pub fn is_sticky_property() -> &'static StyledProperty<bool>

Defines the IsSticky property.

Source

pub fn item_width_bottom_property() -> &'static StyledProperty<f64>

Defines the ItemWidthBottom property.

Source

pub fn item_width_right_property() -> &'static StyledProperty<f64>

Defines the ItemWidthRight property.

Source

pub fn item_width_collapsed_property() -> &'static StyledProperty<f64>

Defines the ItemWidthCollapsed property.

Source

pub fn has_secondary_commands_property() -> &'static DirectProperty<CommandBar, bool>

Defines the HasSecondaryCommands property.

Source

pub fn is_overflow_button_visible_property() -> &'static DirectProperty<CommandBar, bool>

Defines the IsOverflowButtonVisible property.

Source§

impl CommandBar

Source

pub fn opening_event() -> &'static RoutedEvent<RoutedEventArgs>

Defines the Opening routed event.

Source

pub fn opened_event() -> &'static RoutedEvent<RoutedEventArgs>

Defines the Opened routed event.

Source

pub fn closing_event() -> &'static RoutedEvent<RoutedEventArgs>

Defines the Closing routed event.

Source

pub fn closed_event() -> &'static RoutedEvent<RoutedEventArgs>

Defines the Closed routed event.

Source

pub fn construct() -> Self

Creates the class data; see ferroui_base::FerroObject::construct.

Source

pub fn new() -> Ref<Self>

Creates a command bar.

Source

pub fn visible_primary_commands(&self) -> CommandBarElementCollection

Gets the read-only collection of primary commands currently visible in the bar (may be a subset when dynamic overflow is active).

Source

pub fn overflow_items(&self) -> CommandBarElementCollection

Gets the read-only collection of items shown in the overflow popup (secondary commands plus any primary commands moved to overflow by dynamic overflow).

Source

pub fn primary_commands(&self) -> CommandBarElementList

Gets the collection of primary commands displayed in the bar. A bar without a collection is given a new one.

Source

pub fn set_primary_commands(&self, value: Option<CommandBarElementList>)

Sets the collection of primary commands displayed in the bar.

Source

pub fn secondary_commands(&self) -> CommandBarElementList

Gets the collection of secondary commands shown in the overflow menu. A bar without a collection is given a new one.

Source

pub fn set_secondary_commands(&self, value: Option<CommandBarElementList>)

Sets the collection of secondary commands shown in the overflow menu.

Source

pub fn content(&self) -> Option<BoxedValue>

Gets the custom content displayed at the start (left) of the bar.

Source

pub fn set_content(&self, value: Option<BoxedValue>)

Sets the custom content displayed at the start (left) of the bar.

Source

pub fn default_label_position(&self) -> CommandBarDefaultLabelPosition

Gets how labels are positioned on command buttons.

Source

pub fn set_default_label_position(&self, value: CommandBarDefaultLabelPosition)

Sets how labels are positioned on command buttons.

Source

pub fn is_dynamic_overflow_enabled(&self) -> bool

Gets whether primary commands are automatically moved to the overflow menu when there is not enough space to display them.

Source

pub fn set_is_dynamic_overflow_enabled(&self, value: bool)

Sets whether primary commands are automatically moved to the overflow menu when there is not enough space to display them.

Source

pub fn overflow_button_visibility(&self) -> CommandBarOverflowButtonVisibility

Gets the visibility of the overflow button.

Source

pub fn set_overflow_button_visibility( &self, value: CommandBarOverflowButtonVisibility, )

Sets the visibility of the overflow button.

Source

pub fn is_open(&self) -> bool

Gets whether the overflow menu is open.

Source

pub fn set_is_open(&self, value: bool)

Sets whether the overflow menu is open.

Source

pub fn is_sticky(&self) -> bool

Gets whether the overflow menu stays open after a command is invoked (disables light-dismiss behavior).

Source

pub fn set_is_sticky(&self, value: bool)

Sets whether the overflow menu stays open after a command is invoked (disables light-dismiss behavior).

Source

pub fn item_width_bottom(&self) -> f64

Gets the estimated item width used in dynamic-overflow calculations when the default label position is CommandBarDefaultLabelPosition::Bottom.

Source

pub fn set_item_width_bottom(&self, value: f64)

Sets the estimated item width used when the labels are at the bottom.

Source

pub fn item_width_right(&self) -> f64

Gets the estimated item width used in dynamic-overflow calculations when the default label position is CommandBarDefaultLabelPosition::Right.

Source

pub fn set_item_width_right(&self, value: f64)

Sets the estimated item width used when the labels are on the right.

Source

pub fn item_width_collapsed(&self) -> f64

Gets the estimated item width used in dynamic-overflow calculations when the default label position is CommandBarDefaultLabelPosition::Collapsed.

Source

pub fn set_item_width_collapsed(&self, value: f64)

Sets the estimated item width used when the labels are collapsed.

Source

pub fn has_secondary_commands(&self) -> bool

Gets whether there are any commands (secondary or overflowed primary) in the overflow menu.

Source

pub fn is_overflow_button_visible(&self) -> bool

Gets whether the overflow button is currently visible.

Source

pub fn opening( &self, handler: impl Fn(&Interactive, &RoutedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the overflow menu is about to open.

Source

pub fn opened( &self, handler: impl Fn(&Interactive, &RoutedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the overflow menu has opened.

Source

pub fn closing( &self, handler: impl Fn(&Interactive, &RoutedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the overflow menu is about to close.

Source

pub fn closed( &self, handler: impl Fn(&Interactive, &RoutedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the overflow menu has closed.

Methods from Deref<Target = TemplatedControl>§

Source

pub fn to_ref(&self) -> Ref<TemplatedControl>

Returns a strong reference to this object.

Source

pub fn on_apply_template(&self, e: &TemplateAppliedEventArgs)

Called when the control’s template is applied.

In simple terms, this means the method is called just before the control is displayed.

Source

pub fn on_template_changed(&self, e: &FerroPropertyChangedEventArgs<'_>)

Called when the Template property changes.

Source

pub fn template_applied( &self, handler: impl Fn(&Interactive, &TemplateAppliedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Raised when the control’s template is applied.

Source

pub fn background(&self) -> Option<Rc<dyn IBrush>>

The brush used to draw the control’s background.

Source

pub fn set_background(&self, value: Option<Rc<dyn IBrush>>)

Source

pub fn background_sizing(&self) -> BackgroundSizing

How the control’s background is drawn relative to the control’s border.

Source

pub fn set_background_sizing(&self, value: BackgroundSizing)

Source

pub fn border_brush(&self) -> Option<Rc<dyn IBrush>>

The brush used to draw the control’s border.

Source

pub fn set_border_brush(&self, value: Option<Rc<dyn IBrush>>)

Source

pub fn border_thickness(&self) -> Thickness

The thickness of the control’s border.

Source

pub fn set_border_thickness(&self, value: Thickness)

Source

pub fn corner_radius(&self) -> CornerRadius

The radius of the border rounded corners.

Source

pub fn set_corner_radius(&self, value: CornerRadius)

Source

pub fn font_family(&self) -> FontFamily

The font family used to draw the control’s text.

Source

pub fn set_font_family(&self, value: FontFamily)

Source

pub fn font_features(&self) -> Option<FontFeatureCollection>

The font features turned on/off.

Source

pub fn set_font_features(&self, value: Option<FontFeatureCollection>)

Source

pub fn font_size(&self) -> f64

The size of the control’s text in points.

Source

pub fn set_font_size(&self, value: f64)

Source

pub fn font_style(&self) -> FontStyle

The font style used to draw the control’s text.

Source

pub fn set_font_style(&self, value: FontStyle)

Source

pub fn font_weight(&self) -> FontWeight

The font weight used to draw the control’s text.

Source

pub fn set_font_weight(&self, value: FontWeight)

Source

pub fn font_stretch(&self) -> FontStretch

The font stretch used to draw the control’s text.

Source

pub fn set_font_stretch(&self, value: FontStretch)

Source

pub fn foreground(&self) -> Option<Rc<dyn IBrush>>

The brush used to draw the control’s text and other foreground elements.

Source

pub fn set_foreground(&self, value: Option<Rc<dyn IBrush>>)

Source

pub fn letter_spacing(&self) -> f64

The letter spacing for the control’s text content.

Source

pub fn set_letter_spacing(&self, value: f64)

Source

pub fn padding(&self) -> Thickness

The padding placed between the border of the control and its content.

Source

pub fn set_padding(&self, value: Thickness)

Source

pub fn template(&self) -> Option<Rc<dyn IControlTemplate>>

The template that defines the control’s appearance.

Source

pub fn set_template(&self, value: Option<Rc<dyn IControlTemplate>>)

Source

pub fn get_template_children(&self) -> Vec<Ref<Control>>

👎Deprecated:

Use get_template_descendants

Gets the list of all control descendants that are part of the template of this control: the template descendants that are controls.

Source

pub fn get_template_descendants(&self) -> Vec<Ref<Visual>>

Gets a visual tree’s template descendants: the visual descendants whose templated parent is this control.

Methods from Deref<Target = Control>§

Source

pub fn find_data_template( &self, data: Option<&BoxedValue>, primary: Option<&Rc<dyn IDataTemplate>>, ) -> Option<Rc<dyn IDataTemplate>>

Find a data template that matches a piece of data.

primary is an optional primary template that can display the data. Returns the data template or None if no matching data template was found.

Source

pub fn to_ref(&self) -> Ref<Control>

Returns a strong reference to this object.

Source

pub fn get_template_focus_target(&self) -> Option<Ref<Control>>

Gets the element that receives the focus adorner.

Source

pub fn on_loaded(&self, e: &RoutedEventArgs)

Raises the Loaded event.

Source

pub fn on_unloaded(&self, e: &RoutedEventArgs)

Raises the Unloaded event.

Source

pub fn on_size_changed(&self, e: &SizeChangedEventArgs)

Raises the SizeChanged event.

Source

pub fn on_create_automation_peer(&self) -> Ref<AutomationPeer>

Returns a new, type-specific automation peer implementation for the control.

Source

pub fn focus_adorner(&self) -> Option<Rc<dyn ITemplateOf<Option<Ref<Control>>>>>

The control’s focus adorner.

Source

pub fn set_focus_adorner( &self, value: Option<Rc<dyn ITemplateOf<Option<Ref<Control>>>>>, )

Source

pub fn data_templates(&self) -> DataTemplates

The data templates for the control.

Each control may define data templates which are applied to the control itself and its children.

Source

pub fn is_data_templates_initialized(&self) -> bool

Whether the data templates collection has been created.

Source

pub fn context_menu(&self) -> Option<Ref<ContextMenu>>

A context menu to the control.

Source

pub fn set_context_menu(&self, value: impl Into<Nullable<ContextMenu>>)

Source

pub fn context_flyout(&self) -> Option<Ref<FlyoutBase>>

A context flyout to the control.

Source

pub fn set_context_flyout(&self, value: impl Into<Nullable<FlyoutBase>>)

Source

pub fn is_loaded(&self) -> bool

Whether the control is fully constructed in the visual tree and both layout and render are complete.

This is set to true while raising the Loaded event.

Source

pub fn tag(&self) -> Option<BoxedValue>

A user-defined object attached to the control.

Source

pub fn set_tag(&self, value: Option<BoxedValue>)

Source

pub fn loaded( &self, handler: impl Fn(&Interactive, &RoutedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the control has been fully constructed in the visual tree and both layout and render are complete.

This event is guaranteed to occur after the control template is applied and references to objects created after the template is applied are available. This makes it different from on_attached_to_visual_tree which doesn’t have these references. This event occurs at the latest possible time in the control creation life-cycle.

Source

pub fn unloaded( &self, handler: impl Fn(&Interactive, &RoutedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the control is removed from the visual tree.

This is API symmetrical with loaded and exists for compatibility with other XAML frameworks; however, it behaves the same as on_detached_from_visual_tree.

Source

pub fn size_changed( &self, handler: impl Fn(&Interactive, &SizeChangedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the bounds (actual size) of the control have changed.

Source

pub fn ensure_initialized(&self)

Ensures that the control is initialized and laid out when it is used as the source of a visual brush while not attached to a visual root.

Source

pub fn bring_into_view(&self)

Tries to bring the control into view.

Source

pub fn bring_into_view_rect(&self, rect: Rect)

Tries to bring the control into view.

rect is the area of the control to being into view.

Source

pub fn find_control<T: ObjectType>(&self, name: &str) -> Option<Ref<T>>

Finds the named control in the scope of the specified control.

Returns the control or None if not found; panics if the control has no parent name scope or the named control is of a different class.

Source

pub fn get_control<T: ObjectType>(&self, name: &str) -> Ref<T>

Gets the named control in the scope of the specified control.

Panics if the control has no parent name scope or the named control is not found.

Source

pub fn set_pseudo_class_from( &self, name: &str, trigger: &dyn IObservable<bool>, ) -> Rc<dyn IDisposable>

Sets a pseudoclass of the control depending on an observable trigger.

Returns a disposable used to cancel the subscription.

Methods from Deref<Target = InputElement>§

Source

pub fn to_ref(&self) -> Ref<InputElement>

Returns a strong reference to this object.

Source

pub fn is_enabled_core(&self) -> bool

Whether the control is enabled, as far as the control itself is concerned. The default is the value of is_enabled; controls with additional conditions (e.g. a command that cannot execute) override this.

Source

pub fn is_focus_scope(&self) -> bool

Whether the element is a focus scope: an element that remembers which of its descendants was focused last.

Source

pub fn on_getting_focus(&self, e: &FocusChangingEventArgs)

Called when the control or one of its child elements is about to get focus.

Source

pub fn on_losing_focus(&self, e: &FocusChangingEventArgs)

Called when the control or one of its child elements is about to lose focus.

Source

pub fn on_got_focus(&self, e: &FocusChangedEventArgs)

Called when the control or one of its child elements gets focus.

Source

pub fn on_lost_focus(&self, e: &FocusChangedEventArgs)

Called when the control or one of its child elements loses focus.

Source

pub fn on_key_down(&self, e: &KeyEventArgs)

Called before the key down event occurs.

Source

pub fn on_key_up(&self, e: &KeyEventArgs)

Called before the key up event occurs.

Source

pub fn on_text_input(&self, e: &TextInputEventArgs)

Called before the text input event occurs.

Source

pub fn on_pointer_entered(&self, e: &PointerEventArgs)

Called before the pointer entered event occurs.

Source

pub fn on_pointer_exited(&self, e: &PointerEventArgs)

Called before the pointer exited event occurs.

Source

pub fn on_pointer_moved(&self, e: &PointerEventArgs)

Called before the pointer moved event occurs.

Source

pub fn on_pointer_pressed(&self, e: &PointerPressedEventArgs)

Called before the pointer pressed event occurs.

Source

pub fn on_pointer_released(&self, e: &PointerReleasedEventArgs)

Called before the pointer released event occurs.

Source

pub fn on_pointer_capture_changing(&self, e: &PointerCaptureChangingEventArgs)

Called when the capture of a pointer is about to change on the control or one of its descendants.

Source

pub fn on_pointer_capture_lost(&self, e: &PointerCaptureLostEventArgs)

Called before the pointer capture lost event occurs.

Source

pub fn on_pointer_wheel_changed(&self, e: &PointerWheelEventArgs)

Called before the pointer wheel changed event occurs.

Source

pub fn on_tapped(&self, e: &TappedEventArgs)

Called when a tap gesture occurs on the control.

Source

pub fn on_right_tapped(&self, e: &TappedEventArgs)

Called when a right tap gesture occurs on the control.

Source

pub fn on_double_tapped(&self, e: &TappedEventArgs)

Called when a double-tap gesture occurs on the control.

Source

pub fn on_holding(&self, e: &HoldingRoutedEventArgs)

Called when a hold gesture occurs on the control.

Source

pub fn on_access_key(&self, e: &(dyn IRoutedEventArgs + 'static))

Called when the access key of the control is pressed. The default focuses the control.

Source

pub fn get_next_tab_stop_override(&self) -> Option<Ref<InputElement>>

Called when focus is moving forward out of this element: lets it name the element that should receive focus next.

Source

pub fn get_previous_tab_stop_override(&self) -> Option<Ref<InputElement>>

Called when focus is moving backward out of this element: lets it name the element that should receive focus next.

Source

pub fn get_first_focusable_element_override(&self) -> Option<Ref<InputElement>>

Lets the element name the first focusable element within it.

Source

pub fn get_last_focusable_element_override(&self) -> Option<Ref<InputElement>>

Lets the element name the last focusable element within it.

Source

pub fn process_tab_stop_override( &self, focused_element: Option<&Ref<InputElement>>, candidate_tab_stop_element: Option<&Ref<InputElement>>, is_reverse: bool, did_cycle_focus_at_root_visual: bool, new_tab_stop: &mut Option<Ref<InputElement>>, ) -> bool

Lets the element (an ancestor of the focused element) override the tab stop chosen by tab navigation. Returns true when the tab stop is overridden; the override is written to new_tab_stop.

Source

pub fn process_candidate_tab_stop_override( &self, focused_element: Option<&Ref<InputElement>>, candidate_tab_stop_element: Option<&Ref<InputElement>>, overriden_candidate_tab_stop_element: Option<&Ref<InputElement>>, is_reverse: bool, new_tab_stop: &mut Option<Ref<InputElement>>, ) -> bool

Lets the element (an ancestor of the candidate tab stop) override the tab stop chosen by tab navigation. Returns true when the tab stop is overridden; the override is written to new_tab_stop.

Source

pub fn as_custom_keyboard_navigation( &self, ) -> Option<&dyn ICustomKeyboardNavigation>

The element as a custom keyboard navigation handler, if it is one.

Source

pub fn as_scrollable(&self) -> Option<&dyn IScrollable>

The element as a scrollable, if it is one.

Source

pub fn as_hosted_visual_tree_root(&self) -> Option<&dyn IHostedVisualTreeRoot>

The element as the root of a hosted visual tree (such as a popup root), if it is one.

Source

pub fn got_focus( &self, handler: impl Fn(&Interactive, &FocusChangedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the control receives focus.

Source

pub fn getting_focus( &self, handler: impl Fn(&Interactive, &FocusChangingEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs before the control receives focus.

Source

pub fn lost_focus( &self, handler: impl Fn(&Interactive, &FocusChangedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the control loses focus.

Source

pub fn losing_focus( &self, handler: impl Fn(&Interactive, &FocusChangingEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs before the control loses focus.

Source

pub fn key_down( &self, handler: impl Fn(&Interactive, &KeyEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when a key is pressed while the control has focus.

Source

pub fn key_up( &self, handler: impl Fn(&Interactive, &KeyEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when a key is released while the control has focus.

Source

pub fn text_input( &self, handler: impl Fn(&Interactive, &TextInputEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when a user typed some text while the control has focus.

Source

pub fn text_input_method_client_requested( &self, handler: impl Fn(&Interactive, &TextInputMethodClientRequestedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when an input element gains input focus and the input method is looking for the corresponding client.

Source

pub fn pointer_entered( &self, handler: impl Fn(&Interactive, &PointerEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the pointer enters the control.

Source

pub fn pointer_exited( &self, handler: impl Fn(&Interactive, &PointerEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the pointer leaves the control.

Source

pub fn pointer_moved( &self, handler: impl Fn(&Interactive, &PointerEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the pointer moves over the control.

Source

pub fn pointer_pressed( &self, handler: impl Fn(&Interactive, &PointerPressedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the pointer is pressed over the control.

Source

pub fn pointer_released( &self, handler: impl Fn(&Interactive, &PointerReleasedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the pointer is released over the control.

Source

pub fn pointer_capture_changing( &self, handler: impl Fn(&Interactive, &PointerCaptureChangingEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the capture of a pointer is about to change on the control.

Source

pub fn pointer_capture_lost( &self, handler: impl Fn(&Interactive, &PointerCaptureLostEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the control or its child control loses the pointer capture for any reason; the event will not be triggered for a parent control if capture was transferred to another child of that parent control.

Source

pub fn pointer_wheel_changed( &self, handler: impl Fn(&Interactive, &PointerWheelEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the mouse is scrolled over the control.

Source

pub fn context_requested( &self, handler: impl Fn(&Interactive, &ContextRequestedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user has completed a context input gesture, such as a right-click.

Source

pub fn context_canceled( &self, handler: impl Fn(&Interactive, &RoutedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the context input gesture continues into another gesture, to notify the element that the context flyout should not be opened.

Source

pub fn focusable(&self) -> bool

Whether the control can receive focus.

Source

pub fn set_focusable(&self, value: bool)

Source

pub fn is_enabled(&self) -> bool

Whether the control is enabled for user interaction.

Source

pub fn set_is_enabled(&self, value: bool)

Source

pub fn cursor(&self) -> Option<Rc<Cursor>>

The associated mouse cursor.

Source

pub fn set_cursor(&self, value: Option<Rc<Cursor>>)

Source

pub fn is_keyboard_focus_within(&self) -> bool

Whether keyboard focus is anywhere within the element or its visual tree child elements.

Source

pub fn is_focused(&self) -> bool

Whether the control is focused.

Source

pub fn is_hit_test_visible(&self) -> bool

Whether the control is considered for hit testing.

Source

pub fn set_is_hit_test_visible(&self, value: bool)

Source

pub fn is_pointer_over(&self) -> bool

Whether the pointer is currently over the control.

Source

pub fn is_tab_stop(&self) -> bool

Whether the control is included in tab navigation.

Source

pub fn set_is_tab_stop(&self, value: bool)

Source

pub fn is_effectively_enabled(&self) -> bool

Whether this control and all its parents are enabled.

Source

pub fn tab_index(&self) -> i32

A value that determines the order in which elements receive focus when the user navigates through controls by pressing the Tab key.

Source

pub fn set_tab_index(&self, value: i32)

Source

pub fn key_bindings(&self) -> FerroList<Ref<KeyBinding>>

The key bindings for this input element.

The list is returned by handle: clones refer to the same list.

Source

pub fn gesture_recognizers(&self) -> GestureRecognizerCollection

The gesture recognizers attached to this input element.

Source

pub fn focus(&self) -> bool

Focuses the control, with an unspecified navigation method and no key modifiers. Returns whether the control was focused.

Source

pub fn focus_with( &self, method: NavigationMethod, key_modifiers: KeyModifiers, ) -> bool

Focuses the control.

method is the method by which focus was changed and key_modifiers any key modifiers active at the time of focus. Returns whether the control was focused.

Source

pub fn update_is_effectively_enabled(&self)

Updates the is_effectively_enabled property based on the parent’s is_effectively_enabled.

Source

pub fn pinch( &self, handler: impl Fn(&Interactive, &PinchEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user moves two contact points closer together.

Source

pub fn pinch_ended( &self, handler: impl Fn(&Interactive, &PinchEndedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user releases both contact points used in a pinch gesture.

Source

pub fn pull_gesture( &self, handler: impl Fn(&Interactive, &PullGestureEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user drags from the edge of a control.

Source

pub fn pull_gesture_ended( &self, handler: impl Fn(&Interactive, &PullGestureEndedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user releases the pointer after a pull gesture.

Source

pub fn scroll_gesture( &self, handler: impl Fn(&Interactive, &ScrollGestureEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user continuously moves the pointer in the same direction within the control’s boundaries.

Source

pub fn scroll_gesture_inertia_starting( &self, handler: impl Fn(&Interactive, &ScrollGestureInertiaStartingEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs within the control’s boundaries when a scroll gesture’s inertia begins.

Source

pub fn scroll_gesture_ended( &self, handler: impl Fn(&Interactive, &ScrollGestureEndedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when a scroll gesture ends.

Source

pub fn pointer_touch_pad_gesture_magnify( &self, handler: impl Fn(&Interactive, &PointerDeltaEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user moves two contact points away from each other on a touchpad.

Source

pub fn pointer_touch_pad_gesture_rotate( &self, handler: impl Fn(&Interactive, &PointerDeltaEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user places two contact points and moves them in a circular motion on a touchpad.

Source

pub fn swipe_gesture( &self, handler: impl Fn(&Interactive, &SwipeGestureEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user rapidly drags the pointer in a single direction across the control.

Source

pub fn swipe_gesture_ended( &self, handler: impl Fn(&Interactive, &SwipeGestureEndedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when a swipe gesture ends on the control.

Source

pub fn pointer_touch_pad_gesture_swipe( &self, handler: impl Fn(&Interactive, &PointerDeltaEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user rapidly drags the pointer in a single direction on a touchpad.

Source

pub fn tapped( &self, handler: impl Fn(&Interactive, &TappedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user briefly contacts and releases a single point on the control.

Source

pub fn right_tapped( &self, handler: impl Fn(&Interactive, &TappedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user briefly contacts and releases a single point on the control using the secondary action.

Source

pub fn holding( &self, handler: impl Fn(&Interactive, &HoldingRoutedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user makes a single contact, then maintains contact beyond a given time threshold without releasing or making another contact.

Source

pub fn double_tapped( &self, handler: impl Fn(&Interactive, &TappedEventArgs) + 'static, ) -> RoutedEventHandlerToken

Occurs when the user briefly contacts and releases twice on a single point, without significant movement between contacts.

Source

pub fn get_input_elements_at(&self, p: Point) -> Vec<Ref<InputElement>>

Returns the active input elements at a point on the element, in the element’s coordinates, topmost first. Only enabled elements are considered.

Source

pub fn get_input_elements_at_with( &self, p: Point, enabled_elements_only: bool, ) -> Vec<Ref<InputElement>>

Returns the active input elements at a point on the element, in the element’s coordinates, topmost first.

enabled_elements_only tells whether only enabled elements should be considered.

Source

pub fn get_input_elements_at_geometry( &self, geometry: &Geometry, enabled_elements_only: bool, ) -> Vec<GeometryHitTestResult>

Returns the active input elements intersecting a geometry on the element, in the element’s coordinates, topmost first, with the details of the intersections.

enabled_elements_only tells whether only enabled elements should be considered.

Source

pub fn input_hit_test(&self, p: Point) -> Option<Ref<InputElement>>

Returns the topmost active input element at a point on the element, in the element’s coordinates. Only enabled elements are considered.

Source

pub fn input_hit_test_with( &self, p: Point, enabled_elements_only: bool, ) -> Option<Ref<InputElement>>

Returns the topmost active input element at a point on the element, in the element’s coordinates.

enabled_elements_only tells whether only enabled elements should be considered.

Source

pub fn input_hit_test_geometry( &self, geometry: &Geometry, enabled_elements_only: bool, ) -> Option<GeometryHitTestResult>

Returns the topmost active input element intersecting a geometry on the element, in the element’s coordinates, with the details of the intersection.

enabled_elements_only tells whether only enabled elements should be considered.

Source

pub fn input_hit_test_filtered( &self, p: Point, filter: &dyn Fn(&Visual) -> bool, enabled_elements_only: bool, ) -> Option<Ref<InputElement>>

Returns the topmost active input element at a point on the element that also passes a filter, in the element’s coordinates.

If filter returns false for a visual then the visual and all its descendants are excluded from the results. enabled_elements_only tells whether only enabled elements should be considered.

Source

pub fn input_hit_test_geometry_filtered( &self, geometry: &Geometry, filter: &dyn Fn(&Visual) -> bool, enabled_elements_only: bool, ) -> Option<Ref<InputElement>>

Returns the topmost active input element intersecting a geometry on the element that also passes a filter, in the element’s coordinates.

If filter returns false for a visual then the visual and all its descendants are excluded from the results. enabled_elements_only tells whether only enabled elements should be considered.

Methods from Deref<Target = Interactive>§

Source

pub fn to_ref(&self) -> Ref<Interactive>

Returns a strong reference to this object.

Source

pub fn interactive_parent(&self) -> Option<Ref<Interactive>>

The interactive parent of the object for bubbling and tunneling events. By default this is the visual parent, when it is an interactive.

Source

pub fn add_handler<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, handler: impl Fn(&Interactive, &TEventArgs) + 'static, ) -> RoutedEventHandlerToken
where TEventArgs: IRoutedEventArgs,

Adds a handler for a routed event, listening to the direct and bubble routes of unhandled events.

Returns a token for remove_handler.

Source

pub fn add_handler_with<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, handler: impl Fn(&Interactive, &TEventArgs) + 'static, routes: RoutingStrategies, handled_events_too: bool, ) -> RoutedEventHandlerToken
where TEventArgs: IRoutedEventArgs,

Adds a handler for a routed event.

routes selects the routing strategies to listen to, and handled_events_too whether the handler is also invoked for events that are already handled. The handler receives the element it is attached to and the event args.

Source

pub fn add_handler_as<THandlerArgs, TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, handler: impl Fn(&Interactive, &THandlerArgs) + 'static, routes: RoutingStrategies, handled_events_too: bool, ) -> RoutedEventHandlerToken
where THandlerArgs: IRoutedEventArgs, TEventArgs: ?Sized,

Adds a handler written against args type THandlerArgs to any routed event whose args type is THandlerArgs or derives from it.

This is how a handler taking the base RoutedEventArgs is attached to an event with more specific args, and how handlers are attached to an untyped RoutedEvent.

Panics if the event’s args type does not derive from THandlerArgs.

Source

pub fn add_handler_untyped<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, handler: MarkupDelegate, routes: RoutingStrategies, handled_events_too: bool, ) -> RoutedEventHandlerToken
where TEventArgs: ?Sized,

Adds an untyped handler for a routed event: what markup attaches for an event attribute.

The handler is called with two untyped values: the element it is attached to (a Ref<Interactive>) and a shared handle to the event args (an Rc<dyn IRoutedEventArgs>, see IRoutedEventArgs::share). The handle refers to the live args: marking it as handled marks the event as handled for the handlers further along the route.

Source

pub fn add_route_handler<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, handler: Rc<dyn Fn(&Interactive, &(dyn IRoutedEventArgs + 'static))>, routes: RoutingStrategies, handled_events_too: bool, ) -> RoutedEventHandlerToken
where TEventArgs: ?Sized,

Adds an already adapted handler for a routed event.

Source

pub fn remove_handler<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, handler: RoutedEventHandlerToken, ) -> bool
where TEventArgs: ?Sized,

Removes a handler for a routed event. Returns whether the handler was attached.

Source

pub fn raise_event(&self, e: &(dyn IRoutedEventArgs + 'static))

Raises a routed event.

Panics if the args have no routed event.

Source

pub fn build_event_route<TEventArgs>( &self, e: &RoutedEvent<TEventArgs>, ) -> EventRoute
where TEventArgs: ?Sized,

Builds an event route for a routed event: the handlers the event would visit if raised on this object, in bubbling order.

Source

pub fn add_disposable_handler<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, handler: impl Fn(&Interactive, &TEventArgs) + 'static, ) -> Rc<dyn IDisposable>
where TEventArgs: IRoutedEventArgs,

Adds a handler for a routed event (direct and bubble routes, unhandled events) and returns a disposable that removes the handler when disposed.

Source

pub fn add_disposable_handler_with<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, handler: impl Fn(&Interactive, &TEventArgs) + 'static, routes: RoutingStrategies, handled_events_too: bool, ) -> Rc<dyn IDisposable>
where TEventArgs: IRoutedEventArgs,

Adds a handler for a routed event and returns a disposable that removes the handler when disposed.

Source

pub fn get_interactive_parent(&self) -> Option<Ref<Interactive>>

The interactive parent of the object for bubbling and tunneling events.

Source

pub fn get_observable<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, ) -> Rc<dyn IObservable<TEventArgs>>
where TEventArgs: IRoutedEventArgs + Clone,

Gets an observable for a routed event (direct and bubble routes, unhandled events).

See get_observable_with.

Source

pub fn get_observable_with<TEventArgs>( &self, routed_event: &RoutedEvent<TEventArgs>, routes: RoutingStrategies, handled_events_too: bool, ) -> Rc<dyn IObservable<TEventArgs>>
where TEventArgs: IRoutedEventArgs + Clone,

Gets an observable for a routed event.

Observers receive a copy of the args of every raise. The copy reflects the routing state at the time of the notification; marking the copy as handled does not affect the event being routed. Use a handler for that.

Methods from Deref<Target = Layoutable>§

Source

pub fn to_ref(&self) -> Ref<Layoutable>

Returns a strong reference to this object.

Source

pub fn apply_template(&self)

Creates the visual children of the control, if necessary.

Source

pub fn measure_core(&self, available_size: Size) -> Size

The default implementation of the control’s measure pass.

This calculates the desired size taking into account the control’s margin and min/max/explicit size, and calls measure_override for the content. Usually measure_override is what you want to override.

Source

pub fn measure_override(&self, available_size: Size) -> Size

Measures the control and its child elements as part of a layout pass. Returns the size the control would like to be.

Source

pub fn arrange_core(&self, final_rect: Rect)

The default implementation of the control’s arrange pass.

This calculates the final bounds taking into account the control’s margin, alignment and size constraints, and calls arrange_override for the content. Usually arrange_override is what you want to override.

Source

pub fn arrange_override(&self, final_size: Size) -> Size

Positions child elements as part of a layout pass. Returns the size used.

Source

pub fn on_measure_invalidated(&self)

Called by invalidate_measure.

Source

pub fn effective_viewport_changed( &self, handler: impl Fn(&EffectiveViewportChangedEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Occurs when the element’s effective viewport changes.

Source

pub fn layout_updated( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>

Occurs when a layout pass completes for the control.

Source

pub fn update_layout(&self)

Executes a layout pass.

You should not usually need to call this method explicitly: the layout manager schedules layout passes itself.

Source

pub fn width(&self) -> f64

The width of the element.

Source

pub fn set_width(&self, value: f64)

Source

pub fn height(&self) -> f64

The height of the element.

Source

pub fn set_height(&self, value: f64)

Source

pub fn min_width(&self) -> f64

The minimum width of the element.

Source

pub fn set_min_width(&self, value: f64)

Source

pub fn max_width(&self) -> f64

The maximum width of the element.

Source

pub fn set_max_width(&self, value: f64)

Source

pub fn min_height(&self) -> f64

The minimum height of the element.

Source

pub fn set_min_height(&self, value: f64)

Source

pub fn max_height(&self) -> f64

The maximum height of the element.

Source

pub fn set_max_height(&self, value: f64)

Source

pub fn margin(&self) -> Thickness

The margin around the element.

Source

pub fn set_margin(&self, value: Thickness)

Source

pub fn horizontal_alignment(&self) -> HorizontalAlignment

The element’s preferred horizontal alignment in its parent.

Source

pub fn set_horizontal_alignment(&self, value: HorizontalAlignment)

Source

pub fn vertical_alignment(&self) -> VerticalAlignment

The element’s preferred vertical alignment in its parent.

Source

pub fn set_vertical_alignment(&self, value: VerticalAlignment)

Source

pub fn desired_size(&self) -> Size

The size that this element computed during the measure pass of the layout process.

Source

pub fn is_measure_valid(&self) -> bool

Whether the control’s layout measure is valid.

Source

pub fn is_arrange_valid(&self) -> bool

Whether the control’s layout arrange is valid.

Source

pub fn use_layout_rounding(&self) -> bool

Whether the control’s layout should be snapped to pixel boundaries.

Source

pub fn set_use_layout_rounding(&self, value: bool)

Source

pub fn previous_measure(&self) -> Option<Size>

The available size passed in the previous layout pass, if any.

Source

pub fn previous_arrange(&self) -> Option<Rect>

The rect passed in the previous layout pass, if any.

Source

pub fn measure(&self, available_size: Size)

Carries out a measure of the control.

Source

pub fn arrange(&self, rect: Rect)

Arranges the control and its children.

Source

pub fn invalidate_measure(&self)

Invalidates the measurement of the control and queues a new layout pass.

Source

pub fn invalidate_arrange(&self)

Invalidates the arrangement of the control and queues a new layout pass.

Methods from Deref<Target = Visual>§

Source

pub fn calculate_distance_from_ancestor( &self, ancestor: Option<&Visual>, ) -> Option<usize>

Calculates the distance from a visual’s ancestor.

Returns the number of steps from the visual to the ancestor, or None if this visual is not a descendent of ancestor. With no ancestor given, never matches and returns None.

Source

pub fn calculate_distance_from_root(&self) -> usize

Calculates the distance from a visual’s root.

Source

pub fn find_common_visual_ancestor( &self, target: &Visual, ) -> Option<Ref<Visual>>

Tries to get the first common ancestor of two visuals.

Source

pub fn get_visual_ancestors(&self) -> VisualAncestors ⓘ

Enumerates the ancestors of the visual in the visual tree.

Source

pub fn get_self_and_visual_ancestors(&self) -> VisualAncestors ⓘ

Enumerates the visual and its ancestors in the visual tree.

Source

pub fn find_ancestor_of_type<T>(&self, include_self: bool) -> Option<Ref<T>>
where T: ObjectType,

Finds the first ancestor of class T, optionally starting with the visual itself.

Source

pub fn find_ancestor_of_type_where<T>( &self, include_self: bool, predicate: impl Fn(&T) -> bool, ) -> Option<Ref<T>>
where T: ObjectType,

Finds the first ancestor of class T that matches a predicate, optionally starting with the visual itself.

Source

pub fn find_descendant_of_type<T>(&self, include_self: bool) -> Option<Ref<T>>
where T: ObjectType,

Finds the first descendant of class T (depth first), optionally starting with the visual itself.

Source

pub fn find_descendant_of_type_where<T>( &self, include_self: bool, predicate: impl Fn(&T) -> bool, ) -> Option<Ref<T>>
where T: ObjectType,

Finds the first descendant of class T that matches a predicate (depth first), optionally starting with the visual itself.

Source

pub fn get_transformed_bounds(&self) -> Option<TransformedBounds>

Gets the bounds of the visual in the coordinate space of its root, with the clip applied by its ancestors. Returns None if the visual or one of its ancestors is invisible.

Source

pub fn get_visual_at(&self, p: Point) -> Option<Ref<Visual>>

Gets the first visible visual at a point, in the coordinates of this visual.

Source

pub fn get_visual_at_filtered( &self, p: Point, filter: &dyn Fn(&Visual) -> bool, ) -> Option<Ref<Visual>>

Gets the first visual at a point, in the coordinates of this visual.

If filter returns false for a visual then the visual and all its descendants are excluded from the results.

Source

pub fn get_visual_at_geometry( &self, geometry: &Geometry, ) -> Option<GeometryHitTestResult>

Gets the first visible visual intersecting a geometry, in the coordinates of this visual, with the details of the intersection.

Source

pub fn get_visual_at_geometry_filtered( &self, geometry: &Geometry, filter: &dyn Fn(&Visual) -> bool, ) -> Option<GeometryHitTestResult>

Gets the first visual intersecting a geometry, in the coordinates of this visual, with the details of the intersection.

If filter returns false for a visual then the visual and all its descendants are excluded from the results.

Source

pub fn get_visuals_at(&self, p: Point) -> Vec<Ref<Visual>>

Enumerates the visible visuals at a point, in the coordinates of this visual, topmost first.

Source

pub fn get_visuals_at_filtered( &self, p: Point, filter: &dyn Fn(&Visual) -> bool, ) -> Vec<Ref<Visual>>

Enumerates the visuals at a point, in the coordinates of this visual, topmost first.

If filter returns false for a visual then the visual and all its descendants are excluded from the results.

Source

pub fn get_visuals_at_geometry( &self, geometry: &Geometry, ) -> Vec<GeometryHitTestResult>

Enumerates the visible visuals intersecting a geometry, in the coordinates of this visual, topmost first, with the details of the intersections.

Source

pub fn get_visuals_at_geometry_filtered( &self, geometry: &Geometry, filter: &dyn Fn(&Visual) -> bool, ) -> Vec<GeometryHitTestResult>

Enumerates the visuals intersecting a geometry, in the coordinates of this visual, topmost first, with the details of the intersections.

If filter returns false for a visual then the visual and all its descendants are excluded from the results.

Source

pub fn get_visual_children(&self) -> Rc<Vec<Ref<Visual>>>

Gets a snapshot of the visual children of the visual.

Source

pub fn get_visual_descendants(&self) -> VisualDescendants ⓘ

Enumerates the descendants of the visual in the visual tree, in depth-first pre-order.

Source

pub fn get_self_and_visual_descendants(&self) -> VisualDescendants ⓘ

Enumerates the visual and its descendants in the visual tree, in depth-first pre-order.

Source

pub fn get_visual_parent(&self) -> Option<Ref<Visual>>

Gets the visual parent of the visual.

Source

pub fn get_visual_parent_of_type<T>(&self) -> Option<Ref<T>>
where T: ObjectType,

Gets the visual parent of the visual, if it is of class T.

Source

pub fn get_presentation_source(&self) -> Option<Rc<dyn IPresentationSource>>

The presentation source the visual is attached to.

Source

pub fn get_visual_root(&self) -> Option<Ref<Visual>>

The root visual of the presentation source the visual is attached to.

Source

pub fn get_layout_root(&self) -> Option<Rc<dyn ILayoutRoot>>

The layout root of the tree the visual is attached to.

Source

pub fn get_layout_manager(&self) -> Option<Rc<dyn ILayoutManager>>

The layout manager of the presentation source of the visual, or None when the visual is not attached to a visual root.

Source

pub fn get_input_root(&self) -> Option<Rc<dyn IInputRoot>>

The input root of the tree the visual is attached to.

Source

pub fn get_platform_settings(&self) -> Option<Rc<dyn IPlatformSettings>>

The platform settings of the tree the visual is attached to.

Source

pub fn is_visual_ancestor_of(&self, target: &Visual) -> bool

Tests whether this visual is an ancestor of target.

Source

pub fn point_to_client(&self, point: PixelPoint) -> Point

Converts a point from screen to client coordinates.

Panics if the visual does not belong to a visual tree.

Source

pub fn point_to_screen(&self, point: Point) -> PixelPoint

Converts a point from client to screen coordinates.

Panics if the visual does not belong to a visual tree.

Source

pub fn transform_to_visual(&self, to: &Visual) -> Option<Matrix>

Returns a transform that transforms the visual’s coordinates into the coordinates of the specified to visual, or None if the visuals don’t share a common ancestor.

Source

pub fn translate_point( &self, point: Point, relative_to: &Visual, ) -> Option<Point>

Translates a point relative to this visual to coordinates that are relative to the specified visual, or returns None if the visuals don’t share a common ancestor.

Source

pub fn to_ref(&self) -> Ref<Visual>

Returns a strong reference to this object.

Source

pub fn render(&self, context: &mut DrawingContext<'_>)

Renders the visual to a drawing context.

Source

pub fn on_attached_to_visual_tree_core(&self, e: &VisualTreeAttachmentEventArgs)

Calls the on_attached_to_visual_tree method for this control and all of its visual descendants.

Source

pub fn on_detached_from_visual_tree_core( &self, e: &VisualTreeAttachmentEventArgs, )

Calls the on_detached_from_visual_tree method for this control and all of its visual descendants.

Source

pub fn on_attached_to_visual_tree(&self, e: &VisualTreeAttachmentEventArgs)

Called when the control is added to a rooted visual tree.

Source

pub fn on_detached_from_visual_tree(&self, e: &VisualTreeAttachmentEventArgs)

Called when the control is removed from a rooted visual tree.

Source

pub fn on_visual_parent_changed( &self, old_parent: Option<&Ref<Visual>>, new_parent: Option<&Ref<Visual>>, )

Called when the control’s visual parent changes.

Source

pub fn bypass_flow_direction_policies(&self) -> bool

Whether the control ignores the flow direction policies, i.e. is never mirrored.

Source

pub fn invalidate_mirror_transform(&self)

Computes the has_mirror_transform value according to the flow direction of this visual and its parent.

Source

pub fn clip_to_bounds_radius(&self) -> Option<CornerRadius>

The corner radius the visual clips its content with when clip_to_bounds is set; None for a plain rectangular clip. (Upstream: the IVisualWithRoundRectClip interface.)

Source

pub fn custom_hit_test(&self, point: Point) -> Option<bool>

The custom hit test of the visual at a point in its own coordinates; None when the visual has none and is hit by what it occupies or draws. (Upstream: the ICustomHitTest interface; a class implementing it overrides this and the geometry form.)

Source

pub fn custom_hit_test_geometry( &self, geometry: &Ref<Geometry>, ) -> Option<IntersectionResult>

The custom hit test of the visual against a geometry in its own coordinates; None when the visual has none.

Source

pub fn ensure_initialized_for_visual_brush(&self)

Ensures that the visual is ready to use as the visual in a visual brush. (Upstream: the IVisualBrushInitialize interface; a class implementing it overrides this.)

Source

pub fn create_composition_visual( &self, compositor: &Rc<Compositor>, ) -> CompositionDrawListVisual

Creates the composition visual of the visual on compositor.

Source

pub fn detach_from_compositor(&self)

Releases the composition visual of the visual.

Source

pub fn synchronize_composition_child_visuals(&self)

Makes the children of the composition visual match the visual children (in Z order) and the child composition visual.

Source

pub fn synchronize_composition_properties(&self)

Copies the properties of the visual to its composition visual.

Source

pub fn attached_to_visual_tree( &self, handler: impl Fn(&VisualTreeAttachmentEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Raised when the control is attached to a rooted visual tree.

Source

pub fn detached_from_visual_tree( &self, handler: impl Fn(&VisualTreeAttachmentEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Raised when the control is detached from a rooted visual tree.

Source

pub fn is_effectively_visible_changed( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>

Raised when is_effectively_visible changes.

Source

pub fn bounds(&self) -> Rect

The bounds of the control relative to its parent.

Source

pub fn set_bounds(&self, value: Rect)

Sets the bounds of the control. Called by the layout system.

Source

pub fn clip_to_bounds(&self) -> bool

Whether the control should be clipped to its bounds.

Source

pub fn set_clip_to_bounds(&self, value: bool)

Source

pub fn clip(&self) -> Option<Ref<Geometry>>

The geometry clip for this visual.

Source

pub fn set_clip(&self, value: impl Into<Nullable<Geometry>>)

Source

pub fn cache_mode(&self) -> Option<Ref<CacheMode>>

The cache mode of the visual.

Source

pub fn set_cache_mode(&self, value: impl Into<Nullable<CacheMode>>)

Source

pub fn effect(&self) -> Option<Rc<dyn IEffect>>

The effect of the control.

Source

pub fn set_effect(&self, value: Option<Rc<dyn IEffect>>)

Source

pub fn opacity_mask(&self) -> Option<Rc<dyn IBrush>>

The opacity mask of the control.

Source

pub fn set_opacity_mask(&self, value: Option<Rc<dyn IBrush>>)

Source

pub fn render_transform(&self) -> Option<Rc<dyn ITransform>>

The render transform of the control.

Source

pub fn set_render_transform(&self, value: Option<Rc<dyn ITransform>>)

Source

pub fn render_transform_origin(&self) -> RelativePoint

The transform origin of the control.

Source

pub fn set_render_transform_origin(&self, value: RelativePoint)

Source

pub fn is_effectively_visible(&self) -> bool

Whether this control and all its parents are visible.

Source

pub fn is_visible(&self) -> bool

Whether this control is visible.

Source

pub fn set_is_visible(&self, value: bool)

Source

pub fn opacity(&self) -> f64

The opacity of the control.

Source

pub fn set_opacity(&self, value: f64)

Source

pub fn has_mirror_transform(&self) -> bool

Whether the control is mirrored relative to its parent because of its flow direction.

Source

pub fn set_has_mirror_transform(&self, value: bool)

Sets the mirror transform flag.

Source

pub fn flow_direction(&self) -> FlowDirection

The text flow direction.

Source

pub fn set_flow_direction(&self, value: FlowDirection)

Source

pub fn z_index(&self) -> i32

The Z index of the control.

Controls with a higher Z index appear in front of controls with a lower one. Among controls with the same value, order of appearance in the visual children decides.

Source

pub fn set_z_index(&self, value: i32)

Source

pub fn visual_children(&self) -> &FerroList<Ref<Visual>>

The control’s child visuals.

Source

pub fn visual_children_count(&self) -> usize

The number of visual children, without creating the collection.

Source

pub fn visual_children_snapshot(&self) -> Option<Rc<Vec<Ref<Visual>>>>

A snapshot of the visual children, without creating the collection.

Source

pub fn presentation_source(&self) -> Option<Rc<dyn IPresentationSource>>

The presentation source the visual is attached to.

Source

pub fn visual_root(&self) -> Option<Ref<Visual>>

The root of the visual tree, if the control is attached to one.

Source

pub fn composition_visual(&self) -> Option<CompositionDrawListVisual>

The composition visual of the visual, while it is attached to a visual tree rendered by a compositor.

Source

pub fn child_composition_visual(&self) -> Option<Rc<CompositionVisual>>

The composition visual shown as the last child of the composition visual of this visual (see ElementComposition).

Source

pub fn set_child_composition_visual(&self, value: Option<Rc<CompositionVisual>>)

Source

pub fn attach_to_compositor( &self, compositor: &Rc<Compositor>, ) -> CompositionDrawListVisual

Makes sure the visual has a composition visual on compositor and returns it.

Source

pub fn has_non_uniform_z_index_children(&self) -> bool

Whether any child has a non-default Z index.

Source

pub fn is_attached_to_visual_tree(&self) -> bool

Whether this control is attached to a visual root.

Source

pub fn visual_parent(&self) -> Option<Ref<Visual>>

The control’s parent visual.

Source

pub fn invalidate_visual(&self)

Invalidates the visual and queues a repaint.

Source

pub fn set_presentation_source_for_root_visual( &self, presentation_source: Option<Rc<dyn IPresentationSource>>, )

Attaches or detaches the root visual of a presentation source.

Methods from Deref<Target = StyledElement>§

Source

pub fn get_logical_ancestors(&self) -> LogicalAncestors ⓘ

Enumerates the ancestors of the element in the logical tree, from its parent to the root.

Source

pub fn get_self_and_logical_ancestors(&self) -> LogicalAncestors ⓘ

Enumerates the element and its ancestors in the logical tree.

Source

pub fn find_logical_ancestor_of_type<T>( &self, include_self: bool, ) -> Option<Ref<T>>
where T: ObjectType,

Finds the first logical ancestor of class T, optionally starting with the element itself.

Source

pub fn get_logical_children(&self) -> Rc<Vec<Ref<StyledElement>>>

The logical children of the element.

Source

pub fn get_logical_descendants(&self) -> LogicalDescendants ⓘ

Enumerates the descendants of the element in the logical tree, in depth-first pre-order.

Source

pub fn get_self_and_logical_descendants(&self) -> LogicalDescendants ⓘ

Enumerates the element and its descendants in the logical tree, in depth-first pre-order.

Source

pub fn find_logical_descendant_of_type<T>( &self, include_self: bool, ) -> Option<Ref<T>>
where T: ObjectType,

Finds the first logical descendant of class T (depth first), optionally starting with the element itself.

Source

pub fn get_logical_parent(&self) -> Option<Ref<StyledElement>>

The logical parent of the element.

Source

pub fn get_logical_parent_of_type<T>(&self) -> Option<Ref<T>>
where T: ObjectType,

The logical parent of the element, if it is of class T.

Source

pub fn get_logical_siblings(&self) -> Rc<Vec<Ref<StyledElement>>>

The children of the logical parent of the element, including the element itself; empty when the element has no logical parent.

Source

pub fn is_logical_ancestor_of(&self, target: Option<&StyledElement>) -> bool

Whether the element is a logical ancestor of target.

Source

pub fn to_ref(&self) -> Ref<StyledElement>

Returns a strong reference to this object.

Source

pub fn begin_init(&self)

Signals the beginning of a batch of initialization: styling is deferred until the matching end_init.

Source

pub fn try_end_init(&self) -> Result<(), InitializationError>

Signals the end of a batch of initialization: the element is styled (if it is attached to a rooted logical tree) and initialized. A style or control theme that cannot be applied (two setters for the same property) is an error, the counterpart of the invalid operation EndInit raises in the managed original; what follows the failure is skipped. This is the overridable member; end_init is the form that panics on the error.

Source

pub fn logical_children_collection_changed( &self, e: &NotifyCollectionChangedEventArgs<'_, Ref<StyledElement>>, )

Called when the logical children collection changes.

Source

pub fn on_attached_to_logical_tree(&self, e: &LogicalTreeAttachmentEventArgs)

Called when the styled element is added to a rooted logical tree.

Source

pub fn on_detached_from_logical_tree(&self, e: &LogicalTreeAttachmentEventArgs)

Called when the styled element is removed from a rooted logical tree.

Source

pub fn on_data_context_changed(&self)

Called when the data context changes.

Source

pub fn on_data_context_begin_update(&self)

Called when the data context begins updating.

Source

pub fn on_data_context_end_update(&self)

Called when the data context finishes updating.

Source

pub fn on_initialized(&self)

Called when the control finishes initialization.

Source

pub fn style_key_override(&self) -> &'static TypeInfo

The type by which the element is styled. Defaults to the element’s own type; override to be styled as a base class.

Source

pub fn on_control_theme_changed(&self)

Called when the control theme changes.

Source

pub fn on_templated_parent_control_theme_changed(&self)

Called when the templated parent’s control theme changes.

Source

pub fn invalidate_styles(&self, recurse: bool)

Detaches all styles from the element (and optionally from its inheritance children) so that they are re-applied.

Source

pub fn is_logical_root(&self) -> bool

Whether the element is the root of a logical tree.

Source

pub fn styling_parent(&self) -> Option<StyleHostRef>

The parent style host of the element: by default the inheritance parent, when it is a styled element. The root of a tree overrides this to return the host of the global styles.

Source

pub fn notify_child_resources_changed(&self, e: ResourcesChangedEventArgs)

Notifies the children of the element that the resources visible to them have changed. The base method notifies the logical children.

Source

pub fn child_index_provider(&self) -> Option<Rc<dyn IChildIndexProvider>>

The child index provider implemented by the element, if any. Used to match the children of the element by their position.

Source

pub fn is_theme_variant_root(&self) -> bool

Whether the element is a root of theme variant resolution: at a root the default theme variant resolves to the variant of the platform instead of being inherited.

Source

pub fn attached_to_logical_tree( &self, handler: impl Fn(&LogicalTreeAttachmentEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Raised when the styled element is attached to a rooted logical tree.

Source

pub fn detached_from_logical_tree( &self, handler: impl Fn(&LogicalTreeAttachmentEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Raised when the styled element is detached from a rooted logical tree.

Source

pub fn data_context_changed( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>

Occurs when the data context property changes.

Source

pub fn initialized(&self, handler: impl Fn() + 'static) -> Rc<dyn IDisposable>

Occurs when the styled element has finished initialization.

Source

pub fn resources_changed( &self, handler: impl Fn(&ResourcesChangedEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Raised when the resources change on the element or an ancestor of the element.

Source

pub fn actual_theme_variant_changed( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>

Raised when the theme variant in effect for the element changes.

Source

pub fn name(&self) -> Option<String>

The name of the styled element.

An element’s name is used to uniquely identify it within its name scope. Once the element has been styled its name may not be changed.

Source

pub fn set_name(&self, value: Option<String>)

Source

pub fn classes(&self) -> Classes

The styled element’s classes.

The collection is returned by handle: clones refer to the same collection.

Source

pub fn pseudo_classes(&self) -> &dyn IPseudoClasses

The pseudoclasses of the element, settable by the control itself.

Source

pub fn data_context(&self) -> Option<Rc<dyn AnyValue>>

The control’s data context.

The data context is an inherited property that specifies the default object that will be used for data binding.

Source

pub fn set_data_context(&self, value: Option<Rc<dyn AnyValue>>)

Source

pub fn is_initialized(&self) -> bool

Whether the element has finished initialization.

For more information about when this happens, see the initialized event.

Source

pub fn styles(&self) -> Ref<Styles>

The styles for the styled element.

Styles for the entire application are added to the application’s styles collection.

Source

pub fn is_styles_initialized(&self) -> bool

Whether the styles collection of the element has been created.

Source

pub fn style_key(&self) -> &'static TypeInfo

The type by which the element is styled.

Source

pub fn resources(&self) -> Ref<ResourceDictionary>

The styled element’s resource dictionary.

Source

pub fn set_resources(&self, value: Ref<ResourceDictionary>)

Source

pub fn theme(&self) -> Option<Ref<ControlTheme>>

The theme to be applied to the element.

By default the theme is looked up as a resource keyed by the element’s style key; setting this property takes precedence over that lookup.

Source

pub fn set_theme(&self, value: impl Into<Nullable<ControlTheme>>)

Source

pub fn actual_theme_variant(&self) -> Option<ThemeVariant>

The UI theme variant that is currently used by the element, which might be different than the requested theme variant. None until a theme variant has been established for the element or an ancestor.

Source

pub fn has_resources(&self) -> bool

Whether the element or its styles have resources.

Source

pub fn try_get_resource( &self, key: &ResourceKey, theme: Option<&ThemeVariant>, ) -> Option<Option<Rc<dyn AnyValue>>>

Tries to find a resource within the element: in its resource dictionary, then in its styles.

Source

pub fn try_find_resource( &self, key: &ResourceKey, theme: Option<&ThemeVariant>, ) -> Option<Option<Rc<dyn AnyValue>>>

Tries to find a resource by searching up the logical tree and then the global styles.

Source

pub fn find_resource(&self, key: &ResourceKey) -> Option<Rc<dyn AnyValue>>

Finds a resource by searching up the logical tree and then the global styles. Returns the unset value marker if it is not found.

Source

pub fn templated_parent(&self) -> Option<Ref<FerroObject>>

The styled element whose lookless template this element is part of.

Source

pub fn set_templated_parent(&self, value: impl Into<Nullable<FerroObject>>)

Sets the templated parent. Called by the template that creates the element.

Source

pub fn logical_children(&self) -> &FerroList<Ref<StyledElement>>

The styled element’s logical children.

Source

pub fn is_attached_to_logical_tree(&self) -> bool

Whether the element is attached to a rooted logical tree.

Source

pub fn parent(&self) -> Option<Ref<StyledElement>>

The styled element’s logical parent.

Source

pub fn apply_styling(&self) -> bool

Applies styling to the control if the control is initialized and styling is not already applied.

The styling system will automatically apply styling when required, so this method need only be called by tests or in rare special cases.

Returns true if styling is applied to the control, false if the control is still initializing.

Source

pub fn try_apply_styling(&self) -> Result<bool, DuplicateSetterError>

As apply_styling, reporting a style or control theme that cannot be applied (two setters for the same property: the invalid operation of the managed original) instead of panicking. After an error the styling pass is ended and the element is not marked as styled, as when the managed original throws.

Source

pub fn end_init(&self)

Signals the end of a batch of initialization (try_end_init). A style or control theme that cannot be applied panics with the message of the error.

Source

pub fn initialize_if_needed(&self)

Marks the element as initialized and raises the initialization notifications, if initialization is complete.

Source

pub fn set_parent(&self, parent: impl Into<Nullable<StyledElement>>)

Sets the element’s logical parent.

You should not usually need to call this method: it is called when an element is added to or removed from a logical children collection.

Source

pub fn notify_attached_to_logical_tree( &self, e: &LogicalTreeAttachmentEventArgs, )

Notifies the element that it has been attached to a rooted logical tree. Called by a parent for children that are part of its logical tree without being in its logical children collection (the template child of a templated control).

Source

pub fn notify_detached_from_logical_tree( &self, e: &LogicalTreeAttachmentEventArgs, )

Notifies the element that it has been detached from a rooted logical tree. See notify_attached_to_logical_tree.

Source

pub fn get_effective_theme(&self) -> Option<Ref<ControlTheme>>

The theme in effect for the element: the Theme property if set, otherwise the control theme resource keyed by the element’s style key that is visible to the element (a resource holding a Ref<ControlTheme>).

Source

pub fn styles_added(&self, styles: &[Rc<dyn IStyle>])

Called when styles are added to the styles collection of the element or a nested styles collection.

Source

pub fn styles_removed(&self, styles: &[Rc<dyn IStyle>])

Called when styles are removed from the styles collection of the element or a nested styles collection.

Source

pub fn notify_resources_changed( &self, e: ResourcesChangedEventArgs, propagate: bool, )

Notifies the element, and with propagate its children, that the resources visible to it have changed.

Source

pub fn set_data_context_with_priority( &self, value: Option<Rc<dyn AnyValue>>, priority: BindingPriority, ) -> Option<Rc<dyn IDisposable>>

The priority-aware setter used by templates.

Source

pub fn bind_class( &self, class_name: &str, source: &dyn BindingBase, anchor: Option<&Ref<FerroObject>>, ) -> Rc<dyn BindingExpressionBase>

Binds the presence of the class class_name on this element to source. anchor provides the context the binding locates its source with when the element cannot.

Methods from Deref<Target = Animatable>§

Source

pub fn to_ref(&self) -> Ref<Animatable>

Returns a strong reference to this object.

Source

pub fn clock(&self) -> Option<Rc<dyn IClock>>

The clock which controls the animations and transitions on the object and, by inheritance, on its descendants. The global clock is used when there is none.

Source

pub fn set_clock(&self, value: Option<Rc<dyn IClock>>)

Source

pub fn transitions(&self) -> Option<Transitions>

The property transitions of the object.

Source

pub fn set_transitions(&self, value: Option<Transitions>)

Source

pub fn enable_transitions(&self)

Enables transitions for the object.

This is called when the object is attached to the visual tree, so that transitions do not run on its initial property values.

Source

pub fn disable_transitions(&self)

Disables transitions for the object.

This is called when the object is detached from the visual tree.

Source

pub fn try_get_transition_instance( &self, transition: &Rc<dyn ITransition>, ) -> Option<Rc<TransitionInstance>>

The progress of the transition that transition is currently running on this object: the instance created when the transition was last applied. None when the transition is not one of the object’s transitions or has not been applied.

Methods from Deref<Target = FerroObject>§

Source

pub fn dispatcher(&self) -> &Arc<Dispatcher> ⓘ

Returns the Dispatcher that this object is associated with: the dispatcher of the thread that owns the object.

Source

pub fn check_access(&self) -> bool

Returns whether the calling thread is the thread that owns this object.

Source

pub fn verify_access(&self)

Checks that the calling thread is the thread that owns this object.

§Panics

Panics when it is not.

Source

pub fn to_ref(&self) -> Ref<FerroObject>

A strong reference to this object.

Source

pub fn to_weak(&self) -> WeakRef<FerroObject>

A weak reference to this object.

Source

pub fn get_type(&self) -> &'static TypeInfo

The runtime type of the object.

Source

pub fn is<T>(&self) -> bool
where T: ObjectType,

Whether the object is of class T or a class derived from it.

Source

pub fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Returns the object viewed as class T if it is one.

Source

pub fn on_property_changed(&self, change: &FerroPropertyChangedEventArgs<'_>)

Invokes the on_property_changed virtual member.

Source

pub fn inheritance_parent(&self) -> Option<Ref<FerroObject>>

The parent object that inherited property values are inherited from.

Source

pub fn set_inheritance_parent(&self, value: impl Into<Nullable<FerroObject>>)

Sets the parent object that inherited property values are inherited from.

Source

pub fn clear_value<T>(&self, property: &'static StyledProperty<T>)
where T: PropertyValue,

Clears a property’s local value.

Source

pub fn get_value<T>(&self, property: &'static StyledProperty<T>) -> T
where T: PropertyValue,

Gets a property value.

Source

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.

Source

pub fn is_animating(&self, property: &FerroProperty) -> bool

Checks whether a property is animating.

Source

pub fn is_set(&self, property: &FerroProperty) -> bool

Checks whether a styled property has a value assigned to it or a binding targeting it.

Source

pub fn set_value<T>(&self, property: &'static StyledProperty<T>, value: T)
where T: PropertyValue,

Sets a property value with local value priority.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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())).

Source

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)).

Source

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.

Source

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.

Source

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.

Source

pub fn coerce_value(&self, property: &'static FerroProperty)

Coerces the specified property.

Source

pub fn get_direct_value<T>(&self, property: &'static DirectPropertyBase<T>) -> T
where T: PropertyValue,

Gets a direct property value.

Source

pub fn set_direct_value<T>( &self, property: &'static DirectPropertyBase<T>, value: T, )
where T: PropertyValue,

Sets a direct property value.

Source

pub fn clear_direct_value<T>(&self, property: &'static DirectPropertyBase<T>)
where T: PropertyValue,

Resets a direct property to its unset value.

Source

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.

Source

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.

Source

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.

Source

pub fn set_and_raise<T>( &self, property: &'static DirectPropertyBase<T>, field: &RefCell<T>, value: T, ) -> bool
where T: PropertyValue,

Sets the backing field of a direct property, raising a change notification if the value changed. Returns true if it changed.

Source

pub fn set_and_raise_cell<T>( &self, property: &'static DirectPropertyBase<T>, field: &Cell<T>, value: T, ) -> bool
where T: PropertyValue + Copy,

set_and_raise for Copy values stored in a Cell.

Source

pub fn get_value_untyped( &self, property: &'static FerroProperty, ) -> Rc<dyn AnyValue>

Gets a property value as an untyped value.

Source

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.

Source

pub fn set_current_value_untyped( &self, property: &'static FerroProperty, value: &(dyn Any + 'static), )

set_current_value with an untyped value.

Source

pub fn clear_value_untyped(&self, property: &'static FerroProperty)

Clears a property’s local value.

Source

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.

Source

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.

Source

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.

Source

pub fn remove_property_changed_handler(&self, token: u64) -> bool

Ends a subscription of add_property_changed_handler.

Source

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).

Source

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.

Source

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 ControlImpl for CommandBar

Source§

fn get_template_focus_target(this: &Self) -> Option<Ref<Control>>

Gets the element that receives the focus adorner.
Source§

fn on_loaded(this: &Self, e: &RoutedEventArgs)

Raises the Loaded event.
Source§

fn on_unloaded(this: &Self, e: &RoutedEventArgs)

Raises the Unloaded event.
Source§

fn on_size_changed(this: &Self, e: &SizeChangedEventArgs)

Raises the SizeChanged event.
Source§

fn on_create_automation_peer(this: &Self) -> Ref<AutomationPeer>

Returns a new, type-specific automation peer implementation for the control.
Source§

impl Deref for CommandBar

Source§

type Target = TemplatedControl

The resulting type after dereferencing.
Source§

fn deref(&self) -> &TemplatedControl

Dereferences the value.
Source§

impl FerroObjectImpl for CommandBar

Source§

fn constructed(this: &Self)

Called once, right after the object has been allocated. This is where constructor logic that needs a reference to the object runs. Overrides must call parent_constructed first.
Source§

fn on_property_changed(this: &Self, change: &FerroPropertyChangedEventArgs<'_>)

Called when the effective value of a property changes on the object.
Source§

fn on_property_changed_core( this: &Self, change: &FerroPropertyChangedEventArgs<'_>, )

Called for every property change on the object, including changes of non-effective (base) values. Overriding this is rarely needed; override on_property_changed instead.
Source§

fn update_data_validation( this: &Self, property: &'static FerroProperty, state: BindingValueType, error: Option<&BindingError>, )

Called to update the validation state for properties for which data validation is enabled.
Source§

impl InputElementImpl for CommandBar

Source§

fn is_enabled_core(this: &Self) -> bool

Whether the control is enabled, as far as the control itself is concerned. The default is the value of is_enabled; controls with additional conditions (e.g. a command that cannot execute) override this.
Source§

fn is_focus_scope(this: &Self) -> bool

Whether the element is a focus scope: an element that remembers which of its descendants was focused last.
Source§

fn on_getting_focus(this: &Self, e: &FocusChangingEventArgs)

Called when the control or one of its child elements is about to get focus.
Source§

fn on_losing_focus(this: &Self, e: &FocusChangingEventArgs)

Called when the control or one of its child elements is about to lose focus.
Source§

fn on_got_focus(this: &Self, e: &FocusChangedEventArgs)

Called when the control or one of its child elements gets focus.
Source§

fn on_lost_focus(this: &Self, e: &FocusChangedEventArgs)

Called when the control or one of its child elements loses focus.
Source§

fn on_key_down(this: &Self, e: &KeyEventArgs)

Called before the key down event occurs.
Source§

fn on_key_up(this: &Self, e: &KeyEventArgs)

Called before the key up event occurs.
Source§

fn on_text_input(this: &Self, e: &TextInputEventArgs)

Called before the text input event occurs.
Source§

fn on_pointer_entered(this: &Self, e: &PointerEventArgs)

Called before the pointer entered event occurs.
Source§

fn on_pointer_exited(this: &Self, e: &PointerEventArgs)

Called before the pointer exited event occurs.
Source§

fn on_pointer_moved(this: &Self, e: &PointerEventArgs)

Called before the pointer moved event occurs.
Source§

fn on_pointer_pressed(this: &Self, e: &PointerPressedEventArgs)

Called before the pointer pressed event occurs.
Source§

fn on_pointer_released(this: &Self, e: &PointerReleasedEventArgs)

Called before the pointer released event occurs.
Source§

fn on_pointer_capture_changing(this: &Self, e: &PointerCaptureChangingEventArgs)

Called when the capture of a pointer is about to change on the control or one of its descendants.
Source§

fn on_pointer_capture_lost(this: &Self, e: &PointerCaptureLostEventArgs)

Called before the pointer capture lost event occurs.
Source§

fn on_pointer_wheel_changed(this: &Self, e: &PointerWheelEventArgs)

Called before the pointer wheel changed event occurs.
Source§

fn on_tapped(this: &Self, e: &TappedEventArgs)

Called when a tap gesture occurs on the control.
Source§

fn on_right_tapped(this: &Self, e: &TappedEventArgs)

Called when a right tap gesture occurs on the control.
Source§

fn on_double_tapped(this: &Self, e: &TappedEventArgs)

Called when a double-tap gesture occurs on the control.
Source§

fn on_holding(this: &Self, e: &HoldingRoutedEventArgs)

Called when a hold gesture occurs on the control.
Source§

fn on_access_key(this: &Self, e: &(dyn IRoutedEventArgs + 'static))

Called when the access key of the control is pressed. The default focuses the control.
Source§

fn get_next_tab_stop_override(this: &Self) -> Option<Ref<InputElement>>

Called when focus is moving forward out of this element: lets it name the element that should receive focus next.
Source§

fn get_previous_tab_stop_override(this: &Self) -> Option<Ref<InputElement>>

Called when focus is moving backward out of this element: lets it name the element that should receive focus next.
Source§

fn get_first_focusable_element_override( this: &Self, ) -> Option<Ref<InputElement>>

Lets the element name the first focusable element within it.
Source§

fn get_last_focusable_element_override(this: &Self) -> Option<Ref<InputElement>>

Lets the element name the last focusable element within it.
Source§

fn process_tab_stop_override( this: &Self, focused_element: Option<&Ref<InputElement>>, candidate_tab_stop_element: Option<&Ref<InputElement>>, is_reverse: bool, did_cycle_focus_at_root_visual: bool, new_tab_stop: &mut Option<Ref<InputElement>>, ) -> bool

Lets the element (an ancestor of the focused element) override the tab stop chosen by tab navigation. Returns true when the tab stop is overridden; the override is written to new_tab_stop.
Source§

fn process_candidate_tab_stop_override( this: &Self, focused_element: Option<&Ref<InputElement>>, candidate_tab_stop_element: Option<&Ref<InputElement>>, overriden_candidate_tab_stop_element: Option<&Ref<InputElement>>, is_reverse: bool, new_tab_stop: &mut Option<Ref<InputElement>>, ) -> bool

Lets the element (an ancestor of the candidate tab stop) override the tab stop chosen by tab navigation. Returns true when the tab stop is overridden; the override is written to new_tab_stop.
Source§

fn as_custom_keyboard_navigation( this: &Self, ) -> Option<&dyn ICustomKeyboardNavigation>

The element as a custom keyboard navigation handler, if it is one.
Source§

fn as_scrollable(this: &Self) -> Option<&dyn IScrollable>

The element as a scrollable, if it is one.
Source§

fn as_hosted_visual_tree_root(this: &Self) -> Option<&dyn IHostedVisualTreeRoot>

The element as the root of a hosted visual tree (such as a popup root), if it is one.
Source§

impl InteractiveImpl for CommandBar

Source§

fn interactive_parent(this: &Self) -> Option<Ref<Interactive>>

The interactive parent of the object for bubbling and tunneling events. By default this is the visual parent, when it is an interactive.
Source§

impl LayoutableImpl for CommandBar

Source§

fn measure_override(this: &Self, available_size: Size) -> Size

Measures the control and its child elements as part of a layout pass. Returns the size the control would like to be.
Source§

fn apply_template(this: &Self)

Creates the visual children of the control, if necessary.
Source§

fn measure_core(this: &Self, available_size: Size) -> Size

The default implementation of the control’s measure pass. Read more
Source§

fn arrange_core(this: &Self, final_rect: Rect)

The default implementation of the control’s arrange pass. Read more
Source§

fn arrange_override(this: &Self, final_size: Size) -> Size

Positions child elements as part of a layout pass. Returns the size used.
Source§

fn on_measure_invalidated(this: &Self)

Called by invalidate_measure.
Source§

impl ObjectType for CommandBar

Source§

type Parent = TemplatedControl

The base class. The root class is its own parent.
Source§

type VTable = <TemplatedControl as ObjectType>::VTable

The virtual table of the class.
Source§

fn vtable() -> &'static Self::VTable

The virtual table used by instances whose most-derived class is Self.
Source§

fn register_class()

The static initialisation of the class. The first call on a thread, after doing the same for the base class: Read more
Source§

impl StaticType for CommandBar

Source§

const TYPE: &'static TypeInfo

The runtime type.
Source§

impl StyledElementImpl for CommandBar

Source§

fn begin_init(this: &Self)

Signals the beginning of a batch of initialization: styling is deferred until the matching end_init.
Source§

fn try_end_init(this: &Self) -> Result<(), InitializationError>

Signals the end of a batch of initialization: the element is styled (if it is attached to a rooted logical tree) and initialized. A style or control theme that cannot be applied (two setters for the same property) is an error, the counterpart of the invalid operation EndInit raises in the managed original; what follows the failure is skipped. This is the overridable member; end_init is the form that panics on the error.
Source§

fn logical_children_collection_changed( this: &Self, e: &NotifyCollectionChangedEventArgs<'_, Ref<StyledElement>>, )

Called when the logical children collection changes.
Source§

fn on_attached_to_logical_tree(this: &Self, e: &LogicalTreeAttachmentEventArgs)

Called when the styled element is added to a rooted logical tree.
Source§

fn on_detached_from_logical_tree( this: &Self, e: &LogicalTreeAttachmentEventArgs, )

Called when the styled element is removed from a rooted logical tree.
Source§

fn on_data_context_changed(this: &Self)

Called when the data context changes.
Source§

fn on_data_context_begin_update(this: &Self)

Called when the data context begins updating.
Source§

fn on_data_context_end_update(this: &Self)

Called when the data context finishes updating.
Source§

fn on_initialized(this: &Self)

Called when the control finishes initialization.
Source§

fn style_key_override(this: &Self) -> &'static TypeInfo

The type by which the element is styled. Defaults to the element’s own type; override to be styled as a base class.
Source§

fn on_control_theme_changed(this: &Self)

Called when the control theme changes.
Source§

fn on_templated_parent_control_theme_changed(this: &Self)

Called when the templated parent’s control theme changes.
Source§

fn invalidate_styles(this: &Self, recurse: bool)

Detaches all styles from the element (and optionally from its inheritance children) so that they are re-applied.
Source§

fn is_logical_root(this: &Self) -> bool

Whether the element is the root of a logical tree.
Source§

fn styling_parent(this: &Self) -> Option<StyleHostRef>

The parent style host of the element: by default the inheritance parent, when it is a styled element. The root of a tree overrides this to return the host of the global styles.
Source§

fn notify_child_resources_changed(this: &Self, e: ResourcesChangedEventArgs)

Notifies the children of the element that the resources visible to them have changed. The base method notifies the logical children.
Source§

fn child_index_provider(this: &Self) -> Option<Rc<dyn IChildIndexProvider>>

The child index provider implemented by the element, if any. Used to match the children of the element by their position.
Source§

fn is_theme_variant_root(this: &Self) -> bool

Whether the element is a root of theme variant resolution: at a root the default theme variant resolves to the variant of the platform instead of being inherited.
Source§

impl<T> Subclassable<T> for CommandBar

Source§

impl TemplatedControlImpl for CommandBar

Source§

fn on_apply_template(this: &Self, e: &TemplateAppliedEventArgs)

Called when the control’s template is applied. Read more
Source§

fn on_template_changed(this: &Self, e: &FerroPropertyChangedEventArgs<'_>)

Called when the Template property changes.
Source§

impl Upcast<CommandBar> for CommandBar

Source§

impl<T: ?Sized> Upcast<T> for CommandBar

Source§

fn upcast(&self) -> &T

Source§

impl VisualImpl for CommandBar

Source§

fn on_attached_to_visual_tree(this: &Self, e: &VisualTreeAttachmentEventArgs)

Called when the control is added to a rooted visual tree.
Source§

fn on_detached_from_visual_tree(this: &Self, e: &VisualTreeAttachmentEventArgs)

Called when the control is removed from a rooted visual tree.
Source§

fn render(this: &Self, context: &mut DrawingContext<'_>)

Renders the visual to a drawing context.
Source§

fn on_attached_to_visual_tree_core( this: &Self, e: &VisualTreeAttachmentEventArgs, )

Calls the on_attached_to_visual_tree method for this control and all of its visual descendants.
Source§

fn on_detached_from_visual_tree_core( this: &Self, e: &VisualTreeAttachmentEventArgs, )

Calls the on_detached_from_visual_tree method for this control and all of its visual descendants.
Source§

fn on_visual_parent_changed( this: &Self, old_parent: Option<&Ref<Visual>>, new_parent: Option<&Ref<Visual>>, )

Called when the control’s visual parent changes.
Source§

fn bypass_flow_direction_policies(this: &Self) -> bool

Whether the control ignores the flow direction policies, i.e. is never mirrored.
Source§

fn invalidate_mirror_transform(this: &Self)

Computes the has_mirror_transform value according to the flow direction of this visual and its parent.
Source§

fn clip_to_bounds_radius(this: &Self) -> Option<CornerRadius>

The corner radius the visual clips its content with when clip_to_bounds is set; None for a plain rectangular clip. (Upstream: the IVisualWithRoundRectClip interface.)
Source§

fn custom_hit_test(this: &Self, point: Point) -> Option<bool>

The custom hit test of the visual at a point in its own coordinates; None when the visual has none and is hit by what it occupies or draws. (Upstream: the ICustomHitTest interface; a class implementing it overrides this and the geometry form.)
Source§

fn custom_hit_test_geometry( this: &Self, geometry: &Ref<Geometry>, ) -> Option<IntersectionResult>

The custom hit test of the visual against a geometry in its own coordinates; None when the visual has none.
Source§

fn ensure_initialized_for_visual_brush(this: &Self)

Ensures that the visual is ready to use as the visual in a visual brush. (Upstream: the IVisualBrushInitialize interface; a class implementing it overrides this.)
Source§

fn create_composition_visual( this: &Self, compositor: &Rc<Compositor>, ) -> CompositionDrawListVisual

Creates the composition visual of the visual on compositor.
Source§

fn detach_from_compositor(this: &Self)

Releases the composition visual of the visual.
Source§

fn synchronize_composition_child_visuals(this: &Self)

Makes the children of the composition visual match the visual children (in Z order) and the child composition visual.
Source§

fn synchronize_composition_properties(this: &Self)

Copies the properties of the visual to its composition visual.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> ControlImplExt for T
where T: ControlImpl,

Source§

fn parent_get_template_focus_target(this: &Self) -> Option<Ref<Control>>

Calls the base class implementation of the member.
Source§

fn parent_on_loaded(this: &Self, e: &RoutedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_unloaded(this: &Self, e: &RoutedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_size_changed(this: &Self, e: &SizeChangedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_create_automation_peer(this: &Self) -> Ref<AutomationPeer>

Calls the base class implementation of the member.
Source§

impl<T> FerroObjectImplExt for T
where T: FerroObjectImpl,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> InputElementImplExt for T

Source§

fn parent_is_enabled_core(this: &Self) -> bool

Calls the base class implementation of the member.
Source§

fn parent_is_focus_scope(this: &Self) -> bool

Calls the base class implementation of the member.
Source§

fn parent_on_getting_focus(this: &Self, e: &FocusChangingEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_losing_focus(this: &Self, e: &FocusChangingEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_got_focus(this: &Self, e: &FocusChangedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_lost_focus(this: &Self, e: &FocusChangedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_key_down(this: &Self, e: &KeyEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_key_up(this: &Self, e: &KeyEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_text_input(this: &Self, e: &TextInputEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_pointer_entered(this: &Self, e: &PointerEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_pointer_exited(this: &Self, e: &PointerEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_pointer_moved(this: &Self, e: &PointerEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_pointer_pressed(this: &Self, e: &PointerPressedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_pointer_released(this: &Self, e: &PointerReleasedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_pointer_capture_changing( this: &Self, e: &PointerCaptureChangingEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_pointer_capture_lost(this: &Self, e: &PointerCaptureLostEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_pointer_wheel_changed(this: &Self, e: &PointerWheelEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_tapped(this: &Self, e: &TappedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_right_tapped(this: &Self, e: &TappedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_double_tapped(this: &Self, e: &TappedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_holding(this: &Self, e: &HoldingRoutedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_access_key(this: &Self, e: &(dyn IRoutedEventArgs + 'static))

Calls the base class implementation of the member.
Source§

fn parent_get_next_tab_stop_override(this: &Self) -> Option<Ref<InputElement>>

Calls the base class implementation of the member.
Source§

fn parent_get_previous_tab_stop_override( this: &Self, ) -> Option<Ref<InputElement>>

Calls the base class implementation of the member.
Source§

fn parent_get_first_focusable_element_override( this: &Self, ) -> Option<Ref<InputElement>>

Calls the base class implementation of the member.
Source§

fn parent_get_last_focusable_element_override( this: &Self, ) -> Option<Ref<InputElement>>

Calls the base class implementation of the member.
Source§

fn parent_process_tab_stop_override( this: &Self, focused_element: Option<&Ref<InputElement>>, candidate_tab_stop_element: Option<&Ref<InputElement>>, is_reverse: bool, did_cycle_focus_at_root_visual: bool, new_tab_stop: &mut Option<Ref<InputElement>>, ) -> bool

Calls the base class implementation of the member.
Source§

fn parent_process_candidate_tab_stop_override( this: &Self, focused_element: Option<&Ref<InputElement>>, candidate_tab_stop_element: Option<&Ref<InputElement>>, overriden_candidate_tab_stop_element: Option<&Ref<InputElement>>, is_reverse: bool, new_tab_stop: &mut Option<Ref<InputElement>>, ) -> bool

Calls the base class implementation of the member.
Source§

fn parent_as_custom_keyboard_navigation( this: &Self, ) -> Option<&dyn ICustomKeyboardNavigation>

Calls the base class implementation of the member.
Source§

fn parent_as_scrollable(this: &Self) -> Option<&dyn IScrollable>

Calls the base class implementation of the member.
Source§

fn parent_as_hosted_visual_tree_root( this: &Self, ) -> Option<&dyn IHostedVisualTreeRoot>

Calls the base class implementation of the member.
Source§

impl<T> InteractiveImplExt for T
where T: InteractiveImpl,

Source§

fn parent_interactive_parent(this: &Self) -> Option<Ref<Interactive>>

Calls the base class implementation of the member.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutableImplExt for T
where T: LayoutableImpl,

Source§

fn parent_apply_template(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_measure_core(this: &Self, available_size: Size) -> Size

Calls the base class implementation of the member.
Source§

fn parent_measure_override(this: &Self, available_size: Size) -> Size

Calls the base class implementation of the member.
Source§

fn parent_arrange_core(this: &Self, final_rect: Rect)

Calls the base class implementation of the member.
Source§

fn parent_arrange_override(this: &Self, final_size: Size) -> Size

Calls the base class implementation of the member.
Source§

fn parent_on_measure_invalidated(this: &Self)

Calls the base class implementation of the member.
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> StyledElementImplExt for T

Source§

fn parent_begin_init(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_try_end_init(this: &Self) -> Result<(), InitializationError>

Calls the base class implementation of the member.
Source§

fn parent_logical_children_collection_changed( this: &Self, e: &NotifyCollectionChangedEventArgs<'_, Ref<StyledElement>>, )

Calls the base class implementation of the member.
Source§

fn parent_on_attached_to_logical_tree( this: &Self, e: &LogicalTreeAttachmentEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_detached_from_logical_tree( this: &Self, e: &LogicalTreeAttachmentEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_data_context_changed(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_data_context_begin_update(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_data_context_end_update(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_initialized(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_style_key_override(this: &Self) -> &'static TypeInfo

Calls the base class implementation of the member.
Source§

fn parent_on_control_theme_changed(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_templated_parent_control_theme_changed(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_invalidate_styles(this: &Self, recurse: bool)

Calls the base class implementation of the member.
Source§

fn parent_is_logical_root(this: &Self) -> bool

Calls the base class implementation of the member.
Source§

fn parent_styling_parent(this: &Self) -> Option<StyleHostRef>

Calls the base class implementation of the member.
Source§

fn parent_notify_child_resources_changed( this: &Self, e: ResourcesChangedEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_child_index_provider( this: &Self, ) -> Option<Rc<dyn IChildIndexProvider>>

Calls the base class implementation of the member.
Source§

fn parent_is_theme_variant_root(this: &Self) -> bool

Calls the base class implementation of the member.
Source§

impl<T> TemplatedControlImplExt for T

Source§

fn parent_on_apply_template(this: &Self, e: &TemplateAppliedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_on_template_changed( this: &Self, e: &FerroPropertyChangedEventArgs<'_>, )

Calls the base class implementation of the member.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> VisualImplExt for T
where T: VisualImpl,

Source§

fn parent_render(this: &Self, context: &mut DrawingContext<'_>)

Calls the base class implementation of the member.
Source§

fn parent_on_attached_to_visual_tree_core( this: &Self, e: &VisualTreeAttachmentEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_detached_from_visual_tree_core( this: &Self, e: &VisualTreeAttachmentEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_attached_to_visual_tree( this: &Self, e: &VisualTreeAttachmentEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_detached_from_visual_tree( this: &Self, e: &VisualTreeAttachmentEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_visual_parent_changed( this: &Self, old_parent: Option<&Ref<Visual>>, new_parent: Option<&Ref<Visual>>, )

Calls the base class implementation of the member.
Source§

fn parent_bypass_flow_direction_policies(this: &Self) -> bool

Calls the base class implementation of the member.
Source§

fn parent_invalidate_mirror_transform(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_clip_to_bounds_radius(this: &Self) -> Option<CornerRadius>

Calls the base class implementation of the member.
Source§

fn parent_custom_hit_test(this: &Self, point: Point) -> Option<bool>

Calls the base class implementation of the member.
Source§

fn parent_custom_hit_test_geometry( this: &Self, geometry: &Ref<Geometry>, ) -> Option<IntersectionResult>

Calls the base class implementation of the member.
Source§

fn parent_ensure_initialized_for_visual_brush(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_create_composition_visual( this: &Self, compositor: &Rc<Compositor>, ) -> CompositionDrawListVisual

Calls the base class implementation of the member.
Source§

fn parent_detach_from_compositor(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_synchronize_composition_child_visuals(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_synchronize_composition_properties(this: &Self)

Calls the base class implementation of the member.