Cogs.Core
Public Member Functions | Private Member Functions | Private Attributes | List of all members
litehtml::line_box Class Reference
Inheritance diagram for litehtml::line_box:
litehtml::box

Public Member Functions

 line_box (int top, int left, int right, int line_height, font_metrics &fm, text_align align)
 
virtual litehtml::box_type get_type ()
 
virtual int height ()
 
virtual int width ()
 
virtual void add_element (const element::ptr &el)
 
virtual bool can_hold (const element::ptr &el, white_space ws)
 
virtual void finish (bool last_box=false)
 
virtual bool is_empty ()
 
virtual int baseline ()
 
virtual void get_elements (elements_vector &els)
 
virtual int top_margin ()
 
virtual int bottom_margin ()
 
virtual void y_shift (int shift)
 
virtual void new_width (int left, int right, elements_vector &els)
 
- Public Member Functions inherited from litehtml::box
 box (int top, int left, int right)
 
int bottom ()
 
int top ()
 
int right ()
 
int left ()
 
virtual litehtml::box_type get_type ()=0
 
virtual int height ()=0
 
virtual int width ()=0
 
virtual void add_element (const element::ptr &el)=0
 
virtual bool can_hold (const element::ptr &el, white_space ws)=0
 
virtual void finish (bool last_box=false)=0
 
virtual bool is_empty ()=0
 
virtual int baseline ()=0
 
virtual void get_elements (elements_vector &els)=0
 
virtual int top_margin ()=0
 
virtual int bottom_margin ()=0
 
virtual void y_shift (int shift)=0
 
virtual void new_width (int left, int right, elements_vector &els)=0
 

Private Member Functions

bool have_last_space ()
 
bool is_break_only ()
 

Private Attributes

elements_vector m_items
 
int m_height
 
int m_width
 
int m_line_height
 
font_metrics m_font_metrics
 
int m_baseline
 
text_align m_text_align
 

Additional Inherited Members

- Public Types inherited from litehtml::box
typedef std::unique_ptr< litehtml::boxptr
 
typedef std::vector< box::ptr > vector
 
- Protected Attributes inherited from litehtml::box
int m_box_top
 
int m_box_left
 
int m_box_right
 

Detailed Description

Definition at line 80 of file box.h.

Constructor & Destructor Documentation

◆ line_box()

litehtml::line_box::line_box ( int  top,
int  left,
int  right,
int  line_height,
font_metrics fm,
text_align  align 
)
inline

Definition at line 90 of file box.h.

Member Function Documentation

◆ add_element()

void litehtml::line_box::add_element ( const element::ptr &  el)
virtual

Implements litehtml::box.

Definition at line 121 of file box.cpp.

◆ baseline()

int litehtml::line_box::baseline ( )
virtual

Implements litehtml::box.

Definition at line 356 of file box.cpp.

◆ bottom_margin()

int litehtml::line_box::bottom_margin ( )
virtual

Implements litehtml::box.

Definition at line 371 of file box.cpp.

◆ can_hold()

bool litehtml::line_box::can_hold ( const element::ptr &  el,
white_space  ws 
)
virtual

Implements litehtml::box.

Definition at line 305 of file box.cpp.

◆ finish()

void litehtml::line_box::finish ( bool  last_box = false)
virtual

Implements litehtml::box.

Definition at line 155 of file box.cpp.

◆ get_elements()

void litehtml::line_box::get_elements ( elements_vector &  els)
virtual

Implements litehtml::box.

Definition at line 361 of file box.cpp.

◆ get_type()

litehtml::box_type litehtml::line_box::get_type ( )
virtual

Implements litehtml::box.

Definition at line 106 of file box.cpp.

◆ have_last_space()

bool litehtml::line_box::have_last_space ( )
private

Definition at line 327 of file box.cpp.

◆ height()

int litehtml::line_box::height ( )
virtual

Implements litehtml::box.

Definition at line 111 of file box.cpp.

◆ is_break_only()

bool litehtml::line_box::is_break_only ( )
private

Definition at line 385 of file box.cpp.

◆ is_empty()

bool litehtml::line_box::is_empty ( )
virtual

Implements litehtml::box.

Definition at line 343 of file box.cpp.

◆ new_width()

void litehtml::line_box::new_width ( int  left,
int  right,
elements_vector &  els 
)
virtual

Implements litehtml::box.

Definition at line 403 of file box.cpp.

◆ top_margin()

int litehtml::line_box::top_margin ( )
virtual

Implements litehtml::box.

Definition at line 366 of file box.cpp.

◆ width()

int litehtml::line_box::width ( )
virtual

Implements litehtml::box.

Definition at line 116 of file box.cpp.

◆ y_shift()

void litehtml::line_box::y_shift ( int  shift)
virtual

Implements litehtml::box.

Definition at line 376 of file box.cpp.

Member Data Documentation

◆ m_baseline

int litehtml::line_box::m_baseline
private

Definition at line 87 of file box.h.

◆ m_font_metrics

font_metrics litehtml::line_box::m_font_metrics
private

Definition at line 86 of file box.h.

◆ m_height

int litehtml::line_box::m_height
private

Definition at line 83 of file box.h.

◆ m_items

elements_vector litehtml::line_box::m_items
private

Definition at line 82 of file box.h.

◆ m_line_height

int litehtml::line_box::m_line_height
private

Definition at line 85 of file box.h.

◆ m_text_align

text_align litehtml::line_box::m_text_align
private

Definition at line 88 of file box.h.

◆ m_width

int litehtml::line_box::m_width
private

Definition at line 84 of file box.h.


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