Skip to main content

PopupImpl

Struct PopupImpl 

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

A macOS popup window.

Implementations§

Source§

impl PopupImpl

Source

pub fn native(&self) -> Option<ComPtr<IFrnPopup>>

The native popup; None once the popup is disposed.

Trait Implementations§

Source§

impl IDisposable for PopupImpl

Source§

fn dispose(&self)

Source§

impl IOptionalFeatureProvider for PopupImpl

Source§

fn try_get_feature(&self, feature_type: TypeId) -> Option<Rc<dyn Any>>

Queries for an optional feature.
Source§

impl IPopupImpl for PopupImpl

Source§

fn popup_positioner(&self) -> Option<Rc<dyn IPopupPositioner>>

Gets the positioner of the popup, if the platform provides one.
Source§

fn set_window_manager_add_shadow_hint(&self, _enabled: bool)

Sets a hint to the window manager whether the popup should have a shadow.
Source§

fn take_focus(&self)

Allows the popup to take focus.
Source§

fn set_hit_test_visible(&self, is_hit_test_visible: bool)

Sets whether the popup takes part in hit testing.
Source§

impl ITopLevelImpl for PopupImpl

Source§

fn desktop_scaling(&self) -> f64

Gets the scaling factor for window positioning and sizing.
Source§

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

Get the platform handle.
Source§

fn client_size(&self) -> Size

Gets the client size of the toplevel.
Source§

fn render_scaling(&self) -> f64

Gets the scaling factor for the toplevel. This is used for rendering.
Source§

fn surfaces(&self) -> Vec<Arc<dyn IPlatformRenderSurface>>

The list of native platform’s surfaces that can be consumed by rendering subsystems. Read more
Source§

fn render_surfaces( &self, ) -> Arc<dyn Fn() -> Vec<Arc<dyn IPlatformRenderSurface>> + Send + Sync> ⓘ

The surfaces as the thread that renders asks for them: the function is called by that thread whenever the renderer (re)creates its render target (the reference reads Surfaces of the top-level there). Read more
Source§

fn compositor(&self) -> Option<Rc<Compositor>>

Gets the compositor that is used for the toplevel, if the platform renders through one.
Source§

fn input(&self) -> Option<Rc<dyn Fn(Rc<dyn IRawInputEventArgs>)>>

Gets the method called when the toplevel receives input.
Source§

fn set_input(&self, value: Option<Rc<dyn Fn(Rc<dyn IRawInputEventArgs>)>>)

Sets a method called when the toplevel receives input.
Source§

fn paint(&self) -> Option<Rc<dyn Fn(Rect)>>

Gets the method called when the toplevel requires painting.
Source§

fn set_paint(&self, value: Option<Rc<dyn Fn(Rect)>>)

Sets a method called when the toplevel requires painting.
Source§

fn resized(&self) -> Option<Rc<dyn Fn(Size, WindowResizeReason)>>

Gets the method called when the toplevel is resized.
Source§

fn set_resized(&self, value: Option<Rc<dyn Fn(Size, WindowResizeReason)>>)

Sets a method called when the toplevel is resized.
Source§

fn scaling_changed(&self) -> Option<Rc<dyn Fn(f64)>>

Gets the method called when the toplevel’s scaling changes.
Source§

fn set_scaling_changed(&self, value: Option<Rc<dyn Fn(f64)>>)

Sets a method called when the toplevel’s scaling changes.
Source§

fn transparency_level_changed( &self, ) -> Option<Rc<dyn Fn(WindowTransparencyLevel)>>

Gets the method called when the toplevel’s transparency level changes.
Source§

fn set_transparency_level_changed( &self, value: Option<Rc<dyn Fn(WindowTransparencyLevel)>>, )

Sets a method called when the toplevel’s transparency level changes.
Source§

fn set_input_root(&self, input_root: Rc<dyn IInputRoot>)

Sets the input root for the toplevel.
Source§

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

Converts a point from screen to client coordinates.
Source§

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

Converts a point from client to screen coordinates.
Source§

fn set_cursor(&self, cursor: Option<Rc<dyn ICursorImpl>>)

Sets the cursor associated with the toplevel; None stands for the default cursor.
Source§

fn closed(&self) -> Option<Rc<dyn Fn()>>

Gets the method called when the underlying implementation is destroyed.
Source§

fn set_closed(&self, value: Option<Rc<dyn Fn()>>)

Sets a method called when the underlying implementation is destroyed.
Source§

fn lost_focus(&self) -> Option<Rc<dyn Fn()>>

Gets the method called when the input focus is lost.
Source§

fn set_lost_focus(&self, value: Option<Rc<dyn Fn()>>)

Sets a method called when the input focus is lost.
Source§

fn create_popup(&self) -> Option<Rc<dyn IPopupImpl>>

Creates a popup that belongs to the toplevel, if the platform supports native popups.
Source§

fn set_transparency_level_hint( &self, transparency_levels: &[WindowTransparencyLevel], )

Sets the transparency level hint of the toplevel, in order of preference.
Source§

fn transparency_level(&self) -> WindowTransparencyLevel

Gets the current transparency level of the toplevel.
Source§

fn acrylic_compensation_levels(&self) -> AcrylicPlatformCompensationLevels

Gets the acrylic compensation levels for the platform.
Source§

fn set_frame_theme_variant(&self, theme_variant: Option<PlatformThemeVariant>)

Sets the theme variant on the frame if it should be dark or light. Also applies for the mica and acrylic backdrops, if they are applied; None follows the system.
Source§

fn as_any(&self) -> &dyn Any

Lets callers recover the concrete implementation type.
Source§

fn as_window_base_impl(&self) -> Option<&dyn IWindowBaseImpl>

The toplevel as a window base implementation, if it is one.
Source§

fn as_popup_impl(&self) -> Option<&dyn IPopupImpl>

The toplevel as a popup implementation, if it is one.
Source§

fn platform_specific_scene_info(&self) -> Option<Arc<dyn Any + Send + Sync>>

Gets the platform-specific scene info, which is passed to the render target of the toplevel.
Source§

fn platform_specific_scene_info_changed( &self, ) -> Option<Rc<dyn Fn(Option<Arc<dyn Any + Send + Sync>>)>>

Gets the method called when the platform-specific scene info changes.
Source§

fn set_platform_specific_scene_info_changed( &self, _value: Option<Rc<dyn Fn(Option<Arc<dyn Any + Send + Sync>>)>>, )

Sets a method called when the platform-specific scene info changes.
Source§

fn as_window_impl(&self) -> Option<&dyn IWindowImpl>

The toplevel as a window implementation, if it is one.
Source§

fn as_win32_options_top_level_impl( &self, ) -> Option<&dyn IWin32OptionsTopLevelImpl>

The toplevel as the Win32-specific options of a toplevel, if it has them.
Source§

impl IWindowBaseImpl for PopupImpl

Source§

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

Gets the total size of the toplevel, excluding shadows.
Source§

fn show(&self, activate: bool, is_dialog: bool)

Shows the window. Read more
Source§

fn hide(&self)

Hides the window.
Source§

fn position(&self) -> PixelPoint

Gets the position of the window in device pixels.
Source§

fn position_changed(&self) -> Option<Rc<dyn Fn(PixelPoint)>>

Gets the method called when the window’s position changes.
Source§

fn set_position_changed(&self, value: Option<Rc<dyn Fn(PixelPoint)>>)

Sets a method called when the window’s position changes.
Source§

fn activate(&self)

Activates the window.
Source§

fn deactivated(&self) -> Option<Rc<dyn Fn()>>

Gets the method called when the window is deactivated (loses focus).
Source§

fn set_deactivated(&self, value: Option<Rc<dyn Fn()>>)

Sets a method called when the window is deactivated (loses focus).
Source§

fn activated(&self) -> Option<Rc<dyn Fn()>>

Gets the method called when the window is activated (receives focus).
Source§

fn set_activated(&self, value: Option<Rc<dyn Fn()>>)

Sets a method called when the window is activated (receives focus).
Source§

fn max_auto_size_hint(&self) -> Size

Gets a maximum client size hint for an auto-sizing window, in device-independent pixels.
Source§

fn set_topmost(&self, value: bool)

Sets whether this window appears on top of all other windows.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

fn static_constructor()

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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