Struct layout_2013::flex::FlexFlow
source · #[repr(C)]pub struct FlexFlow {
block_flow: BlockFlow,
main_mode: Direction,
available_main_size: AxisSize,
available_cross_size: AxisSize,
lines: Vec<FlexLine>,
items: Vec<FlexItem>,
main_reverse: bool,
is_wrappable: bool,
cross_reverse: bool,
}
Expand description
A block with the CSS display
property equal to flex
.
Fields§
§block_flow: BlockFlow
Data common to all block flows.
main_mode: Direction
The logical axis which the main axis will be parallel with. The cross axis will be parallel with the opposite logical axis.
available_main_size: AxisSize
The available main axis size
available_cross_size: AxisSize
The available cross axis size
lines: Vec<FlexLine>
List of flex lines in the container.
items: Vec<FlexItem>
List of flex-items that belong to this flex-container
main_reverse: bool
True if the flex-direction is *-reversed
is_wrappable: bool
True if this flex container can be multiline.
cross_reverse: bool
True if the cross direction is reversed.
Implementations§
source§impl FlexFlow
impl FlexFlow
pub fn from_fragment( fragment: Fragment, flotation: Option<FloatKind>, ) -> FlexFlow
pub fn main_mode(&self) -> Direction
sourcefn get_flex_line(&mut self, container_size: Au) -> Option<FlexLine>
fn get_flex_line(&mut self, container_size: Au) -> Option<FlexLine>
Returns a line start after the last item that is already in a line. Note that when the container main size is infinite(i.e. A column flexbox with auto height), we do not need to do flex resolving and this can be considered as a fast-path, so the ‘container_size’ param does not need to be ‘None’. A line has to contain at least one item; (except this) if the container can be multi-line the sum of outer main size of items should be less than the container size; a line should be filled by items as much as possible. After been collected in a line a item should have its main sizes initialized.
fn inline_mode_bubble_inline_sizes(&mut self)
fn block_mode_bubble_inline_sizes(&mut self)
fn block_mode_assign_inline_sizes( &mut self, _layout_context: &LayoutContext<'_>, inline_start_content_edge: Au, inline_end_content_edge: Au, content_inline_size: Au, )
fn inline_mode_assign_inline_sizes( &mut self, layout_context: &LayoutContext<'_>, inline_start_content_edge: Au, _inline_end_content_edge: Au, content_inline_size: Au, )
fn block_mode_assign_block_size(&mut self)
fn inline_mode_assign_block_size(&mut self, layout_context: &LayoutContext<'_>)
Trait Implementations§
source§impl Flow for FlexFlow
impl Flow for FlexFlow
source§fn as_flex(&self) -> &FlexFlow
fn as_flex(&self) -> &FlexFlow
source§fn as_block(&self) -> &BlockFlow
fn as_block(&self) -> &BlockFlow
source§fn as_mut_block(&mut self) -> &mut BlockFlow
fn as_mut_block(&mut self) -> &mut BlockFlow
source§fn mark_as_root(&mut self)
fn mark_as_root(&mut self)
source§fn bubble_inline_sizes(&mut self)
fn bubble_inline_sizes(&mut self)
source§fn assign_inline_sizes(&mut self, layout_context: &LayoutContext<'_>)
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext<'_>)
source§fn assign_block_size(&mut self, layout_context: &LayoutContext<'_>)
fn assign_block_size(&mut self, layout_context: &LayoutContext<'_>)
source§fn compute_stacking_relative_position(
&mut self,
layout_context: &LayoutContext<'_>,
)
fn compute_stacking_relative_position( &mut self, layout_context: &LayoutContext<'_>, )
source§fn place_float_if_applicable<'a>(&mut self)
fn place_float_if_applicable<'a>(&mut self)
source§fn update_late_computed_inline_position_if_necessary(
&mut self,
inline_position: Au,
)
fn update_late_computed_inline_position_if_necessary( &mut self, inline_position: Au, )
source§fn update_late_computed_block_position_if_necessary(
&mut self,
block_position: Au,
)
fn update_late_computed_block_position_if_necessary( &mut self, block_position: Au, )
source§fn build_display_list(&mut self, state: &mut DisplayListBuildState<'_>)
fn build_display_list(&mut self, state: &mut DisplayListBuildState<'_>)
fn collect_stacking_contexts( &mut self, state: &mut StackingContextCollectionState, )
source§fn repair_style(&mut self, new_style: &Arc<ComputedValues>)
fn repair_style(&mut self, new_style: &Arc<ComputedValues>)
source§fn compute_overflow(&self) -> Overflow
fn compute_overflow(&self) -> Overflow
source§fn contains_roots_of_absolute_flow_tree(&self) -> bool
fn contains_roots_of_absolute_flow_tree(&self) -> bool
source§fn is_absolute_containing_block(&self) -> bool
fn is_absolute_containing_block(&self) -> bool
source§fn generated_containing_block_size(&self, flow: OpaqueFlow) -> LogicalSize<Au>
fn generated_containing_block_size(&self, flow: OpaqueFlow) -> LogicalSize<Au>
for_flow
. For block flows, this is the padding box. Read moresource§fn iterate_through_fragment_border_boxes(
&self,
iterator: &mut dyn FragmentBorderBoxIterator,
level: i32,
stacking_context_position: &Point2D<Au>,
)
fn iterate_through_fragment_border_boxes( &self, iterator: &mut dyn FragmentBorderBoxIterator, level: i32, stacking_context_position: &Point2D<Au>, )
source§fn mutate_fragments(&mut self, mutator: &mut dyn FnMut(&mut Fragment))
fn mutate_fragments(&mut self, mutator: &mut dyn FnMut(&mut Fragment))
source§fn as_inline(&self) -> &InlineFlow
fn as_inline(&self) -> &InlineFlow
source§fn as_mut_inline(&mut self) -> &mut InlineFlow
fn as_mut_inline(&mut self) -> &mut InlineFlow
source§fn as_table_wrapper(&self) -> &TableWrapperFlow
fn as_table_wrapper(&self) -> &TableWrapperFlow
source§fn as_mut_table(&mut self) -> &mut TableFlow
fn as_mut_table(&mut self) -> &mut TableFlow
source§fn as_table(&self) -> &TableFlow
fn as_table(&self) -> &TableFlow
source§fn as_mut_table_colgroup(&mut self) -> &mut TableColGroupFlow
fn as_mut_table_colgroup(&mut self) -> &mut TableColGroupFlow
source§fn as_table_colgroup(&self) -> &TableColGroupFlow
fn as_table_colgroup(&self) -> &TableColGroupFlow
source§fn as_mut_table_rowgroup(&mut self) -> &mut TableRowGroupFlow
fn as_mut_table_rowgroup(&mut self) -> &mut TableRowGroupFlow
source§fn as_table_rowgroup(&self) -> &TableRowGroupFlow
fn as_table_rowgroup(&self) -> &TableRowGroupFlow
source§fn as_mut_table_row(&mut self) -> &mut TableRowFlow
fn as_mut_table_row(&mut self) -> &mut TableRowFlow
source§fn as_table_row(&self) -> &TableRowFlow
fn as_table_row(&self) -> &TableRowFlow
source§fn as_mut_table_cell(&mut self) -> &mut TableCellFlow
fn as_mut_table_cell(&mut self) -> &mut TableCellFlow
source§fn as_table_cell(&self) -> &TableCellFlow
fn as_table_cell(&self) -> &TableCellFlow
source§fn fragment(
&mut self,
layout_context: &LayoutContext<'_>,
_fragmentation_context: Option<FragmentationContext>,
) -> Option<Arc<dyn Flow>>
fn fragment( &mut self, layout_context: &LayoutContext<'_>, _fragmentation_context: Option<FragmentationContext>, ) -> Option<Arc<dyn Flow>>
assign_block_size
, but is recurses explicitly into descendants.
Fit as much content as possible within available_block_size
.
If that’s not all of it, truncate the contents of self
and return a new flow similar to self
with the rest of the content. Read moresource§fn assign_block_size_for_inorder_child_if_necessary(
&mut self,
layout_context: &LayoutContext<'_>,
parent_thread_id: u8,
_content_box: LogicalRect<Au>,
) -> bool
fn assign_block_size_for_inorder_child_if_necessary( &mut self, layout_context: &LayoutContext<'_>, parent_thread_id: u8, _content_box: LogicalRect<Au>, ) -> bool
fn has_non_invertible_transform_or_zero_scale(&self) -> bool
fn get_overflow_in_parent_coordinates(&self) -> Overflow
source§fn store_overflow(&mut self, _: &LayoutContext<'_>)
fn store_overflow(&mut self, _: &LayoutContext<'_>)
fn is_root(&self) -> bool
source§fn positioning(&self) -> Position
fn positioning(&self) -> Position
fn contains_positioned_fragments(&self) -> bool
fn contains_relatively_positioned_fragments(&self) -> bool
source§fn print_extra_flow_children(&self, _: &mut PrintTree)
fn print_extra_flow_children(&self, _: &mut PrintTree)
fn clipping_and_scrolling(&self) -> ClippingAndScrolling
impl HasBaseFlow for FlexFlow
Auto Trait Implementations§
impl !Freeze for FlexFlow
impl !RefUnwindSafe for FlexFlow
impl Send for FlexFlow
impl Sync for FlexFlow
impl Unpin for FlexFlow
impl !UnwindSafe for FlexFlow
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> GetBaseFlow for Twhere
T: HasBaseFlow + ?Sized,
impl<T> GetBaseFlow for Twhere
T: HasBaseFlow + ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more