add support for Ayatana indicator to Notification plugin
[claws.git] / src / plugins / litehtml_viewer / litehtml / render_inline.h
blob666074b90c1dac205650c5cf33ee3669d22ca5d8
1 #ifndef LITEHTML_RENDER_INLINE_H
2 #define LITEHTML_RENDER_INLINE_H
4 #include "render_item.h"
6 namespace litehtml
8 class render_item_inline : public render_item
10 protected:
11 position::vector m_boxes;
13 public:
14 explicit render_item_inline(std::shared_ptr<element> src_el) : render_item(std::move(src_el))
17 void get_inline_boxes( position::vector& boxes ) const override { boxes = m_boxes; }
18 void set_inline_boxes( position::vector& boxes ) override { m_boxes = boxes; }
19 void add_inline_box( const position& box ) override { m_boxes.emplace_back(box); };
20 void clear_inline_boxes() override { m_boxes.clear(); }
21 int get_first_baseline() override
23 return src_el()->css().get_font_metrics().height - src_el()->css().get_font_metrics().base_line();
25 int get_last_baseline() override
27 return src_el()->css().get_font_metrics().height - src_el()->css().get_font_metrics().base_line();
30 std::shared_ptr<render_item> clone() override
32 return std::make_shared<render_item_inline>(src_el());
37 #endif //LITEHTML_RENDER_INLINE_H