Struct limn_layout::Layout
[−]
[src]
pub struct Layout { pub vars: LayoutVars, pub name: Option<String>, pub id: LayoutId, pub hidden: bool, // some fields omitted }
Represents a single item in the overall layout hierarchy with a bounding rectangle and an id.
Modifying any properties of this layout only stores those changes here, they won't affect the solver until this struct is passed to the solver.
Fields
vars: LayoutVars
name: Option<String>
id: LayoutId
Methods
impl Layout
[src]
pub fn new(id: LayoutId, name: Option<String>) -> Self
[src]
Creates a new Layout
.
pub fn layout(&mut self) -> &mut Self
[src]
pub fn no_container(&mut self)
[src]
Clears the container of the current Layout
.
pub fn set_container<T>(&mut self, container: T) where
T: LayoutContainer + 'static,
[src]
T: LayoutContainer + 'static,
Replaces the container of the current layout. The container is what determines what constraints will be added between this layout and it's children, as they are added, if any.
pub fn edit_left(&mut self) -> VariableEditable
[src]
pub fn edit_top(&mut self) -> VariableEditable
[src]
pub fn edit_right(&mut self) -> VariableEditable
[src]
pub fn edit_bottom(&mut self) -> VariableEditable
[src]
pub fn edit_width(&mut self) -> VariableEditable
[src]
pub fn edit_height(&mut self) -> VariableEditable
[src]
pub fn create_constraint<B: ConstraintBuilder>(
&self,
builder: B
) -> Vec<Constraint>
[src]
&self,
builder: B
) -> Vec<Constraint>