Photon 1.0.0
|
#include <render_item.h>
Public Member Functions | |
render_item (std::shared_ptr< element > src_el) | |
virtual | ~render_item ()=default |
std::list< std::shared_ptr< render_item > > & | children () |
position & | pos () |
bool | skip () const |
void | skip (bool val) |
int | right () const |
int | left () const |
int | top () const |
int | bottom () const |
int | height () const |
int | width () const |
int | padding_top () const |
int | padding_bottom () const |
int | padding_left () const |
int | padding_right () const |
int | border_top () const |
int | border_bottom () const |
int | border_left () const |
int | border_right () const |
int | margin_top () const |
int | margin_bottom () const |
int | margin_left () const |
int | margin_right () const |
std::shared_ptr< render_item > | parent () const |
margins & | get_margins () |
margins & | get_paddings () |
void | set_paddings (const margins &val) |
margins & | get_borders () |
int | content_offset_top () const |
int | content_offset_bottom () const |
int | content_offset_left () const |
int | content_offset_right () const |
int | content_offset_width () const |
int | content_offset_height () const |
int | render_offset_left () const |
int | render_offset_right () const |
int | render_offset_width () const |
int | render_offset_top () const |
int | render_offset_bottom () const |
int | render_offset_height () const |
int | box_sizing_left () const |
int | box_sizing_right () const |
int | box_sizing_width () const |
int | box_sizing_top () const |
int | box_sizing_bottom () const |
int | box_sizing_height () const |
void | parent (const std::shared_ptr< render_item > &par) |
const std::shared_ptr< element > & | src_el () const |
const css_properties & | css () const |
void | add_child (const std::shared_ptr< render_item > &ri) |
bool | is_root () const |
bool | collapse_top_margin () const |
bool | collapse_bottom_margin () const |
bool | is_visible () const |
bool | is_flex_item () const |
int | render (int x, int y, const containing_block_context &containing_block_size, formatting_context *fmt_ctx, bool second_pass=false) |
void | apply_relative_shift (const containing_block_context &containing_block_size) |
void | calc_outlines (int parent_width) |
int | calc_auto_margins (int parent_width) |
virtual std::shared_ptr< render_item > | init () |
virtual void | apply_vertical_align () |
virtual int | get_first_baseline () |
virtual int | get_last_baseline () |
virtual std::shared_ptr< render_item > | clone () |
std::tuple< std::shared_ptr< litehtml::render_item >, std::shared_ptr< litehtml::render_item >, std::shared_ptr< litehtml::render_item > > | split_inlines () |
bool | fetch_positioned () |
void | render_positioned (render_type width=render_all) |
std::tuple< int, int > | element_static_offset (const std::shared_ptr< litehtml::render_item > &el) |
void | add_positioned (const std::shared_ptr< litehtml::render_item > &el) |
void | get_redraw_box (litehtml::position &pos, int x=0, int y=0) |
void | calc_document_size (litehtml::size &sz, litehtml::size &content_size, int x=0, int y=0) |
virtual void | get_inline_boxes (position::vector &) const |
virtual void | set_inline_boxes (position::vector &) |
virtual void | add_inline_box (const position &) |
virtual void | clear_inline_boxes () |
void | draw_stacking_context (uint_ptr hdc, int x, int y, const position *clip, bool with_positioned) |
virtual void | draw_children (uint_ptr hdc, int x, int y, const position *clip, draw_flag flag, int zindex) |
virtual int | get_draw_vertical_offset () |
virtual std::shared_ptr< element > | get_child_by_point (int x, int y, int client_x, int client_y, draw_flag flag, int zindex) |
std::shared_ptr< element > | get_element_by_point (int x, int y, int client_x, int client_y) |
bool | is_point_inside (int x, int y) |
void | dump (litehtml::dumper &cout) |
position | get_placement () const |
void | get_rendering_boxes (position::vector &redraw_boxes) |
Protected Member Functions | |
containing_block_context | calculate_containing_block_context (const containing_block_context &cb_context) |
void | calc_cb_length (const css_length &len, int percent_base, containing_block_context::typed_int &out_value) const |
virtual int | _render (int, int, const containing_block_context &, formatting_context *, bool) |
Protected Attributes | |
std::shared_ptr< element > | m_element |
std::weak_ptr< render_item > | m_parent |
std::list< std::shared_ptr< render_item > > | m_children |
margins | m_margins |
margins | m_padding |
margins | m_borders |
position | m_pos |
bool | m_skip |
std::vector< std::shared_ptr< render_item > > | m_positioned |
|
explicit |
|
virtualdefault |
|
inlineprotectedvirtual |
Reimplemented in litehtml::render_item_block, litehtml::render_item_image, and litehtml::render_item_table.
|
inline |
|
inlinevirtual |
Reimplemented in litehtml::render_item_inline.
void litehtml::render_item::add_positioned | ( | const std::shared_ptr< litehtml::render_item > & | el | ) |
void litehtml::render_item::apply_relative_shift | ( | const containing_block_context & | containing_block_size | ) |
|
inlinevirtual |
Reimplemented in litehtml::render_item_inline_context.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int litehtml::render_item::calc_auto_margins | ( | int | parent_width | ) |
|
protected |
void litehtml::render_item::calc_document_size | ( | litehtml::size & | sz, |
litehtml::size & | content_size, | ||
int | x = 0 , |
||
int | y = 0 |
||
) |
void litehtml::render_item::calc_outlines | ( | int | parent_width | ) |
|
protected |
|
inline |
|
inlinevirtual |
Reimplemented in litehtml::render_item_inline.
|
inlinevirtual |
Reimplemented in litehtml::render_item_block, litehtml::render_item_block_context, litehtml::render_item_flex, litehtml::render_item_image, litehtml::render_item_inline, litehtml::render_item_inline_context, litehtml::render_item_table, litehtml::render_item_table_part, and litehtml::render_item_table_row.
|
inline |
|
inline |
|
inline |
Bottom offset to the element content. Includes paddings, margins and borders.
|
inline |
Sum of top and bottom offsets to the element content. Includes paddings, margins and borders.
|
inline |
Left offset to the element content. Includes paddings, margins and borders.
|
inline |
Right offset to the element content. Includes paddings, margins and borders.
|
inline |
Top offset to the element content. Includes paddings, margins and borders.
|
inline |
Sum of left and right offsets to the element content. Includes paddings, margins and borders.
|
inline |
|
virtual |
Reimplemented in litehtml::render_item_table.
void litehtml::render_item::draw_stacking_context | ( | uint_ptr | hdc, |
int | x, | ||
int | y, | ||
const position * | clip, | ||
bool | with_positioned | ||
) |
void litehtml::render_item::dump | ( | litehtml::dumper & | cout | ) |
std::tuple< int, int > litehtml::render_item::element_static_offset | ( | const std::shared_ptr< litehtml::render_item > & | el | ) |
bool litehtml::render_item::fetch_positioned | ( | ) |
|
inline |
|
virtual |
|
inlinevirtual |
Reimplemented in litehtml::render_item_table.
std::shared_ptr< litehtml::element > litehtml::render_item::get_element_by_point | ( | int | x, |
int | y, | ||
int | client_x, | ||
int | client_y | ||
) |
|
inlinevirtual |
Get first baseline position. Default position is element bottom without bottom margin.
Reimplemented in litehtml::render_item_block_context, litehtml::render_item_flex, litehtml::render_item_inline, and litehtml::render_item_inline_context.
|
inlinevirtual |
Reimplemented in litehtml::render_item_inline, and litehtml::render_item_table_row.
|
inlinevirtual |
Get last baseline position. Default position is element bottom without bottom margin.
Reimplemented in litehtml::render_item_block_context, litehtml::render_item_flex, litehtml::render_item_inline, and litehtml::render_item_inline_context.
|
inline |
|
inline |
litehtml::position litehtml::render_item::get_placement | ( | ) | const |
void litehtml::render_item::get_redraw_box | ( | litehtml::position & | pos, |
int | x = 0 , |
||
int | y = 0 |
||
) |
void litehtml::render_item::get_rendering_boxes | ( | position::vector & | redraw_boxes | ) |
Returns the boxes of rendering element. All coordinates are absolute
redraw_boxes | [out] resulting rendering boxes |
|
inline |
|
virtual |
Reimplemented in litehtml::render_item_block, litehtml::render_item_flex, and litehtml::render_item_table.
|
inline |
bool litehtml::render_item::is_point_inside | ( | int | x, |
int | y | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int litehtml::render_item::render | ( | int | x, |
int | y, | ||
const containing_block_context & | containing_block_size, | ||
formatting_context * | fmt_ctx, | ||
bool | second_pass = false |
||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void litehtml::render_item::render_positioned | ( | render_type | width = render_all | ) |
|
inline |
|
inlinevirtual |
Reimplemented in litehtml::render_item_inline.
|
inline |
|
inline |
|
inline |
std::tuple< std::shared_ptr< litehtml::render_item >, std::shared_ptr< litehtml::render_item >, std::shared_ptr< litehtml::render_item > > litehtml::render_item::split_inlines | ( | ) |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |