1 #ifndef LITEHTML_FLEX_LINE_H
2 #define LITEHTML_FLEX_LINE_H
4 #include "formatting_context.h"
13 std::list
<std::shared_ptr
<flex_item
>> items
;
14 int cross_start
; // for row direction: top. for column direction: left
15 int main_size
; // sum of all items main size
16 int cross_size
; // sum of all items cross size
20 int num_auto_margin_main_start
; // number of items with auto margin left/top
21 int num_auto_margin_main_end
; // number of items with auto margin right/bottom
22 baseline first_baseline
;
23 baseline last_baseline
;
27 flex_line(bool _reverse_main
, bool _reverse_cross
) :
34 num_auto_margin_main_start(0),
35 num_auto_margin_main_end(0),
38 reverse_main(_reverse_main
),
39 reverse_cross(_reverse_cross
)
42 void init(int container_main_size
, bool fit_container
, bool is_row_direction
,
43 const litehtml::containing_block_context
&self_size
,
44 litehtml::formatting_context
*fmt_ctx
);
45 bool distribute_main_auto_margins(int free_main_size
);
46 int calculate_items_position(int container_main_size
,
47 flex_justify_content justify_content
,
48 bool is_row_direction
,
49 const containing_block_context
&self_size
,
50 formatting_context
*fmt_ctx
);
52 void distribute_free_space(int container_main_size
);
56 #endif //LITEHTML_FLEX_LINE_H