Trait kas::layout::RulesSetter [−][src]
pub trait RulesSetter {
type Storage: Clone;
type ChildInfo;
fn child_rect(
&mut self,
storage: &mut Self::Storage,
child_info: Self::ChildInfo
) -> Rect;
fn maximal_rect_of(
&mut self,
storage: &mut Self::Storage,
index: Self::ChildInfo
) -> Rect;
}
Expand description
Resolves a RulesSolver
solution for each child
Associated Types
Type required by RulesSolver::for_child
(see implementation documentation)
Required methods
fn child_rect(
&mut self,
storage: &mut Self::Storage,
child_info: Self::ChildInfo
) -> Rect
fn child_rect(
&mut self,
storage: &mut Self::Storage,
child_info: Self::ChildInfo
) -> Rect
Called once for each child. The order is unimportant.
fn maximal_rect_of(
&mut self,
storage: &mut Self::Storage,
index: Self::ChildInfo
) -> Rect
fn maximal_rect_of(
&mut self,
storage: &mut Self::Storage,
index: Self::ChildInfo
) -> Rect
Calculates the maximal rect of a given child
This assumes that all other entries have minimum size.