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.
Sourcepub fn open(&mut self, request: Surface) -> Decision
pub fn open(&mut self, request: Surface) -> Decision
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
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.
Trait Implementations§
Source§impl Clone for SurfaceManager
impl Clone for SurfaceManager
Source§fn clone(&self) -> SurfaceManager
fn clone(&self) -> SurfaceManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SurfaceManager
impl RefUnwindSafe for SurfaceManager
impl Send for SurfaceManager
impl Sync for SurfaceManager
impl Unpin for SurfaceManager
impl UnsafeUnpin for SurfaceManager
impl UnwindSafe for SurfaceManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more