pub struct DetailedGridInfo<S: CheapCloneStr = String> {
pub rows: DetailedGridTracksInfo<S>,
pub columns: DetailedGridTracksInfo<S>,
pub items: Vec<DetailedGridItemsInfo>,
}Expand description
Information from the computation of grid
Fields§
§rows: DetailedGridTracksInfo<S>§columns: DetailedGridTracksInfo<S>§items: Vec<DetailedGridItemsInfo>Implementations§
Source§impl<S: CheapCloneStr> DetailedGridInfo<S>
impl<S: CheapCloneStr> DetailedGridInfo<S>
Sourcepub fn write_grid_template_rows(&self, out: &mut impl Write) -> Result
pub fn write_grid_template_rows(&self, out: &mut impl Write) -> Result
Write the used row track sizes and line names to the passed writer in the resolved value
format of the grid-template-rows property
(see https://www.w3.org/TR/css-grid-1/#resolved-track-list)
Sourcepub fn write_grid_template_columns(&self, out: &mut impl Write) -> Result
pub fn write_grid_template_columns(&self, out: &mut impl Write) -> Result
Write the used column track sizes and line names to the passed writer in the resolved value
format of the grid-template-columns property
(see https://www.w3.org/TR/css-grid-1/#resolved-track-list)
Sourcepub fn grid_template_rows(&self) -> String
pub fn grid_template_rows(&self) -> String
Serialize the used row track sizes and line names in the resolved value format of the
grid-template-rows property (see https://www.w3.org/TR/css-grid-1/#resolved-track-list)
Sourcepub fn grid_template_columns(&self) -> String
pub fn grid_template_columns(&self) -> String
Serialize the used column track sizes and line names in the resolved value format of the
grid-template-columns property (see https://www.w3.org/TR/css-grid-1/#resolved-track-list)
Sourcepub fn resolve_absolute_grid_area(
&self,
grid_row: Line<GridPlacement<S>>,
grid_column: Line<GridPlacement<S>>,
direction: Direction,
padding_box: Rect<f32>,
) -> Rect<f32>
pub fn resolve_absolute_grid_area( &self, grid_row: Line<GridPlacement<S>>, grid_column: Line<GridPlacement<S>>, direction: Direction, padding_box: Rect<f32>, ) -> Rect<f32>
Resolve the physical grid area for an absolutely positioned box from its grid placement. The padding box and returned area use coordinates relative to the grid container’s border box.
Sourcepub fn item_grid_area(
&self,
item_index: usize,
) -> Option<(Point<f32>, Size<f32>)>
pub fn item_grid_area( &self, item_index: usize, ) -> Option<(Point<f32>, Size<f32>)>
Compute the location and size of the grid area occupied by the item at item_index (an
index into DetailedGridInfo::items), relative to the grid container’s border box.
The edges resolve to the edges of the tracks bounding the item’s grid area (a start line resolves to the start of the track that follows it and an end line to the end of the track that precedes it), so the area excludes any gutter or content-alignment spacing around it.
Returns None if item_index is out of bounds.
Trait Implementations§
Source§impl<S: Clone + CheapCloneStr> Clone for DetailedGridInfo<S>
impl<S: Clone + CheapCloneStr> Clone for DetailedGridInfo<S>
Source§fn clone(&self) -> DetailedGridInfo<S>
fn clone(&self) -> DetailedGridInfo<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<S: Debug + CheapCloneStr> Debug for DetailedGridInfo<S>
impl<S: Debug + CheapCloneStr> Debug for DetailedGridInfo<S>
Source§impl<S: PartialEq + CheapCloneStr> PartialEq for DetailedGridInfo<S>
impl<S: PartialEq + CheapCloneStr> PartialEq for DetailedGridInfo<S>
Source§fn eq(&self, other: &DetailedGridInfo<S>) -> bool
fn eq(&self, other: &DetailedGridInfo<S>) -> bool
self and other values to be equal, and is used by ==.