pub fn new(mut layout: Layout) -> Result<Self> {
        if layout.components.is_empty() {
            return Err(Error::EmptyLayout);
        }

        layout.remount();

        Ok(Self {
            layout,
            selected_component: 0,
        })
    }
/// Creates a new Layout Editor that modifies the Layout provided. Creation
/// of the Layout Editor fails when a Layout with no components is provided.
Creates a new Layout Editor that modifies the Layout provided. Creation
of the Layout Editor fails when a Layout with no components is provided.
Creates a new Layout Editor that modifies the Layout provided . Creation of the Layout Editor fails when a Layout with no components is provided .
pub fn new(mut layout: Layout) -> Result<Self> {
        if layout.components.is_empty() {
            return Err(Error::EmptyLayout);
        }
        layout.remount();
        Ok(Self {
            layout,
            selected_component: 0,
        })
    }
pub fn new ( mut layout : Layout ) -> Result < Self > { if layout . components . is_empty ( ) { return Err ( Error :: EmptyLayout ) ; } layout . remount ( ) ; Ok ( Self { layout , selected_component : 0 , } ) }
Creates a new Layout Editor that modifies the Layout provided.
Creates a new Layout Editor that modifies the Layout provided .
layout
Layout
layout
Layout