1#ifndef LH_RENDER_ITEM_H
2#define LH_RENDER_ITEM_H
17 class render_item :
public std::enable_shared_from_this<render_item>
42 std::list<std::shared_ptr<render_item>>&
children()
152 std::shared_ptr<render_item>
parent()
const
317 void parent(
const std::shared_ptr<render_item>& par)
322 const std::shared_ptr<element>&
src_el()
const
335 ri->parent(shared_from_this());
384 virtual std::shared_ptr<render_item>
init();
397 virtual std::shared_ptr<render_item>
clone()
399 return std::make_shared<render_item>(
src_el());
402 std::shared_ptr<litehtml::render_item>,
403 std::shared_ptr<litehtml::render_item>,
404 std::shared_ptr<litehtml::render_item>
410 void add_positioned(
const std::shared_ptr<litehtml::render_item> &el);
Definition css_length.h:22
Definition css_properties.h:17
Definition formatting_context.h:10
Definition render_item.h:18
virtual std::shared_ptr< render_item > init()
Definition render_item.cpp:1186
void draw_stacking_context(uint_ptr hdc, int x, int y, const position *clip, bool with_positioned)
Definition render_item.cpp:754
int render_offset_bottom() const
Definition render_item.h:257
int box_sizing_left() const
Definition render_item.h:271
const css_properties & css() const
Definition render_item.h:327
position get_placement() const
Definition render_item.cpp:1173
bool is_point_inside(int x, int y)
Definition render_item.cpp:1088
int box_sizing_top() const
Definition render_item.h:294
int box_sizing_width() const
Definition render_item.h:289
bool collapse_top_margin() const
Definition render_item.h:343
margins m_padding
Definition render_item.h:24
virtual void add_inline_box(const position &)
Definition render_item.h:415
containing_block_context calculate_containing_block_context(const containing_block_context &cb_context)
Definition render_item.cpp:1214
int render(int x, int y, const containing_block_context &containing_block_size, formatting_context *fmt_ctx, bool second_pass=false)
Definition render_item.cpp:30
int render_offset_top() const
Definition render_item.h:248
std::shared_ptr< render_item > parent() const
Definition render_item.h:152
std::list< std::shared_ptr< render_item > > m_children
Definition render_item.h:22
int width() const
Definition render_item.h:87
margins m_margins
Definition render_item.h:23
void add_positioned(const std::shared_ptr< litehtml::render_item > &el)
Definition render_item.cpp:669
int render_offset_right() const
Definition render_item.h:234
void apply_relative_shift(const containing_block_context &containing_block_size)
Definition render_item.cpp:117
int render_offset_width() const
Definition render_item.h:243
margins & get_paddings()
Definition render_item.h:162
std::vector< std::shared_ptr< render_item > > m_positioned
Definition render_item.h:28
int margin_left() const
Definition render_item.h:142
position & pos()
Definition render_item.h:47
int box_sizing_right() const
Definition render_item.h:280
int border_left() const
Definition render_item.h:122
int margin_right() const
Definition render_item.h:147
bool fetch_positioned()
Definition render_item.cpp:217
virtual int _render(int, int, const containing_block_context &, formatting_context *, bool)
Definition render_item.h:32
std::shared_ptr< element > m_element
Definition render_item.h:20
virtual std::shared_ptr< element > get_child_by_point(int x, int y, int client_x, int client_y, draw_flag flag, int zindex)
Definition render_item.cpp:907
int bottom() const
Definition render_item.h:77
int content_offset_width() const
Definition render_item.h:212
int padding_top() const
Definition render_item.h:92
int render_offset_height() const
Definition render_item.h:266
int content_offset_left() const
Definition render_item.h:196
margins m_borders
Definition render_item.h:25
void set_paddings(const margins &val)
Definition render_item.h:167
bool m_skip
Definition render_item.h:27
void parent(const std::shared_ptr< render_item > &par)
Definition render_item.h:317
std::list< std::shared_ptr< render_item > > & children()
Definition render_item.h:42
int border_right() const
Definition render_item.h:127
int render_offset_left() const
Definition render_item.h:225
virtual void apply_vertical_align()
Definition render_item.h:385
bool collapse_bottom_margin() const
Definition render_item.h:354
int margin_bottom() const
Definition render_item.h:137
int box_sizing_height() const
Definition render_item.h:312
void calc_document_size(litehtml::size &sz, litehtml::size &content_size, int x=0, int y=0)
Definition render_item.cpp:711
std::shared_ptr< element > get_element_by_point(int x, int y, int client_x, int client_y)
Definition render_item.cpp:1021
virtual void get_inline_boxes(position::vector &) const
Definition render_item.h:413
bool skip() const
Definition render_item.h:52
const std::shared_ptr< element > & src_el() const
Definition render_item.h:322
int top() const
Definition render_item.h:72
int box_sizing_bottom() const
Definition render_item.h:303
int height() const
Definition render_item.h:82
virtual int get_last_baseline()
Definition render_item.h:395
virtual ~render_item()=default
std::tuple< std::shared_ptr< litehtml::render_item >, std::shared_ptr< litehtml::render_item >, std::shared_ptr< litehtml::render_item > > split_inlines()
Definition render_item.cpp:145
position m_pos
Definition render_item.h:26
int padding_left() const
Definition render_item.h:102
void render_positioned(render_type width=render_all)
Definition render_item.cpp:244
void calc_cb_length(const css_length &len, int percent_base, containing_block_context::typed_int &out_value) const
Definition render_item.cpp:1198
int content_offset_bottom() const
Definition render_item.h:188
int padding_right() const
Definition render_item.h:107
bool is_root() const
Definition render_item.h:338
void dump(litehtml::dumper &cout)
Definition render_item.cpp:1145
int padding_bottom() const
Definition render_item.h:97
margins & get_borders()
Definition render_item.h:172
void get_rendering_boxes(position::vector &redraw_boxes)
Definition render_item.cpp:1117
virtual void set_inline_boxes(position::vector &)
Definition render_item.h:414
virtual void clear_inline_boxes()
Definition render_item.h:416
void get_redraw_box(litehtml::position &pos, int x=0, int y=0)
Definition render_item.cpp:684
virtual void draw_children(uint_ptr hdc, int x, int y, const position *clip, draw_flag flag, int zindex)
Definition render_item.cpp:797
margins & get_margins()
Definition render_item.h:157
void add_child(const std::shared_ptr< render_item > &ri)
Definition render_item.h:332
bool is_flex_item() const
Definition render_item.h:369
virtual std::shared_ptr< render_item > clone()
Definition render_item.h:397
int border_bottom() const
Definition render_item.h:117
std::weak_ptr< render_item > m_parent
Definition render_item.h:21
void calc_outlines(int parent_width)
Definition render_item.cpp:61
int border_top() const
Definition render_item.h:112
int calc_auto_margins(int parent_width)
Definition render_item.cpp:79
int margin_top() const
Definition render_item.h:132
int content_offset_right() const
Definition render_item.h:204
bool is_visible() const
Definition render_item.h:364
int left() const
Definition render_item.h:67
int content_offset_top() const
Definition render_item.h:180
virtual int get_first_baseline()
Definition render_item.h:390
virtual int get_draw_vertical_offset()
Definition render_item.h:419
int right() const
Definition render_item.h:62
int content_offset_height() const
Definition render_item.h:220
void skip(bool val)
Definition render_item.h:57
std::tuple< int, int > element_static_offset(const std::shared_ptr< litehtml::render_item > &el)
Definition render_item.cpp:1319
Definition background.h:12
@ box_sizing_content_box
Definition types.h:859
@ box_sizing_border_box
Definition types.h:860
std::uintptr_t uint_ptr
Definition types.h:17
@ float_none
Definition types.h:482
render_type
Definition types.h:904
@ render_all
Definition types.h:905
draw_flag
Definition types.h:228
@ visibility_visible
Definition types.h:625
@ display_none
Definition types.h:329
@ display_flex
Definition types.h:345
@ display_inline_flex
Definition types.h:346
int bottom
Definition types.h:66
int height() const
Definition types.h:74
int left
Definition types.h:63
int right
Definition types.h:64
int top
Definition types.h:65
int width() const
Definition types.h:73
int top() const
Definition types.h:127
std::vector< position > vector
Definition types.h:104
int left() const
Definition types.h:126
int height
Definition types.h:109
int width
Definition types.h:108