[][src]Trait kas::layout::RulesSetter

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; }

Resolves a RulesSolver solution for each child

Associated Types

type Storage: Clone

Type of storage

type ChildInfo

Type required by RulesSolver::for_child (see implementation documentation)

Loading content...

Required methods

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

Calculates the maximal rect of a given child

This assumes that all other entries have minimum size.

Loading content...

Implementors

impl RulesSetter for SingleSetter[src]

type Storage = ()

type ChildInfo = ()

impl<D: Directional, T: RowTemp, S: RowStorage> RulesSetter for RowSetter<D, T, S>[src]

type Storage = S

type ChildInfo = usize

impl<RT: RowTemp, CT: RowTemp, S: GridStorage> RulesSetter for GridSetter<RT, CT, S>[src]

type Storage = S

type ChildInfo = GridChildInfo

Loading content...