use super::{FlexBox, FlexBoxProps, SurfaceProps};
use crate::{CommonResult, Pos, Size};
pub trait LayoutManagement {
fn surface_start(&mut self, bounds_props: SurfaceProps) -> CommonResult<()>;
fn surface_end(&mut self) -> CommonResult<()>;
fn box_start(&mut self, flex_box_props: FlexBoxProps) -> CommonResult<()>;
fn box_end(&mut self) -> CommonResult<()>;
}
pub trait PerformPositioningAndSizing {
fn update_insertion_pos_for_next_box(
&mut self,
allocated_size: Size,
) -> CommonResult<Pos>;
fn current_box(&mut self) -> CommonResult<&mut FlexBox>;
fn no_boxes_added(&self) -> bool;
fn add_root_box(&mut self, props: FlexBoxProps) -> CommonResult<()>;
fn add_non_root_box(&mut self, props: FlexBoxProps) -> CommonResult<()>;
}