Disable stack execution on plugins
[claws.git] / src / plugins / litehtml_viewer / litehtml / render_flex.h
blob5d31bc9bf73a44db46a4488914ab639ac5f6c8b9
1 #ifndef LITEHTML_RENDER_FLEX_H
2 #define LITEHTML_RENDER_FLEX_H
4 #include "render_block.h"
6 namespace litehtml
8 class render_item_flex : public render_item_block
10 struct flex_item
12 std::shared_ptr<render_item> el;
13 int base_size;
14 int main_size;
15 int min_width;
16 int max_width;
17 int line;
19 explicit flex_item(std::shared_ptr<render_item> _el) :
20 el(std::move(_el)),
21 min_width(0),
22 max_width(0),
23 line(0),
24 base_size(0),
25 main_size(0)
28 protected:
29 std::list<std::unique_ptr<flex_item>> m_flex_items;
31 int _render_content(int x, int y, bool second_pass, const containing_block_context &self_size, formatting_context* fmt_ctx) override;
33 public:
34 explicit render_item_flex(std::shared_ptr<element> src_el) : render_item_block(std::move(src_el))
37 std::shared_ptr<render_item> clone() override
39 return std::make_shared<render_item_flex>(src_el());
41 void draw_children(uint_ptr hdc, int x, int y, const position* clip, draw_flag flag, int zindex) override;
42 std::shared_ptr<render_item> init() override;
46 #endif //LITEHTML_RENDER_FLEX_H