Struct kas::layout::GridSetter [−][src]
pub struct GridSetter<RT, CT, S> where
S: GridStorage,
RT: RowTemp,
CT: RowTemp, { /* fields omitted */ }
Expand description
A RulesSetter
for grids supporting cell-spans
Implementations
pub fn new(
rect: Rect,
(usize, usize),
align: AlignHints,
storage: &mut S
) -> GridSetter<RT, CT, S>
pub fn new(
rect: Rect,
(usize, usize),
align: AlignHints,
storage: &mut S
) -> GridSetter<RT, CT, S>
Construct
Argument order is consistent with other RulesSetter
s.
rect
: theRect
within which to position children(cols, rows)
: number of columns and rowsalign
: alignment hintsstorage
: access to the solver’s storage
Trait Implementations
impl<RT, CT, S> RulesSetter for GridSetter<RT, CT, S> where
S: GridStorage,
RT: RowTemp,
CT: RowTemp,
impl<RT, CT, S> RulesSetter for GridSetter<RT, CT, S> where
S: GridStorage,
RT: RowTemp,
CT: RowTemp,
type Storage = S
type Storage = S
Type of storage
type ChildInfo = GridChildInfo
type ChildInfo = GridChildInfo
Type required by RulesSolver::for_child
(see implementation documentation)
pub fn child_rect(
&mut self,
storage: &mut <GridSetter<RT, CT, S> as RulesSetter>::Storage,
info: <GridSetter<RT, CT, S> as RulesSetter>::ChildInfo
) -> Rect
pub fn child_rect(
&mut self,
storage: &mut <GridSetter<RT, CT, S> as RulesSetter>::Storage,
info: <GridSetter<RT, CT, S> as RulesSetter>::ChildInfo
) -> Rect
Called once for each child. The order is unimportant.
pub fn maximal_rect_of(
&mut self,
_storage: &mut <GridSetter<RT, CT, S> as RulesSetter>::Storage,
_index: <GridSetter<RT, CT, S> as RulesSetter>::ChildInfo
) -> Rect
pub fn maximal_rect_of(
&mut self,
_storage: &mut <GridSetter<RT, CT, S> as RulesSetter>::Storage,
_index: <GridSetter<RT, CT, S> as RulesSetter>::ChildInfo
) -> Rect
Calculates the maximal rect of a given child Read more
Auto Trait Implementations
impl<RT, CT, S> RefUnwindSafe for GridSetter<RT, CT, S> where
CT: RefUnwindSafe,
RT: RefUnwindSafe,
S: RefUnwindSafe,
impl<RT, CT, S> Send for GridSetter<RT, CT, S> where
CT: Send,
RT: Send,
S: Send,
impl<RT, CT, S> Sync for GridSetter<RT, CT, S> where
CT: Sync,
RT: Sync,
S: Sync,
impl<RT, CT, S> Unpin for GridSetter<RT, CT, S> where
CT: Unpin,
RT: Unpin,
S: Unpin,
impl<RT, CT, S> UnwindSafe for GridSetter<RT, CT, S> where
CT: UnwindSafe,
RT: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
pub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
pub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
pub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
pub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
pub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
pub fn try_cast_ceil(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more