SystemPopover
在独立的原生子窗口中显示 QuickGUI 内容,可超出所属窗口边界。
#导入
从 quickgui 导入 SystemPopover。
use quickgui::*;#用法
SystemPopover::new(320.0, 240.0)#结构
SystemPopover::rootSystemPopover::triggerSystemPopover::content
#API 参考
展开条目查看说明和完整签名。短横线表示声明中未记录默认值。
SystemPopover
查看源码pub fn new(width: f32, height: f32) -> Selfsizepub const fn size(self) -> Size—
placementpub const fn placement(mut self, placement: AnchorPlacement) -> Self—
Configures placement for this part.
pub const fn placement(mut self, placement: AnchorPlacement) -> Self查看源码gappub fn gap(mut self, gap: f32) -> Self—
viewport_marginpub fn viewport_margin(mut self, margin: f32) -> Self—
Set the collision margin inside the display work area.
pub fn viewport_margin(mut self, margin: f32) -> Self查看源码dismiss_on_escapepub const fn dismiss_on_escape(mut self, dismiss: bool) -> Self—
Configures dismiss on escape for this part.
pub const fn dismiss_on_escape(mut self, dismiss: bool) -> Self查看源码dismiss_on_pointer_outsidepub const fn dismiss_on_pointer_outside(mut self, dismiss: bool) -> Self—
Configures dismiss on pointer outside for this part.
pub const fn dismiss_on_pointer_outside(mut self, dismiss: bool) -> Self查看源码offsetpub fn offset(mut self, x: f32, y: f32) -> Self—
constraint_adjustmentpub const fn constraint_adjustment(mut self, constraints: PopoverConstraintAdjustment) -> Self—
Configures constraint adjustment for this part.
pub const fn constraint_adjustment(mut self, constraints: PopoverConstraintAdjustment) -> Self查看源码grabpub const fn grab(mut self, grab: bool) -> Self—
Select menu-style focus and outside/Escape dismissal. Passive tooltips and preview surfaces use `grab(false)` and own no event monitor.
pub const fn grab(mut self, grab: bool) -> Self查看源码accepts_key_focuspub const fn accepts_key_focus(mut self, accepts_key_focus: bool) -> Self—
Allow or forbid native key-window ownership after pointer interaction. `false` keeps an interactive child panel permanently non-key and also disables grabbing, which lets an owner-window text input retain keyboard and IME focus.
pub const fn accepts_key_focus(mut self, accepts_key_focus: bool) -> Self查看源码popover_optionspub fn popover_options(self) -> PopoverOptions—
window_optionspub fn window_options(self, title: impl Into<String>) -> WindowOptions—
Build transparent, borderless window options without choosing application presentation.
pub fn window_options(self, title: impl Into<String>) -> WindowOptions查看源码openpub fn open<V: View>( self, cx: &mut EventContext, anchor: impl Into<ElementId>, title: impl Into<String>, view: V, ) -> Result<WindowHandle, WindowCommandError>—
Open the overflow-capable child using the latest retained bounds of `anchor`.
pub fn open<V: View>( self, cx: &mut EventContext, anchor: impl Into<ElementId>, title: impl Into<String>, view: V, ) -> Result<WindowHandle, WindowCommandError>查看源码