Skip to main content

Window

Struct Window 

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

A top-level window.

Implementations§

Source§

impl Window

Source

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

The runtime type of this class.

Source

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

Returns a strong reference to this object.

Source§

impl Window

Source

pub fn handle_closing(&self, reason: WindowCloseReason) -> bool

Handles a closing notification from the platform implementation. Returns true if closing is cancelled, otherwise false. reason is the reason the window is closing.

Source

pub fn on_closing(&self, e: &WindowClosingEventArgs)

Raises the Closing event.

A type that derives from Window may override this member. The override must call the base implementation if the Closing event needs to be raised.

Source§

impl Window

Source

pub fn size_to_content_property() -> &'static StyledProperty<SizeToContent>

Defines the SizeToContent property.

Source

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

Defines the ExtendClientAreaToDecorationsHint property.

Source

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

Defines the ExtendClientAreaTitleBarHeightHint property.

Source

pub fn is_extended_into_window_decorations_property() -> &'static DirectProperty<Window, bool>

Defines the IsExtendedIntoWindowDecorations property.

Source

pub fn window_decoration_margin_property() -> &'static DirectProperty<Window, Thickness>

Defines the WindowDecorationMargin property.

Source

pub fn off_screen_margin_property() -> &'static DirectProperty<Window, Thickness>

Defines the OffScreenMargin property.

Source

pub fn window_decorations_property() -> &'static StyledProperty<WindowDecorations>

Defines the WindowDecorations property.

Source

pub fn window_decorations_theme_property() -> &'static StyledProperty<Option<Ref<ControlTheme>>>

Defines the WindowDecorationsTheme property.

Source

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

Defines the ShowActivated property.

Source

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

Enables or disables the taskbar icon.

Source

pub fn closing_behavior_property() -> &'static StyledProperty<WindowClosingBehavior>

Defines the ClosingBehavior property.

Source

pub fn window_state_property() -> &'static DirectProperty<Window, WindowState>

Represents the currently effective window state (normal, minimized, maximized).

Source

pub fn title_property() -> &'static StyledProperty<Option<String>>

Defines the Title property.

Source

pub fn icon_property() -> &'static StyledProperty<Option<Rc<WindowIcon>>>

Defines the Icon property.

Source

pub fn window_startup_location_property() -> &'static StyledProperty<WindowStartupLocation>

Defines the WindowStartupLocation property.

Source

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

Defines the CanResize property.

Source

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

Defines the CanMinimize property.

Source

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

Defines the CanMaximize property.

Source§

impl Window

Source

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

Routed event that can be used for global tracking of window destruction.

Source

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

Routed event that can be used for global tracking of opening windows.

Source

pub fn construct(platform_impl: Rc<dyn IWindowImpl>) -> Window

Field initialisation of a window over the window implementation platform_impl.

Source

pub fn new() -> Ref<Window>

Creates a window over a window of the windowing platform.

§Panics

Panics when no windowing platform is registered.

Source

pub fn with_impl(platform_impl: Rc<dyn IWindowImpl>) -> Ref<Window>

Creates a window over the window implementation platform_impl.

Source

pub fn platform_impl(&self) -> Option<Rc<dyn IWindowImpl>>

The platform-specific window implementation; None once the window has closed.

Source

pub fn owned_windows(&self) -> Vec<Ref<Window>>

The child windows owned by this window.

Source

pub fn size_to_content(&self) -> SizeToContent

A value indicating how the window will size itself to fit its content.

If the value is other than SizeToContent::MANUAL, it is automatically set to SizeToContent::MANUAL if a user resizes the window by using the resize grip or dragging the border.

NOTE: Because of a limitation of X11, the value will be reset on X11 to SizeToContent::MANUAL on any resize - including the resize that happens when the window is first shown. This is because X11 resize notifications are asynchronous and there is no way to know whether a resize came from the user or the layout system. To avoid this, consider setting CanResize to false, which will disable user resizing of the window.

Source

pub fn set_size_to_content(&self, value: SizeToContent)

Source

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

The title of the window.

Source

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

Source

pub fn extend_client_area_to_decorations_hint(&self) -> bool

Whether the client area is extended into the window decorations (chrome or border).

Source

pub fn set_extend_client_area_to_decorations_hint(&self, value: bool)

Source

pub fn extend_client_area_title_bar_height_hint(&self) -> f64

The title bar height hint for when the client area is extended. A value of -1 will cause the title bar to be auto sized to the OS default. Any other positive value will cause the title bar to assume that height.

Source

pub fn set_extend_client_area_title_bar_height_hint(&self, value: f64)

Source

pub fn is_extended_into_window_decorations(&self) -> bool

Whether the client area is extended into the window decorations.

Source

pub fn window_decoration_margin(&self) -> Thickness

The thickness around the window that is used by borders and the title bar.

Source

pub fn off_screen_margin(&self) -> Thickness

The window margin that is hidden off the screen area. This is generally only the case on Windows when maximized, where the window border is hidden off the screen. This margin may be used to ensure user content doesn’t overlap this space.

Source

pub fn window_decorations(&self) -> WindowDecorations

The window decorations (title bar, border, etc).

Source

pub fn set_window_decorations(&self, value: WindowDecorations)

Source

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

The theme used to render the window decorations when they are not drawn by the system.

Source

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

Source

pub fn system_decorations(&self) -> WindowDecorations

👎Deprecated:

Use window_decorations instead.

Source

pub fn set_system_decorations(&self, value: WindowDecorations)

👎Deprecated:

Use set_window_decorations instead.

Source

pub fn show_activated(&self) -> bool

Whether a window is activated when first shown.

Source

pub fn set_show_activated(&self, value: bool)

Source

pub fn show_in_taskbar(&self) -> bool

Enables or disables the taskbar icon.

Source

pub fn set_show_in_taskbar(&self, value: bool)

Source

pub fn closing_behavior(&self) -> WindowClosingBehavior

A value indicating how the closing event behaves in the presence of child windows.

Source

pub fn set_closing_behavior(&self, value: WindowClosingBehavior)

Source

pub fn window_state(&self) -> WindowState

Represents the currently effective window state (normal, minimized, maximized).

Source

pub fn set_window_state(&self, value: WindowState)

Source

pub fn can_resize(&self) -> bool

Enables or disables resizing of the window.

Source

pub fn set_can_resize(&self, value: bool)

Source

pub fn can_minimize(&self) -> bool

Enables or disables minimizing the window.

This property might be ignored by some window managers on Linux.

Source

pub fn set_can_minimize(&self, value: bool)

Source

pub fn can_maximize(&self) -> bool

Enables or disables maximizing the window.

When CanResize is false, this property is always false. On macOS, setting this property to false also disables the full screen mode. This property might be ignored by some window managers on Linux.

Source

pub fn set_can_maximize(&self, value: bool)

Source

pub fn allowed_window_actions(&self) -> PlatformAllowedWindowActions

The window actions currently allowed by the underlying platform (internal upstream: for the window decorations).

Source

pub fn icon(&self) -> Option<Rc<WindowIcon>>

The icon of the window.

Source

pub fn set_icon(&self, value: Option<Rc<WindowIcon>>)

Source

pub fn window_startup_location(&self) -> WindowStartupLocation

The startup location of the window.

Source

pub fn set_window_startup_location(&self, value: WindowStartupLocation)

Source

pub fn position(&self) -> PixelPoint

The window position in screen coordinates.

Source

pub fn set_position(&self, value: PixelPoint)

Source

pub fn is_dialog(&self) -> bool

Whether this window was opened as a dialog.

Source

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

Starts moving a window with left button being held. Should be called from a left mouse button press event handler.

Source

pub fn begin_resize_drag(&self, edge: WindowEdge, e: &PointerPressedEventArgs)

Starts resizing a window. This function is used if an application has window resizing controls. Should be called from a left mouse button press event handler.

Source

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

Fired before a window is closed. Disposing the returned handle unsubscribes.

Source

pub fn close(&self)

Closes the window.

Source

pub fn close_with_result(&self, dialog_result: Option<Rc<dyn AnyValue>>)

Closes a dialog window with the specified result.

When the window is shown with show_dialog or show_dialog_typed, the resulting task will produce the dialog_result value when the window is closed.

Source

pub fn close_core( &self, reason: WindowCloseReason, is_programmatic: bool, ignore_cancel: bool, )

Closes the window for reason; with ignore_cancel the window closes even when a closing handler cancels (internal upstream: for the application lifetime).

Source

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

Fired when the window actions allowed by the platform change (internal upstream: for the window decorations). Disposing the returned handle unsubscribes.

Source

pub fn show_with_owner(&self, owner: &Window)

Shows the window as a child of owner.

§Panics

Panics when the window has already been closed, and when the owner is closed, not visible or the window itself.

Source

pub fn show_dialog( &self, owner: &Window, ) -> DispatcherTask<Option<Rc<dyn AnyValue>>> ⓘ

Shows the window as a dialog owned by owner.

Returns a task that can be used to track the lifetime of the dialog: it completes, from a dispatcher job, with the dialog result (see close_with_result) once the dialog has closed. Nothing blocks: the caller keeps running and the task is observed through the dispatcher.

§Panics

Panics when the window has already been closed or is already shown, and when the owner is closed, not visible or the window itself.

Source

pub fn show_dialog_typed<TResult>( &self, owner: &Window, ) -> DispatcherTask<TResult> ⓘ
where TResult: Clone + Default + 'static,

Shows the window as a dialog owned by owner; TResult is the type of the result produced by the dialog.

Returns a task that can be used to retrieve the result of the dialog when it closes: the value passed to close_with_result, or the default of TResult when the dialog closed without a result. The task fails when the dialog result is not a TResult.

§Panics

See show_dialog.

Source

pub fn sort_windows_by_z_order(windows: &mut [Ref<Window>])

Sorts the windows ascending by their Z order - the topmost window will be the last in the list.

§Panics

Panics when one of the windows is closed, and when no windowing platform is registered.

Methods from Deref<Target = WindowBase>§

Source

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

Returns a strong reference to this object.

Source

pub fn hide(&self)

Hides the window.

Source

pub fn show(&self)

Shows the window.

Source

pub fn on_resized(&self, e: &WindowResizedEventArgs)

Raises the Resized event.

Source

pub fn arrange_set_bounds(&self, size: Size) -> Size

Called during the arrange pass to set the size of the window; returns the size to arrange the content with.

Source

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

Called when the IsVisible property changes.

Source

pub fn ignore_visibility_changes(&self) -> bool

Whether visibility changes are currently ignored (protected upstream).

Source

pub fn freeze_visibility_change_handling(&self) -> IgnoreVisibilityChangesGuard

Ignores visibility changes until the returned guard is dropped (private protected upstream: for derived classes).

Source

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

Fired when the window is activated. Disposing the returned handle unsubscribes.

Source

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

Fired when the window is deactivated. Disposing the returned handle unsubscribes.

Source

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

Fired when the window position is changed. Disposing the returned handle unsubscribes.

Source

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

Fired when the window is resized. Disposing the returned handle unsubscribes.

Source

pub fn platform_impl(&self) -> Option<Rc<dyn IWindowBaseImpl>>

The platform-specific window implementation; None once the window has closed.

Source

pub fn is_active(&self) -> bool

Whether the window is active.

Source

pub fn screens(&self) -> Rc<Screens>

The screens of the platform.

§Panics

Panics when the windowing backend does not provide screens.

Source

pub fn owner(&self) -> Option<Ref<WindowBase>>

The owner of the window.

Source

pub fn set_owner(&self, value: Option<Ref<WindowBase>>)

Sets the owner of the window (protected upstream: for derived classes).

Source

pub fn topmost(&self) -> bool

Whether this window appears on top of all other windows.

Source

pub fn set_topmost(&self, value: bool)

Source

pub fn desktop_scaling(&self) -> f64

The scaling factor for window positioning and sizing.

Source

pub fn desktop_scaling_override(&self) -> Option<f64>

The desktop scaling used instead of the platform’s (private protected upstream: for derived classes).

Source

pub fn set_desktop_scaling_override(&self, value: Option<f64>)

Source

pub fn activate(&self)

Activates the window.

Source

pub fn ensure_initialized(&self)

Ensures that the window is initialized (protected upstream: for derived classes).

Methods from Deref<Target = TopLevel>§

Source

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

Returns a strong reference to this object.

Source

pub fn handle_closed(&self)

Handles a closed notification from the platform implementation.

Source

pub fn handle_resized(&self, client_size: Size, reason: WindowResizeReason)

Handles a resize notification from the platform implementation: client_size is the new client size and reason the reason for the resize.

Source

pub fn on_opened(&self)

Raises the Opened event.

Source

pub fn on_closed(&self)

Raises the Closed event.

Source

pub fn opened_popups(&self) -> Vec<Ref<Popup>>

The popups that are currently open directly in this top level, in the order they were opened.

Source

pub fn visual_layer_manager(&self) -> Option<Ref<VisualLayerManager>>

The layer manager of the control template, once the template is applied (private protected upstream: for derived classes).

Source

pub fn enable_visual_layer_manager_layers(&self)

Enables the overlay, popup overlay and text selector layers of the layer manager of the control template (private protected upstream: for the top-levels that host their popups and overlays themselves).

Source

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

Fired when the window is opened. Disposing the returned handle unsubscribes.

Source

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

Fired when the window is closed. Disposing the returned handle unsubscribes.

Source

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

Fired when the top-level’s scaling changes. Disposing the returned handle unsubscribes.

Source

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

Adds a handler to the lost-focus notification of the platform implementation (C# PlatformImpl.LostFocus += handler); it runs after the top-level’s own handling. Disposing the returned handle removes it.

The callbacks of a platform implementation hold a single function, so handlers that come and go (an open popup watching its parent) are kept in a list of the top-level instead of being chained onto the callback, where a removed handler would stay behind.

Source

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

Adds a handler to the deactivated notification of a window platform implementation (C# impl.Deactivated += handler); see platform_lost_focus.

Source

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

Adds a handler to the position-changed notification of a window platform implementation (C# impl.PositionChanged += handler); see platform_lost_focus.

Source

pub fn client_size(&self) -> Size

The client size of the window.

Source

pub fn set_client_size(&self, value: Size)

Sets the client size of the window (protected upstream: for derived classes).

Source

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

The total size of the window.

Source

pub fn set_frame_size(&self, value: Option<Size>)

Sets the total size of the window (protected upstream: for derived classes).

Source

pub fn transparency_level_hint(&self) -> WindowTransparencyLevelCollection

The transparency levels that the top-level should use when possible. Accepts multiple values which are applied in a fallback order. For instance, with “Mica, Blur” Mica will be applied only on platforms where it is possible, and Blur will be used on the rest of them. Default value is an empty collection or “None”.

Source

pub fn set_transparency_level_hint( &self, value: WindowTransparencyLevelCollection, )

Source

pub fn actual_transparency_level(&self) -> WindowTransparencyLevel

The achieved transparency level that the platform was able to provide.

Source

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

The brush that transparency will blend with when transparency is not supported. By default this is a solid white brush.

Source

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

Source

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

The theme variant requested for the top-level and its descendants.

Source

pub fn set_requested_theme_variant(&self, value: Option<ThemeVariant>)

Source

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

Occurs when physical Back Button is pressed or a back navigation has been requested.

Source

pub fn layout_manager(&self) -> Rc<LayoutManager>

The layout manager of the top-level.

Source

pub fn platform_impl(&self) -> Option<Rc<dyn ITopLevelImpl>>

The platform-specific window implementation; None once the top-level has closed.

Source

pub fn try_get_platform_handle(&self) -> Option<Rc<dyn IPlatformHandle>>

Tries to get the platform handle for the top-level-derived control.

Returns the handle describing the window, or None if the handle could not be retrieved.

Source

pub fn create_platform_impl_binding<T>( &self, property: &'static StyledProperty<T>, on_value: impl Fn(T) + 'static, )
where T: PropertyValue,

Calls on_value with the value of property now and whenever the property changes, for as long as the top-level has a platform implementation (private protected upstream: for derived classes).

Source

pub fn presentation_source(&self) -> &Rc<PresentationSource>

The presentation source of the top-level.

Source

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

The input root of the top-level.

Source

pub fn renderer(&self) -> Rc<dyn ITopLevelRenderer>

The renderer for the window.

Source

pub fn hit_tester_override(&self) -> Option<Rc<dyn IHitTester>>

The hit tester used instead of the renderer’s. This is here purely for unit tests that don’t want to set up a proper hit-testable visual tree.

Source

pub fn set_hit_tester_override(&self, value: Option<Rc<dyn IHitTester>>)

Source

pub fn renderer_diagnostics(&self) -> Rc<RendererDiagnostics>

A value controlling whether the renderer should draw specific diagnostics.

Source

pub fn last_pointer_position(&self) -> Option<PixelPoint>

The last known position of the pointer, in screen coordinates.

Source

pub fn access_key_handler(&self) -> Option<Rc<dyn IAccessKeyHandler>>

The access key handler for the window.

Source

pub fn tests_keyboard_navigation_handler( &self, ) -> Option<Rc<dyn IKeyboardNavigationHandler>>

The keyboard navigation handler of the window (for unit tests).

Source

pub fn render_scaling(&self) -> f64

The scaling factor to use in rendering.

Source

pub fn storage_provider(&self) -> Rc<dyn IStorageProvider>

File System storage service used for file pickers and bookmarks: the provider of the registered storage provider factory, else the one of the platform, else one without pickers. The provider is created on first use and kept.

Source

pub fn insets_manager(&self) -> Option<Rc<dyn IInsetsManager>>

The insets manager of the platform, if it has one.

Source

pub fn input_pane(&self) -> Option<Rc<dyn IInputPane>>

The input pane of the platform, if it has one.

Source

pub fn launcher(&self) -> Rc<dyn ILauncher>

The launcher of the platform: starts the default app associated with a file or a URI. A launcher that launches nothing when the platform has none.

Source

pub fn screens(&self) -> Option<Rc<Screens>>

The platform screens implementation.

Source

pub fn clipboard(&self) -> Option<Rc<dyn IClipboard>>

The platform’s clipboard implementation.

Source

pub fn try_get_clipboard( &self, type_: ClipboardType, ) -> Option<Rc<dyn IClipboard>>

Gets the platform’s clipboard of the specified type, or None if the platform doesn’t provide it.

Source

pub fn focus_manager(&self) -> Rc<FocusManager>

The focus manager of the root.

Source

pub fn request_platform_inhibition( &self, type_: PlatformInhibitionType, reason: &str, ) -> DispatcherTask<Rc<dyn IDisposable>> ⓘ

Requests a PlatformInhibitionType to be inhibited. The behavior remains inhibited until the returned value is disposed. The available set of PlatformInhibitionTypes depends on the platform. If a behavior is inhibited on a platform where this type is not supported the request will have no effect.

Like the asynchronous method of the reference, the request is sent to the platform before this returns; the returned task completes, from a dispatcher job unless the platform completed at once, when the platform has applied it. Disposing the result starts the request that lifts the inhibition and returns without waiting for the platform to complete it.

Source

pub fn request_animation_frame(&self, action: impl FnOnce(TimeSpan) + 'static)

Enqueues a callback to be called on the next animation tick.

Source

pub fn start_rendering(&self)

Registers the top-level with the media context, which starts its renderer (private protected upstream: for derived classes).

Source

pub fn stop_rendering(&self)

Unregisters the top-level from the media context, which stops its renderer (private protected upstream: for derived classes).

Source

pub fn media_context_key(&self) -> usize

The key that identifies the top-level in the media context.

Source

pub fn ensure_closed(&self)

Runs the top level teardown exactly once, no matter whether it was initiated by the platform via the closed notification or by a managed dispose (private protected upstream: for derived classes).

Source

pub fn add_opened_popup(&self, popup: &Ref<Popup>)

Records a popup opened directly in this top level (internal upstream).

Source

pub fn remove_opened_popup(&self, popup: &Ref<Popup>)

Forgets a popup opened directly in this top level (internal upstream).

Source

pub fn as_closeable(&self) -> Rc<dyn ICloseable>

The top-level as something that tells when it has been closed.

Methods from Deref<Target = ContentControl>§

Source

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

Returns a strong reference to this object.

Source

pub fn register_content_presenter(&self, presenter: &ContentPresenter) -> bool

Called when a content presenter whose templated parent is this control is created. Returns true if the presenter was registered as a presenter of the control.

Source

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

The content to display.

Source

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

Source

pub fn content_template(&self) -> Option<Rc<dyn IDataTemplate>>

The data template used to display the content of the control.

Source

pub fn set_content_template(&self, value: Option<Rc<dyn IDataTemplate>>)

Source

pub fn presenter(&self) -> Option<Ref<ContentPresenter>>

The presenter from the control’s template.

Source

pub fn horizontal_content_alignment(&self) -> HorizontalAlignment

The horizontal alignment of the content within the control.

Source

pub fn set_horizontal_content_alignment(&self, value: HorizontalAlignment)

Source

pub fn vertical_content_alignment(&self) -> VerticalAlignment

The vertical alignment of the content within the control.

Source

pub fn set_vertical_content_alignment(&self, value: VerticalAlignment)

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<&Rc<dyn AnyValue>>, 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<Rc<dyn AnyValue>>

A user-defined object attached to the control.

Source

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

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>(&self, name: &str) -> Option<Ref<T>>
where T: ObjectType,

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>(&self, name: &str) -> Ref<T>
where T: ObjectType,

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 ContentControlImpl for Window

Source§

fn register_content_presenter(this: &Self, presenter: &ContentPresenter) -> bool

Called when a content presenter whose templated parent is this control is created. Returns true if the presenter was registered as a presenter of the control.
Source§

impl ControlImpl for Window

Source§

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

Returns a new, type-specific automation peer implementation for the control.
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§

impl Deref for Window

Source§

type Target = WindowBase

The resulting type after dereferencing.
Source§

fn deref(&self) -> &WindowBase

Dereferences the value.
Source§

impl FerroObjectImpl for Window

Source§

fn constructed(this: &Window)

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: &Window, 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 IFocusScope for Window

Source§

impl InputElementImpl for Window

Source§

fn is_focus_scope(_this: &Window) -> bool

Whether the element is a focus scope: an element that remembers which of its descendants was focused last.
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 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 Window

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 Window

Source§

fn measure_override(this: &Window, 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 Window

Source§

type Parent = WindowBase

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

type VTable = WindowVTable

The virtual table of the class.
Source§

fn vtable() -> &'static <Window as ObjectType>::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 Window

Source§

const TYPE: &'static TypeInfo

The runtime type.
Source§

impl StyledElementImpl for Window

Source§

fn style_key_override(_this: &Window) -> &'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 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 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 Window

Source§

impl TemplatedControlImpl for Window

Source§

fn on_apply_template(this: &Window, 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 TopLevelImpl for Window

Source§

fn handle_closed(this: &Window)

Handles a closed notification from the platform implementation.
Source§

fn handle_resized(this: &Window, client_size: Size, reason: WindowResizeReason)

Handles a resize notification from the platform implementation: client_size is the new client size and reason the reason for the resize.
Source§

fn on_opened(this: &Self)

Raises the Opened event.
Source§

fn on_closed(this: &Self)

Raises the Closed event.
Source§

fn opened_popups(this: &Self) -> Vec<Ref<Popup>>

The popups that are currently open directly in this top level, in the order they were opened.
Source§

impl<T> Upcast<T> for Window
where WindowBase: Upcast<T>, T: ?Sized,

Source§

fn upcast(&self) -> &T

Source§

impl Upcast<Window> for Window

Source§

fn upcast(&self) -> &Window

Source§

impl ViewClass for Window

Source§

fn create() -> Ref<Self>

Creates a control of the class.
Source§

impl VisualImpl for Window

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_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 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.
Source§

impl WindowBaseImpl for Window

Source§

fn hide(this: &Window)

Hides the window but does not close it.

Source§

fn show(this: &Window)

Shows the window.

§Panics

Panics when the window has already been closed.

Source§

fn arrange_set_bounds(this: &Window, size: Size) -> Size

Called during the arrange pass to set the size of the window; returns the size to arrange the content with.
Source§

fn is_visible_changed(this: &Window, e: &FerroPropertyChangedEventArgs<'_>)

Called when the IsVisible property changes.
Source§

fn on_resized(this: &Self, e: &WindowResizedEventArgs)

Raises the Resized event.
Source§

impl WindowImpl for Window

Source§

fn handle_closing(this: &Window, reason: WindowCloseReason) -> bool

Handles a closing notification from the platform implementation. Returns true if closing is cancelled, otherwise false. reason is the reason the window is closing.
Source§

fn on_closing(this: &Window, e: &WindowClosingEventArgs)

Raises the Closing event. Read more

Auto Trait Implementations§

§

impl !Freeze for Window

§

impl !RefUnwindSafe for Window

§

impl !Send for Window

§

impl !Sync for Window

§

impl !UnwindSafe for Window

§

impl Unpin for Window

§

impl UnsafeUnpin for Window

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> Builder for T
where T: ViewClass,

Source§

type Output = El<T>

The builder of an element of the name.
Source§

fn builder() -> El<T>

Starts an element.
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> ContentControlImplExt for T

Source§

fn parent_register_content_presenter( this: &Self, presenter: &ContentPresenter, ) -> bool

Calls the base class implementation of the member.
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> IntoValue<T> for T

Source§

fn into_value(self) -> T

The value of the property.
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> TopLevelImplExt for T
where T: TopLevelImpl,

Source§

fn parent_handle_closed(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_handle_resized( this: &Self, client_size: Size, reason: WindowResizeReason, )

Calls the base class implementation of the member.
Source§

fn parent_on_opened(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_closed(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_opened_popups(this: &Self) -> Vec<Ref<Popup>>

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.
Source§

impl<T> WindowBaseImplExt for T
where T: WindowBaseImpl,

Source§

fn parent_hide(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_show(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_resized(this: &Self, e: &WindowResizedEventArgs)

Calls the base class implementation of the member.
Source§

fn parent_arrange_set_bounds(this: &Self, size: Size) -> Size

Calls the base class implementation of the member.
Source§

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

Calls the base class implementation of the member.
Source§

impl<T> WindowImplExt for T
where T: WindowImpl,

Source§

fn parent_handle_closing(this: &Self, reason: WindowCloseReason) -> bool

Calls the base class implementation of the member.
Source§

fn parent_on_closing(this: &Self, e: &WindowClosingEventArgs)

Calls the base class implementation of the member.