struct UiState<B: Backend> {
backend: Rc<B>,
layout: Layout<B::Widget>,
windows: Vec<Option<WindowState<B>>>,
on_close: Option<WindowCloseHandler>,
}Fields§
§backend: Rc<B>§layout: Layout<B::Widget>§windows: Vec<Option<WindowState<B>>>Indexed by WindowId; None once closed, so the ids of other windows stay valid.
on_close: Option<WindowCloseHandler>What runs when the user asks to close a window; without one, it closes.
Implementations§
Source§impl<B: Backend> UiState<B>
impl<B: Backend> UiState<B>
fn window(&self, window: WindowId) -> &WindowState<B>
fn invalidate(&mut self, window: WindowId)
Sourcefn resize(&mut self, window: WindowId, size: Size)
fn resize(&mut self, window: WindowId, size: Size)
A closed window can still report a resize that was already on its way, so that is ignored rather than treated as a mistake.
Sourcefn remove_tree(&mut self, node: NodeId)
fn remove_tree(&mut self, node: NodeId)
Removes node and everything under it, taking their widgets off screen.
fn layout_window(&mut self, window: WindowId)
Auto Trait Implementations§
impl<B> !RefUnwindSafe for UiState<B>
impl<B> !Send for UiState<B>
impl<B> !Sync for UiState<B>
impl<B> !UnwindSafe for UiState<B>
impl<B> Freeze for UiState<B>
impl<B> Unpin for UiState<B>
impl<B> UnsafeUnpin for UiState<B>
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