Disable stack execution on plugins
[claws.git] / src / plugins / litehtml_viewer / litehtml / render_block.h
blobeb058c6182ce275f2b85a4e241fea29808694745
1 #ifndef LITEHTML_RENDER_BLOCK_H
2 #define LITEHTML_RENDER_BLOCK_H
4 #include "render_item.h"
6 namespace litehtml
8 class render_item_block : public render_item
10 protected:
11 /**
12 * Render block content.
14 * @param x - horizontal position of the content
15 * @param y - vertical position of the content
16 * @param second_pass - true is this is the second pass.
17 * @param ret_width - input minimal width.
18 * @param self_size - defines calculated size of block
19 * @return return value is the minimal width of the content in block. Must be greater or equal to ret_width parameter
21 virtual int _render_content(int x, int y, bool second_pass, const containing_block_context &self_size, formatting_context* fmt_ctx) {return 0;}
22 int _render(int x, int y, const containing_block_context &containing_block_size, formatting_context* fmt_ctx, bool second_pass) override;
23 int place_float(const std::shared_ptr<render_item> &el, int top, const containing_block_context &self_size, formatting_context* fmt_ctx);
24 virtual void fix_line_width(element_float flt,
25 const containing_block_context &containing_block_size, formatting_context* fmt_ctx)
28 public:
29 explicit render_item_block(std::shared_ptr<element> src_el) : render_item(std::move(src_el))
32 std::shared_ptr<render_item> clone() override
34 return std::make_shared<render_item_block>(src_el());
36 std::shared_ptr<render_item> init() override;
40 #endif //LITEHTML_RENDER_BLOCK_H