Cogs.Core
|
Public Types | |
typedef std::shared_ptr< document > | ptr |
typedef std::weak_ptr< document > | weak_ptr |
Public Member Functions | |
document (litehtml::document_container *objContainer, litehtml::context *ctx) | |
litehtml::document_container * | container () |
uint_ptr | get_font (const tchar_t *name, int size, const tchar_t *weight, const tchar_t *style, const tchar_t *decoration, font_metrics *fm) |
int | render (int max_width, render_type rt=render_all) |
void | draw (uint_ptr hdc, int x, int y, const position *clip) |
web_color | get_def_color () |
int | cvt_units (const tchar_t *str, int fontSize, bool *is_percent=0) const |
int | cvt_units (css_length &val, int fontSize, int size=0) const |
int | width () const |
int | height () const |
void | add_stylesheet (const tchar_t *str, const tchar_t *baseurl, const tchar_t *media) |
bool | on_mouse_over (int x, int y, int client_x, int client_y, position::vector &redraw_boxes) |
bool | on_lbutton_down (int x, int y, int client_x, int client_y, position::vector &redraw_boxes) |
bool | on_lbutton_up (int x, int y, int client_x, int client_y, position::vector &redraw_boxes) |
bool | on_mouse_move (int x, int y) |
bool | on_mouse_leave (position::vector &redraw_boxes) |
litehtml::element::ptr | create_element (const tchar_t *tag_name, const string_map &attributes) |
element::ptr | root () |
void | get_fixed_boxes (position::vector &fixed_boxes) |
void | add_fixed_box (const position &pos) |
void | add_media_list (media_query_list::ptr list) |
bool | media_changed () |
bool | lang_changed () |
bool | match_lang (const tstring &lang) |
void | add_tabular (const element::ptr &el) |
void | set_userdata (void *userdata) |
void * | get_userdata () |
void | apply_styles (const litehtml::css *styles) |
const litehtml::css & | get_styles () const |
litehtml::context * | get_context () const |
bool | is_initialised () const |
Static Public Member Functions | |
static litehtml::document::ptr | createFromString (const tchar_t *str, litehtml::document_container *objPainter, litehtml::context *ctx, litehtml::css *user_styles=0) |
static litehtml::document::ptr | createFromUTF8 (const char *str, litehtml::document_container *objPainter, litehtml::context *ctx, litehtml::css *user_styles=0) |
static void | create_node (void *gnode, elements_vector &elements, bool parseTextNode, document::ptr doc) |
Private Member Functions | |
litehtml::uint_ptr | add_font (const tchar_t *name, int size, const tchar_t *weight, const tchar_t *style, const tchar_t *decoration, font_metrics *fm) |
bool | update_media_lists (const media_features &features) |
void | fix_tables_layout () |
void | fix_table_children (element::ptr &el_ptr, style_display disp, const tchar_t *disp_str) |
void | fix_table_parent (element::ptr &el_ptr, style_display disp, const tchar_t *disp_str) |
Private Attributes | |
std::shared_ptr< element > | m_root |
document_container * | m_container |
fonts_map | m_fonts |
css_text::vector | m_css |
litehtml::css | m_styles |
litehtml::web_color | m_def_color |
litehtml::context * | m_context |
litehtml::size | m_size |
position::vector | m_fixed_boxes |
media_query_list::vector | m_media_lists |
element::ptr | m_over_element |
elements_vector | m_tabular_elements |
media_features | m_media |
tstring | m_lang |
tstring | m_culture |
void * | m_userdata |
bool | m_initialised |
Definition at line 51 of file document.h.
typedef std::shared_ptr<document> litehtml::document::ptr |
Definition at line 54 of file document.h.
typedef std::weak_ptr<document> litehtml::document::weak_ptr |
Definition at line 55 of file document.h.
litehtml::document::document | ( | litehtml::document_container * | objContainer, |
litehtml::context * | ctx | ||
) |
Definition at line 39 of file document.cpp.
|
virtual |
Definition at line 47 of file document.cpp.
void litehtml::document::add_fixed_box | ( | const position & | pos | ) |
Definition at line 624 of file document.cpp.
|
private |
Definition at line 149 of file document.cpp.
void litehtml::document::add_media_list | ( | media_query_list::ptr | list | ) |
Definition at line 678 of file document.cpp.
void litehtml::document::add_stylesheet | ( | const tchar_t * | str, |
const tchar_t * | baseurl, | ||
const tchar_t * | media | ||
) |
Definition at line 390 of file document.cpp.
|
inline |
Definition at line 131 of file document.h.
void litehtml::document::apply_styles | ( | const litehtml::css * | styles | ) |
Definition at line 60 of file document.cpp.
|
inline |
Definition at line 78 of file document.h.
litehtml::element::ptr litehtml::document::create_element | ( | const tchar_t * | tag_name, |
const string_map & | attributes | ||
) |
Definition at line 546 of file document.cpp.
|
static |
Definition at line 689 of file document.cpp.
|
static |
Definition at line 67 of file document.cpp.
|
static |
Definition at line 72 of file document.cpp.
int litehtml::document::cvt_units | ( | const tchar_t * | str, |
int | fontSize, | ||
bool * | is_percent = 0 |
||
) | const |
Definition at line 312 of file document.cpp.
int litehtml::document::cvt_units | ( | css_length & | val, |
int | fontSize, | ||
int | size = 0 |
||
) | const |
Definition at line 325 of file document.cpp.
void litehtml::document::draw | ( | uint_ptr | hdc, |
int | x, | ||
int | y, | ||
const position * | clip | ||
) |
Definition at line 303 of file document.cpp.
|
private |
Definition at line 862 of file document.cpp.
|
private |
Definition at line 921 of file document.cpp.
|
private |
Definition at line 818 of file document.cpp.
|
inline |
Definition at line 109 of file document.h.
|
inline |
Definition at line 82 of file document.h.
void litehtml::document::get_fixed_boxes | ( | position::vector & | fixed_boxes | ) |
Definition at line 619 of file document.cpp.
litehtml::uint_ptr litehtml::document::get_font | ( | const tchar_t * | name, |
int | size, | ||
const tchar_t * | weight, | ||
const tchar_t * | style, | ||
const tchar_t * | decoration, | ||
font_metrics * | fm | ||
) |
Definition at line 240 of file document.cpp.
|
inline |
Definition at line 108 of file document.h.
|
inline |
Definition at line 104 of file document.h.
int litehtml::document::height | ( | ) | const |
Definition at line 385 of file document.cpp.
|
inline |
Definition at line 111 of file document.h.
bool litehtml::document::lang_changed | ( | ) |
Definition at line 644 of file document.cpp.
|
inline |
Definition at line 135 of file document.h.
bool litehtml::document::media_changed | ( | ) |
Definition at line 629 of file document.cpp.
bool litehtml::document::on_lbutton_down | ( | int | x, |
int | y, | ||
int | client_x, | ||
int | client_y, | ||
position::vector & | redraw_boxes | ||
) |
Definition at line 477 of file document.cpp.
bool litehtml::document::on_lbutton_up | ( | int | x, |
int | y, | ||
int | client_x, | ||
int | client_y, | ||
position::vector & | redraw_boxes | ||
) |
Definition at line 530 of file document.cpp.
bool litehtml::document::on_mouse_leave | ( | position::vector & | redraw_boxes | ) |
Definition at line 460 of file document.cpp.
bool litehtml::document::on_mouse_move | ( | int | x, |
int | y | ||
) |
Definition at line 398 of file document.cpp.
bool litehtml::document::on_mouse_over | ( | int | x, |
int | y, | ||
int | client_x, | ||
int | client_y, | ||
position::vector & | redraw_boxes | ||
) |
Definition at line 415 of file document.cpp.
int litehtml::document::render | ( | int | max_width, |
render_type | rt = render_all |
||
) |
Definition at line 278 of file document.cpp.
|
inline |
Definition at line 127 of file document.h.
|
inline |
Definition at line 103 of file document.h.
|
private |
Definition at line 665 of file document.cpp.
int litehtml::document::width | ( | ) | const |
Definition at line 380 of file document.cpp.
|
private |
Definition at line 58 of file document.h.
|
private |
Definition at line 63 of file document.h.
|
private |
Definition at line 60 of file document.h.
|
private |
Definition at line 71 of file document.h.
|
private |
Definition at line 62 of file document.h.
|
private |
Definition at line 65 of file document.h.
|
private |
Definition at line 59 of file document.h.
|
private |
Definition at line 73 of file document.h.
|
private |
Definition at line 70 of file document.h.
|
private |
Definition at line 69 of file document.h.
|
private |
Definition at line 66 of file document.h.
|
private |
Definition at line 67 of file document.h.
|
private |
Definition at line 57 of file document.h.
|
private |
Definition at line 64 of file document.h.
|
private |
Definition at line 61 of file document.h.
|
private |
Definition at line 68 of file document.h.
|
private |
Definition at line 72 of file document.h.