Cogs.Core
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
litehtml::el_text Class Reference
Inheritance diagram for litehtml::el_text:
litehtml::element litehtml::el_space

Public Member Functions

 el_text (const tchar_t *text, const std::shared_ptr< litehtml::document > &doc)
 
virtual void get_text (tstring &text) override
 
virtual const tchar_t * get_style_property (const tchar_t *name, bool inherited, const tchar_t *def=0) override
 
virtual void parse_styles (bool is_reparse) override
 
virtual int get_base_line () override
 
virtual void draw (uint_ptr hdc, int x, int y, const position *clip) override
 
virtual int line_height () const override
 
virtual uint_ptr get_font (font_metrics *fm=0) override
 
virtual style_display get_display () const override
 
virtual white_space get_white_space () const override
 
virtual element_position get_element_position (css_offsets *offsets=0) const override
 
virtual css_offsets get_css_offsets () const override
 
- Public Member Functions inherited from litehtml::element
 element (const std::shared_ptr< litehtml::document > &doc)
 
positionget_position ()
 
int left () const
 
int right () const
 
int top () const
 
int bottom () const
 
int height () const
 
int width () const
 
int content_margins_top () const
 
int content_margins_bottom () const
 
int content_margins_left () const
 
int content_margins_right () const
 
int content_margins_width () const
 
int content_margins_height () const
 
int margin_top () const
 
int margin_bottom () const
 
int margin_left () const
 
int margin_right () const
 
margins get_margins () const
 
int padding_top () const
 
int padding_bottom () const
 
int padding_left () const
 
int padding_right () const
 
margins get_paddings () const
 
int border_top () const
 
int border_bottom () const
 
int border_left () const
 
int border_right () const
 
margins get_borders () const
 
bool in_normal_flow () const
 
litehtml::web_color get_color (const tchar_t *prop_name, bool inherited, const litehtml::web_color &def_color=litehtml::web_color())
 
bool is_inline_box () const
 
position get_placement () const
 
bool collapse_top_margin () const
 
bool collapse_bottom_margin () const
 
bool is_positioned () const
 
bool skip ()
 
void skip (bool val)
 
bool have_parent () const
 
element::ptr parent () const
 
void parent (element::ptr par)
 
bool is_visible () const
 
int calc_width (int defVal) const
 
int get_inline_shift_left ()
 
int get_inline_shift_right ()
 
void apply_relative_shift (int parent_width)
 
std::shared_ptr< documentget_document () const
 
virtual elements_vector select_all (const tstring &selector)
 
virtual elements_vector select_all (const css_selector &selector)
 
virtual element::ptr select_one (const tstring &selector)
 
virtual element::ptr select_one (const css_selector &selector)
 
virtual int render (int x, int y, int max_width, bool second_pass=false)
 
virtual int render_inline (const ptr &container, int max_width)
 
virtual int place_element (const ptr &el, int max_width)
 
virtual void calc_outlines (int parent_width)
 
virtual void calc_auto_margins (int parent_width)
 
virtual void apply_vertical_align ()
 
virtual bool fetch_positioned ()
 
virtual void render_positioned (render_type rt=render_all)
 
virtual void set_inner_html (const litehtml::tchar_t *str, litehtml::css *user_styles=0)
 
virtual bool appendChild (const ptr &el)
 
virtual bool removeChild (const ptr &el)
 
virtual void clearRecursive ()
 
virtual const tchar_t * get_tagName () const
 
virtual void set_tagName (const tchar_t *tag)
 
virtual void set_data (const tchar_t *data)
 
virtual element_float get_float () const
 
virtual vertical_align get_vertical_align () const
 
virtual element_clear get_clear () const
 
virtual size_t get_children_count () const
 
virtual element::ptr get_child (size_t idx) const
 
virtual overflow get_overflow () const
 
virtual css_length get_css_left () const
 
virtual css_length get_css_right () const
 
virtual css_length get_css_top () const
 
virtual css_length get_css_bottom () const
 
virtual css_offsets get_css_offsets () const
 
virtual css_length get_css_width () const
 
virtual void set_css_width (css_length &w)
 
virtual css_length get_css_height () const
 
virtual void set_attr (const tchar_t *name, const tchar_t *val)
 
virtual const tchar_t * get_attr (const tchar_t *name, const tchar_t *def=0) const
 
virtual void apply_stylesheet (const litehtml::css &stylesheet)
 
virtual void refresh_styles ()
 
virtual bool is_white_space () const
 
virtual bool is_body () const
 
virtual bool is_break () const
 
virtual int get_base_line ()
 
virtual bool on_mouse_over ()
 
virtual bool on_mouse_leave ()
 
virtual bool on_lbutton_down ()
 
virtual bool on_lbutton_up ()
 
virtual void on_click ()
 
virtual bool find_styles_changes (position::vector &redraw_boxes, int x, int y)
 
virtual const tchar_t * get_cursor ()
 
virtual void init_font ()
 
virtual bool is_point_inside (int x, int y)
 
virtual bool set_pseudo_class (const tchar_t *pclass, bool add)
 
virtual bool set_class (const tchar_t *pclass, bool add)
 
virtual bool is_replaced () const
 
virtual int line_height () const
 
virtual white_space get_white_space () const
 
virtual style_display get_display () const
 
virtual visibility get_visibility () const
 
virtual element_position get_element_position (css_offsets *offsets=0) const
 
virtual void get_inline_boxes (position::vector &boxes)
 
virtual void parse_styles (bool is_reparse=false)
 
virtual void draw (uint_ptr hdc, int x, int y, const position *clip)
 
virtual void draw_background (uint_ptr hdc, int x, int y, const position *clip)
 
virtual const tchar_t * get_style_property (const tchar_t *name, bool inherited, const tchar_t *def=0)
 
virtual uint_ptr get_font (font_metrics *fm=0)
 
virtual int get_font_size () const
 
virtual void get_text (tstring &text)
 
virtual const tchar_t * get_text () const
 
virtual void parse_attributes ()
 
virtual int select (const css_selector &selector, bool apply_pseudo=true)
 
virtual int select (const css_element_selector &selector, bool apply_pseudo=true)
 
virtual element::ptr find_ancestor (const css_selector &selector, bool apply_pseudo=true, bool *is_pseudo=0)
 
virtual bool is_ancestor (const ptr &el) const
 
virtual element::ptr find_adjacent_sibling (const element::ptr &el, const css_selector &selector, bool apply_pseudo=true, bool *is_pseudo=0)
 
virtual element::ptr find_sibling (const element::ptr &el, const css_selector &selector, bool apply_pseudo=true, bool *is_pseudo=0)
 
virtual bool is_first_child_inline (const element::ptr &el) const
 
virtual bool is_last_child_inline (const element::ptr &el)
 
virtual bool have_inline_child () const
 
virtual void get_content_size (size &sz, int max_width)
 
virtual void init ()
 
virtual bool is_floats_holder () const
 
virtual int get_floats_height (element_float el_float=float_none) const
 
virtual int get_left_floats_height () const
 
virtual int get_right_floats_height () const
 
virtual int get_line_left (int y)
 
virtual int get_line_right (int y, int def_right)
 
virtual void get_line_left_right (int y, int def_right, int &ln_left, int &ln_right)
 
virtual void add_float (const ptr &el, int x, int y)
 
virtual void update_floats (int dy, const ptr &parent)
 
virtual void add_positioned (const ptr &el)
 
virtual int find_next_line_top (int top, int width, int def_right)
 
virtual int get_zindex () const
 
virtual 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 bool is_nth_child (const element::ptr &el, int num, int off, bool of_type) const
 
virtual bool is_nth_last_child (const element::ptr &el, int num, int off, bool of_type) const
 
virtual bool is_only_child (const element::ptr &el, bool of_type) const
 
virtual bool get_predefined_height (int &p_height) const
 
virtual void calc_document_size (litehtml::size &sz, int x=0, int y=0)
 
virtual void get_redraw_box (litehtml::position &pos, int x=0, int y=0)
 
virtual void add_style (const litehtml::style &st)
 
virtual element::ptr get_element_by_point (int x, int y, int client_x, int client_y)
 
virtual element::ptr get_child_by_point (int x, int y, int client_x, int client_y, draw_flag flag, int zindex)
 
virtual const backgroundget_background (bool own_only=false)
 
void set_userdata (void *data, int generation=0)
 
void * get_userdata () const
 
int get_userdata_generation () const
 

Protected Member Functions

virtual void get_content_size (size &sz, int max_width) override
 
- Protected Member Functions inherited from litehtml::element
virtual void select_all (const css_selector &selector, elements_vector &res)
 

Protected Attributes

tstring m_text
 
tstring m_transformed_text
 
size m_size
 
text_transform m_text_transform
 
bool m_use_transformed
 
bool m_draw_spaces
 
- Protected Attributes inherited from litehtml::element
std::weak_ptr< elementm_parent
 
std::weak_ptr< litehtml::documentm_doc
 
litehtml::boxm_box
 
elements_vector m_children
 
position m_pos
 
margins m_margins
 
margins m_padding
 
margins m_borders
 
bool m_skip
 
void * m_userdata
 
int m_userdatageneration
 

Additional Inherited Members

- Public Types inherited from litehtml::element
typedef std::shared_ptr< litehtml::elementptr
 
typedef std::shared_ptr< const litehtml::elementconst_ptr
 
typedef std::weak_ptr< litehtml::elementweak_ptr
 

Detailed Description

Definition at line 8 of file el_text.h.

Constructor & Destructor Documentation

◆ el_text()

litehtml::el_text::el_text ( const tchar_t *  text,
const std::shared_ptr< litehtml::document > &  doc 
)

Definition at line 10 of file el_text.cpp.

◆ ~el_text()

litehtml::el_text::~el_text ( )
virtual

Definition at line 21 of file el_text.cpp.

Member Function Documentation

◆ draw()

void litehtml::el_text::draw ( uint_ptr  hdc,
int  x,
int  y,
const position clip 
)
overridevirtual

Reimplemented from litehtml::element.

Definition at line 106 of file el_text.cpp.

◆ get_base_line()

int litehtml::el_text::get_base_line ( )
overridevirtual

Reimplemented from litehtml::element.

Definition at line 96 of file el_text.cpp.

◆ get_content_size()

void litehtml::el_text::get_content_size ( size sz,
int  max_width 
)
overrideprotectedvirtual

Reimplemented from litehtml::element.

Definition at line 26 of file el_text.cpp.

◆ get_css_offsets()

litehtml::css_offsets litehtml::el_text::get_css_offsets ( ) const
overridevirtual

Reimplemented from litehtml::element.

Definition at line 181 of file el_text.cpp.

◆ get_display()

litehtml::style_display litehtml::el_text::get_display ( ) const
overridevirtual

Reimplemented from litehtml::element.

Definition at line 151 of file el_text.cpp.

◆ get_element_position()

litehtml::element_position litehtml::el_text::get_element_position ( css_offsets offsets = 0) const
overridevirtual

Reimplemented from litehtml::element.

Definition at line 163 of file el_text.cpp.

◆ get_font()

litehtml::uint_ptr litehtml::el_text::get_font ( font_metrics fm = 0)
overridevirtual

Reimplemented from litehtml::element.

Definition at line 141 of file el_text.cpp.

◆ get_style_property()

const litehtml::tchar_t * litehtml::el_text::get_style_property ( const tchar_t *  name,
bool  inherited,
const tchar_t *  def = 0 
)
overridevirtual

Reimplemented from litehtml::element.

Definition at line 36 of file el_text.cpp.

◆ get_text()

void litehtml::el_text::get_text ( tstring &  text)
overridevirtual

Reimplemented from litehtml::element.

Definition at line 31 of file el_text.cpp.

◆ get_white_space()

litehtml::white_space litehtml::el_text::get_white_space ( ) const
overridevirtual

Reimplemented from litehtml::element.

Definition at line 156 of file el_text.cpp.

◆ line_height()

int litehtml::el_text::line_height ( ) const
overridevirtual

Reimplemented from litehtml::element.

Definition at line 131 of file el_text.cpp.

◆ parse_styles()

void litehtml::el_text::parse_styles ( bool  is_reparse)
overridevirtual

Reimplemented from litehtml::element.

Definition at line 49 of file el_text.cpp.

Member Data Documentation

◆ m_draw_spaces

bool litehtml::el_text::m_draw_spaces
protected

Definition at line 16 of file el_text.h.

◆ m_size

size litehtml::el_text::m_size
protected

Definition at line 13 of file el_text.h.

◆ m_text

tstring litehtml::el_text::m_text
protected

Definition at line 11 of file el_text.h.

◆ m_text_transform

text_transform litehtml::el_text::m_text_transform
protected

Definition at line 14 of file el_text.h.

◆ m_transformed_text

tstring litehtml::el_text::m_transformed_text
protected

Definition at line 12 of file el_text.h.

◆ m_use_transformed

bool litehtml::el_text::m_use_transformed
protected

Definition at line 15 of file el_text.h.


The documentation for this class was generated from the following files: