Skip to main content

MultiWindowManager

Struct MultiWindowManager 

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

跨平台多窗口会话管理器(支持主窗 + 任意副窗 + 越界浮层 Popover + 统一广播事件与独立脏区步进)。

Implementations§

Source§

impl MultiWindowManager

Source

pub fn new() -> Self

Source

pub fn open_window<V: View>( &mut self, spec: MultiWindowSpec, root_view: V, ) -> MultiWindowId

打开并挂载一个新窗口(可为主窗、副窗或越界 Popover 浮层)。

Source

pub fn close_window(&mut self, id: MultiWindowId) -> bool

关闭指定窗口(同时自动级联关闭挂接在该父窗口下的所有 Popover / Tooltip 子浮层)。

Source

pub fn window_count(&self) -> usize

Source

pub fn window(&self, id: MultiWindowId) -> Option<&WindowSession>

Source

pub fn window_mut(&mut self, id: MultiWindowId) -> Option<&mut WindowSession>

Source

pub fn dispatch_event(&mut self, id: MultiWindowId, event: InputEvent) -> bool

向指定窗口派发输入事件。

Source

pub fn broadcast_event(&mut self, event: InputEvent) -> usize

向全部窗口广播系统级事件(如 InputEvent::SystemThemeChanged)。

Source

pub fn step_all( &mut self, dt_ms: u16, ) -> Vec<(MultiWindowId, usize, Option<AccessKitTreeUpdate>)>

步进所有活跃窗口一帧,返回产出脏区的 (WindowId, dirty_count, Option<AccessKitTreeUpdate>) 列表。

Source

pub fn hit_test_csd(&self, id: MultiWindowId, x: i16, y: i16) -> CsdHitZone

判定指定窗口坐标处的无边框 CSD 命中区域(供拖动标题栏/边缘缩放)。

Trait Implementations§

Source§

impl Default for MultiWindowManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> FluentBuilder for T

Source§

fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self

当 condition 为 true 时执行闭包修饰自身,否则原样返回。
Source§

fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self

根据 condition 在两个修饰分支之间二选一。
Source§

fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self

当 option 为 Some(value) 时执行闭包修饰自身,否则原样返回。
Source§

fn when_none<O>( self, option: &Option<O>, then: impl FnOnce(Self) -> Self, ) -> Self

当 option 为 None 时执行闭包修饰自身,否则原样返回。
Source§

fn apply<U>(self, f: impl FnOnce(Self) -> U) -> U

通用管道映射变换(避免与 Iterator::map / Option::map 重名)。
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.