add support for Ayatana indicator to Notification plugin
[claws.git] / src / plugins / litehtml_viewer / litehtml / flex_line.h
blob4803d2386b90a1890587825f765a154b95d610f3
1 #ifndef LITEHTML_FLEX_LINE_H
2 #define LITEHTML_FLEX_LINE_H
4 #include "formatting_context.h"
6 namespace litehtml
8 class flex_item;
10 class flex_line
12 public:
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
17 int base_size;
18 int total_grow;
19 int total_shrink;
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;
24 bool reverse_main;
25 bool reverse_cross;
27 flex_line(bool _reverse_main, bool _reverse_cross) :
28 cross_size(0),
29 cross_start(0),
30 total_grow(0),
31 base_size(0),
32 total_shrink(0),
33 main_size(0),
34 num_auto_margin_main_start(0),
35 num_auto_margin_main_end(0),
36 first_baseline(),
37 last_baseline(),
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);
51 protected:
52 void distribute_free_space(int container_main_size);
56 #endif //LITEHTML_FLEX_LINE_H