pub fn state(&self) -> State {
        let components = self
            .layout
            .components
            .iter()
            .map(|c| c.name().into_owned())
            .collect();

        let buttons = Buttons {
            can_remove: self.can_remove_component(),
            can_move_up: self.can_move_component_up(),
            can_move_down: self.can_move_component_down(),
        };

        State {
            components,
            buttons,
            selected_component: self.selected_component as u32,
            component_settings: self.layout.components[self.selected_component]
                .settings_description(),
            general_settings: self.layout.general_settings().settings_description(),
        }
    }
/// Calculates the Layout Editor's state in order to visualize it.
Calculates the Layout Editor's state in order to visualize it.
Calculates the Layout Editor ' s state in order to visualize it .
pub fn state(&self) -> State {
        let components = self
            .layout
            .components
            .iter()
            .map(|c| c.name().into_owned())
            .collect();
        let buttons = Buttons {
            can_remove: self.can_remove_component(),
            can_move_up: self.can_move_component_up(),
            can_move_down: self.can_move_component_down(),
        };
        State {
            components,
            buttons,
            selected_component: self.selected_component as u32,
            component_settings: self.layout.components[self.selected_component]
                .settings_description(),
            general_settings: self.layout.general_settings().settings_description(),
        }
    }
pub fn state ( & self ) -> State { let components = self . layout . components . iter ( ) . map ( | c | c . name ( ) . into_owned ( ) ) . collect ( ) ; let buttons = Buttons { can_remove : self . can_remove_component ( ) , can_move_up : self . can_move_component_up ( ) , can_move_down : self . can_move_component_down ( ) , } ; State { components , buttons , selected_component : self . selected_component as u32 , component_settings : self . layout . components [ self . selected_component ] . settings_description ( ) , general_settings : self . layout . general_settings ( ) . settings_description ( ) , } }
Calculates the Layout Editor's state in order to visualize it.
Calculates the Layout Editor ' s state in order to visualize it .
&self
&self