pub struct SurfaceManager { /* private fields */ }Expand description
One window’s stateful surface driver.
Implementations§
Source§impl SurfaceManager
impl SurfaceManager
Sourcepub fn new(width: f64) -> Self
pub fn new(width: f64) -> Self
New manager for a container of width logical px, default policy.
pub fn with_policy(width: f64, policy: Policy) -> Self
pub fn graph(&self) -> &SurfaceGraph
pub fn size_class(&self) -> SizeClass
pub fn width(&self) -> f64
Sourcepub fn set_width(&mut self, width: f64) -> bool
pub fn set_width(&mut self, width: f64) -> bool
Update the container width. Returns true if the SizeClass changed
after hysteresis, i.e. when the skin must re-derive its layout.
Report the platform’s live sidebar allocation. Mobile/custom hosts use zero; desktop shells update this during resize and collapse.
Sourcepub fn open(&mut self, request: Surface) -> OpenOutcome
pub fn open(&mut self, request: Surface) -> OpenOutcome
Open (or replace by id) a surface through the arbiter at the current size. Always leaves the graph valid; returns the structured decision.
Sourcepub fn close(&mut self, id: &str) -> Vec<SurfaceId> ⓘ
pub fn close(&mut self, id: &str) -> Vec<SurfaceId> ⓘ
Close a surface; returns the ids actually removed (target + cascades).
pub fn set_active_main(&mut self, id: &str) -> bool
pub fn set_focus(&mut self, id: &str) -> bool
pub fn show(&mut self, id: &str) -> bool
pub fn hide(&mut self, id: &str) -> bool
Sourcepub fn derive(&self) -> DerivedLayout
pub fn derive(&self) -> DerivedLayout
Derive the platform-agnostic layout output at the current size.
Sourcepub fn presentation_plan(&self) -> LayoutPresentationPlan
pub fn presentation_plan(&self) -> LayoutPresentationPlan
Build the stable, skin-bindable LayoutPresentationPlan at the current
size — the renderable contract platforms reconcile against. Slot
admission respects both the size-class ceiling and the physical fit at
the current width (§3.3).
Trait Implementations§
Source§impl Clone for SurfaceManager
impl Clone for SurfaceManager
Source§fn clone(&self) -> SurfaceManager
fn clone(&self) -> SurfaceManager
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more