Skip to main content

ferroui_base/layout/
i_layout_root.rs

1use super::{ILayoutManager, Layoutable};
2use crate::Ref;
3use std::rc::Rc;
4
5/// Defines the root of a tree that can be laid out.
6pub trait ILayoutRoot {
7    /// The scaling factor to use in layout.
8    fn layout_scaling(&self) -> f64;
9
10    /// The layout manager that lays out the tree.
11    fn layout_manager(&self) -> Rc<dyn ILayoutManager>;
12
13    /// The root layoutable.
14    fn root_visual(&self) -> Ref<Layoutable>;
15}