Enum egui_dock::dock_state::surface::Surface
source · pub enum Surface<Tab> {
Empty,
Main(Tree<Tab>),
Window(Tree<Tab>, WindowState),
}
Expand description
A Surface
is the highest level component in a DockState
. Surface
s represent an area
in which nodes are placed. Typically, you’re only using one surface, which is the main surface. However, if you drag
a tab out in a way which creates a window, you also create a new surface in which nodes can appear.
Variants§
Empty
An empty surface, with nothing inside (practically, a null surface).
Main(Tree<Tab>)
The main surface of a DockState
, only one should exist at surface index 0 at any one time.
Window(Tree<Tab>, WindowState)
A windowed surface with a state.
Implementations§
source§impl<Tab> Surface<Tab>
impl<Tab> Surface<Tab>
sourcepub fn node_tree_mut(&mut self) -> Option<&mut Tree<Tab>>
pub fn node_tree_mut(&mut self) -> Option<&mut Tree<Tab>>
Get mutable access to the node tree of this surface.
sourcepub fn iter_nodes(&self) -> impl Iterator<Item = &Node<Tab>>
pub fn iter_nodes(&self) -> impl Iterator<Item = &Node<Tab>>
sourcepub fn iter_nodes_mut(&mut self) -> impl Iterator<Item = &mut Node<Tab>>
pub fn iter_nodes_mut(&mut self) -> impl Iterator<Item = &mut Node<Tab>>
sourcepub fn iter_all_tabs(&self) -> impl Iterator<Item = (NodeIndex, &Tab)>
pub fn iter_all_tabs(&self) -> impl Iterator<Item = (NodeIndex, &Tab)>
Returns an Iterator
of all tabs in this surface’s tree,
and indices of containing nodes.
Trait Implementations§
Auto Trait Implementations§
impl<Tab> RefUnwindSafe for Surface<Tab>where
Tab: RefUnwindSafe,
impl<Tab> Send for Surface<Tab>where
Tab: Send,
impl<Tab> Sync for Surface<Tab>where
Tab: Sync,
impl<Tab> Unpin for Surface<Tab>where
Tab: Unpin,
impl<Tab> UnwindSafe for Surface<Tab>where
Tab: UnwindSafe,
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