Photon 1.0.0
Loading...
Searching...
No Matches
types.h File Reference
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <variant>
#include <optional>
#include <algorithm>

Go to the source code of this file.

Classes

struct  litehtml::variant< Types >
 
struct  litehtml::margins
 
struct  litehtml::pointF
 
struct  litehtml::size
 
struct  litehtml::position
 
struct  litehtml::font_metrics
 
struct  litehtml::font_item
 
struct  litehtml::containing_block_context
 
struct  litehtml::containing_block_context::typed_int
 
struct  litehtml::floated_box
 
struct  litehtml::int_int_cache
 
class  litehtml::def_value< T >
 
class  litehtml::baseline
 
struct  litehtml::media_features
 

Namespaces

namespace  litehtml
 

Macros

#define style_display_strings   "none;block;inline;inline-block;inline-table;list-item;table;table-caption;table-cell;table-column;table-column-group;table-footer-group;table-header-group;table-row;table-row-group;inline-text;flex;inline-flex"
 
#define font_size_strings   "xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"
 
#define line_height_strings   "normal"
 
#define font_style_strings   "normal;italic"
 
#define font_system_family_name_strings   "caption;icon;menu;message-box;small-caption;status-bar"
 
#define font_variant_strings   "normal;small-caps"
 
#define font_weight_strings   "normal;bold;bolder;lighter"
 
#define list_style_type_strings   "none;circle;disc;square;armenian;cjk-ideographic;decimal;decimal-leading-zero;georgian;hebrew;hiragana;hiragana-iroha;katakana;katakana-iroha;lower-alpha;lower-greek;lower-latin;lower-roman;upper-alpha;upper-latin;upper-roman"
 
#define list_style_position_strings   "inside;outside"
 
#define vertical_align_strings   "baseline;sub;super;top;text-top;middle;bottom;text-bottom"
 
#define border_width_strings   "thin;medium;thick"
 
#define border_style_strings   "none;hidden;dotted;dashed;solid;double;groove;ridge;inset;outset"
 
#define element_float_strings   "none;left;right"
 
#define element_clear_strings   "none;left;right;both"
 
#define css_units_strings   "none;%;in;cm;mm;em;ex;pt;pc;px;vw;vh;vmin;vmax;rem;ch"
 
#define background_attachment_strings   "scroll;fixed"
 
#define background_repeat_strings   "repeat;repeat-x;repeat-y;no-repeat"
 
#define background_box_strings   "border-box;padding-box;content-box"
 
#define background_position_strings   "left;right;top;bottom;center"
 
#define element_position_strings   "static;relative;absolute;fixed"
 
#define text_align_strings   "left;right;center;justify"
 
#define text_transform_strings   "none;capitalize;uppercase;lowercase"
 
#define white_space_strings   "normal;nowrap;pre;pre-line;pre-wrap"
 
#define overflow_strings   "visible;hidden;scroll;auto;no-display;no-content"
 
#define background_size_strings   "auto;cover;contain"
 
#define visibility_strings   "visible;hidden;collapse"
 
#define border_collapse_strings   "collapse;separate"
 
#define content_property_string   "none;normal;open-quote;close-quote;no-open-quote;no-close-quote"
 
#define appearance_strings   "none;auto;menulist-button;textfield;button;checkbox;listbox;menulist;meter;progress-bar;push-button;radio;searchfield;slider-horizontal;square-button;textarea"
 
#define box_sizing_strings   "content-box;border-box"
 
#define deprecated_media_type_strings   "tty;tv;projection;handheld;braille;embossed;aural;speech"
 
#define media_type_strings   "all;print;screen;" deprecated_media_type_strings
 
#define flex_direction_strings   "row;row-reverse;column;column-reverse"
 
#define flex_wrap_strings   "nowrap;wrap;wrap-reverse"
 
#define flex_justify_content_strings   "normal;flex-start;flex-end;center;space-between;space-around;start;end;left;right;space-evenly;stretch"
 
#define self_position_strings   "center;start;end;self-start;self-end;flex-start;flex-end"
 
#define flex_align_items_strings   "auto;normal;stretch;baseline;" self_position_strings
 
#define flex_align_content_strings   "flex-start;start;flex-end;end;center;space-between;space-around;stretch"
 
#define flex_basis_strings   "auto;content;fit-content;min-content;max-content"
 
#define caption_side_strings   "top;bottom"
 

Typedefs

using litehtml::uint_ptr = std::uintptr_t
 
using litehtml::string_map = std::map< string, string >
 
using litehtml::elements_list = std::list< std::shared_ptr< element > >
 
using litehtml::int_vector = std::vector< int >
 
using litehtml::string_vector = std::vector< string >
 
using litehtml::byte = unsigned char
 
using litehtml::ucode_t = unsigned int
 
using litehtml::fonts_map = std::map< string, font_item >
 

Enumerations

enum  litehtml::document_mode { litehtml::no_quirks_mode , litehtml::quirks_mode , litehtml::limited_quirks_mode }
 
enum  litehtml::draw_flag {
  litehtml::draw_root , litehtml::draw_block , litehtml::draw_floats , litehtml::draw_inlines ,
  litehtml::draw_positioned
}
 
enum  litehtml::style_display {
  litehtml::display_none , litehtml::display_block , litehtml::display_inline , litehtml::display_inline_block ,
  litehtml::display_inline_table , litehtml::display_list_item , litehtml::display_table , litehtml::display_table_caption ,
  litehtml::display_table_cell , litehtml::display_table_column , litehtml::display_table_column_group , litehtml::display_table_footer_group ,
  litehtml::display_table_header_group , litehtml::display_table_row , litehtml::display_table_row_group , litehtml::display_inline_text ,
  litehtml::display_flex , litehtml::display_inline_flex
}
 
enum  litehtml::font_size {
  litehtml::font_size_xx_small , litehtml::font_size_x_small , litehtml::font_size_small , litehtml::font_size_medium ,
  litehtml::font_size_large , litehtml::font_size_x_large , litehtml::font_size_xx_large , litehtml::font_size_smaller ,
  litehtml::font_size_larger
}
 
enum  litehtml::line_height { litehtml::line_height_normal }
 
enum  litehtml::font_style { litehtml::font_style_normal , litehtml::font_style_italic }
 
enum  litehtml::font_variant { litehtml::font_variant_normal , litehtml::font_variant_small_caps }
 
enum  litehtml::font_weight { litehtml::font_weight_normal , litehtml::font_weight_bold , litehtml::font_weight_bolder , litehtml::font_weight_lighter }
 
enum  litehtml::list_style_type {
  litehtml::list_style_type_none , litehtml::list_style_type_circle , litehtml::list_style_type_disc , litehtml::list_style_type_square ,
  litehtml::list_style_type_armenian , litehtml::list_style_type_cjk_ideographic , litehtml::list_style_type_decimal , litehtml::list_style_type_decimal_leading_zero ,
  litehtml::list_style_type_georgian , litehtml::list_style_type_hebrew , litehtml::list_style_type_hiragana , litehtml::list_style_type_hiragana_iroha ,
  litehtml::list_style_type_katakana , litehtml::list_style_type_katakana_iroha , litehtml::list_style_type_lower_alpha , litehtml::list_style_type_lower_greek ,
  litehtml::list_style_type_lower_latin , litehtml::list_style_type_lower_roman , litehtml::list_style_type_upper_alpha , litehtml::list_style_type_upper_latin ,
  litehtml::list_style_type_upper_roman
}
 
enum  litehtml::list_style_position { litehtml::list_style_position_inside , litehtml::list_style_position_outside }
 
enum  litehtml::vertical_align {
  litehtml::va_baseline , litehtml::va_sub , litehtml::va_super , litehtml::va_top ,
  litehtml::va_text_top , litehtml::va_middle , litehtml::va_bottom , litehtml::va_text_bottom
}
 
enum  litehtml::border_width { litehtml::border_width_thin , litehtml::border_width_medium , litehtml::border_width_thick }
 
enum  litehtml::border_style {
  litehtml::border_style_none , litehtml::border_style_hidden , litehtml::border_style_dotted , litehtml::border_style_dashed ,
  litehtml::border_style_solid , litehtml::border_style_double , litehtml::border_style_groove , litehtml::border_style_ridge ,
  litehtml::border_style_inset , litehtml::border_style_outset
}
 
enum  litehtml::element_float { litehtml::float_none , litehtml::float_left , litehtml::float_right }
 
enum  litehtml::element_clear { litehtml::clear_none , litehtml::clear_left , litehtml::clear_right , litehtml::clear_both }
 
enum  litehtml::css_units : byte {
  litehtml::css_units_none , litehtml::css_units_percentage , litehtml::css_units_in , litehtml::css_units_cm ,
  litehtml::css_units_mm , litehtml::css_units_em , litehtml::css_units_ex , litehtml::css_units_pt ,
  litehtml::css_units_pc , litehtml::css_units_px , litehtml::css_units_vw , litehtml::css_units_vh ,
  litehtml::css_units_vmin , litehtml::css_units_vmax , litehtml::css_units_rem , litehtml::css_units_ch
}
 
enum  litehtml::background_attachment { litehtml::background_attachment_scroll , litehtml::background_attachment_fixed }
 
enum  litehtml::background_repeat { litehtml::background_repeat_repeat , litehtml::background_repeat_repeat_x , litehtml::background_repeat_repeat_y , litehtml::background_repeat_no_repeat }
 
enum  litehtml::background_box { litehtml::background_box_border , litehtml::background_box_padding , litehtml::background_box_content }
 
enum  litehtml::background_position {
  litehtml::background_position_left , litehtml::background_position_right , litehtml::background_position_top , litehtml::background_position_bottom ,
  litehtml::background_position_center
}
 
enum  litehtml::element_position { litehtml::element_position_static , litehtml::element_position_relative , litehtml::element_position_absolute , litehtml::element_position_fixed }
 
enum  litehtml::text_align { litehtml::text_align_left , litehtml::text_align_right , litehtml::text_align_center , litehtml::text_align_justify }
 
enum  litehtml::text_transform { litehtml::text_transform_none , litehtml::text_transform_capitalize , litehtml::text_transform_uppercase , litehtml::text_transform_lowercase }
 
enum  litehtml::white_space {
  litehtml::white_space_normal , litehtml::white_space_nowrap , litehtml::white_space_pre , litehtml::white_space_pre_line ,
  litehtml::white_space_pre_wrap
}
 
enum  litehtml::overflow {
  litehtml::overflow_visible , litehtml::overflow_hidden , litehtml::overflow_scroll , litehtml::overflow_auto ,
  litehtml::overflow_no_display , litehtml::overflow_no_content
}
 
enum  litehtml::background_size { litehtml::background_size_auto , litehtml::background_size_cover , litehtml::background_size_contain }
 
enum  litehtml::visibility { litehtml::visibility_visible , litehtml::visibility_hidden , litehtml::visibility_collapse }
 
enum  litehtml::border_collapse { litehtml::border_collapse_collapse , litehtml::border_collapse_separate }
 
enum  litehtml::content_property {
  litehtml::content_property_none , litehtml::content_property_normal , litehtml::content_property_open_quote , litehtml::content_property_close_quote ,
  litehtml::content_property_no_open_quote , litehtml::content_property_no_close_quote
}
 
enum  litehtml::select_result {
  litehtml::select_no_match = 0x00 , litehtml::select_match = 0x01 , litehtml::select_match_pseudo_class = 0x02 , litehtml::select_match_with_before = 0x10 ,
  litehtml::select_match_with_after = 0x20
}
 
enum  litehtml::appearance {
  litehtml::appearance_none , litehtml::appearance_auto , litehtml::appearance_menulist_button , litehtml::appearance_textfield ,
  litehtml::appearance_button , litehtml::appearance_checkbox , litehtml::appearance_listbox , litehtml::appearance_menulist ,
  litehtml::appearance_meter , litehtml::appearance_progress_bar , litehtml::appearance_push_button , litehtml::appearance_radio ,
  litehtml::appearance_searchfield , litehtml::appearance_slider_horizontal , litehtml::appearance_square_button , litehtml::appearance_textarea
}
 
enum  litehtml::box_sizing { litehtml::box_sizing_content_box , litehtml::box_sizing_border_box }
 
enum  litehtml::media_type {
  litehtml::media_type_unknown , litehtml::media_type_all , litehtml::media_type_print , litehtml::media_type_screen ,
  litehtml::media_type_first_deprecated
}
 
enum  litehtml::render_type { litehtml::render_all , litehtml::render_no_fixed , litehtml::render_fixed_only }
 
enum  litehtml::flex_direction { litehtml::flex_direction_row , litehtml::flex_direction_row_reverse , litehtml::flex_direction_column , litehtml::flex_direction_column_reverse }
 
enum  litehtml::flex_wrap { litehtml::flex_wrap_nowrap , litehtml::flex_wrap_wrap , litehtml::flex_wrap_wrap_reverse }
 
enum  litehtml::flex_justify_content {
  litehtml::flex_justify_content_normal , litehtml::flex_justify_content_flex_start , litehtml::flex_justify_content_flex_end , litehtml::flex_justify_content_center ,
  litehtml::flex_justify_content_space_between , litehtml::flex_justify_content_space_around , litehtml::flex_justify_content_start , litehtml::flex_justify_content_end ,
  litehtml::flex_justify_content_left , litehtml::flex_justify_content_right , litehtml::flex_justify_content_space_evenly , litehtml::flex_justify_content_stretch
}
 
enum  litehtml::flex_align_items {
  litehtml::flex_align_items_auto , litehtml::flex_align_items_normal , litehtml::flex_align_items_stretch , litehtml::flex_align_items_baseline ,
  litehtml::flex_align_items_center , litehtml::flex_align_items_start , litehtml::flex_align_items_end , litehtml::flex_align_items_self_start ,
  litehtml::flex_align_items_self_end , litehtml::flex_align_items_flex_start , litehtml::flex_align_items_flex_end , litehtml::flex_align_items_first = 0x100 ,
  litehtml::flex_align_items_last = 0x200 , litehtml::flex_align_items_unsafe = 0x400 , litehtml::flex_align_items_safe = 0x800
}
 
enum  litehtml::flex_align_content {
  litehtml::flex_align_content_flex_start , litehtml::flex_align_content_start , litehtml::flex_align_content_flex_end , litehtml::flex_align_content_end ,
  litehtml::flex_align_content_center , litehtml::flex_align_content_space_between , litehtml::flex_align_content_space_around , litehtml::flex_align_content_stretch
}
 
enum  litehtml::flex_basis {
  litehtml::flex_basis_auto , litehtml::flex_basis_content , litehtml::flex_basis_fit_content , litehtml::flex_basis_min_content ,
  litehtml::flex_basis_max_content
}
 
enum  litehtml::caption_side { litehtml::caption_side_top , litehtml::caption_side_bottom }
 

Variables

const unsigned int litehtml::font_decoration_none = 0x00
 
const unsigned int litehtml::font_decoration_underline = 0x01
 
const unsigned int litehtml::font_decoration_linethrough = 0x02
 
const unsigned int litehtml::font_decoration_overline = 0x04
 
const float litehtml::border_width_thin_value = 1
 
const float litehtml::border_width_medium_value = 3
 
const float litehtml::border_width_thick_value = 5
 
const float litehtml::border_width_values [] = { border_width_thin_value, border_width_medium_value, border_width_thick_value }
 
const float litehtml::background_position_percentages [] = {0, 100, 0, 100, 50}
 
const char *const litehtml::split_delims_spaces = " \t\r\n\f\v"
 
const char *const litehtml::void_elements = "area;base;br;col;command;embed;hr;img;input;keygen;link;meta;param;source;track;wbr"
 

Macro Definition Documentation

◆ appearance_strings

#define appearance_strings   "none;auto;menulist-button;textfield;button;checkbox;listbox;menulist;meter;progress-bar;push-button;radio;searchfield;slider-horizontal;square-button;textarea"

◆ background_attachment_strings

#define background_attachment_strings   "scroll;fixed"

◆ background_box_strings

#define background_box_strings   "border-box;padding-box;content-box"

◆ background_position_strings

#define background_position_strings   "left;right;top;bottom;center"

◆ background_repeat_strings

#define background_repeat_strings   "repeat;repeat-x;repeat-y;no-repeat"

◆ background_size_strings

#define background_size_strings   "auto;cover;contain"

◆ border_collapse_strings

#define border_collapse_strings   "collapse;separate"

◆ border_style_strings

#define border_style_strings   "none;hidden;dotted;dashed;solid;double;groove;ridge;inset;outset"

◆ border_width_strings

#define border_width_strings   "thin;medium;thick"

◆ box_sizing_strings

#define box_sizing_strings   "content-box;border-box"

◆ caption_side_strings

#define caption_side_strings   "top;bottom"

◆ content_property_string

#define content_property_string   "none;normal;open-quote;close-quote;no-open-quote;no-close-quote"

◆ css_units_strings

#define css_units_strings   "none;%;in;cm;mm;em;ex;pt;pc;px;vw;vh;vmin;vmax;rem;ch"

◆ deprecated_media_type_strings

#define deprecated_media_type_strings   "tty;tv;projection;handheld;braille;embossed;aural;speech"

◆ element_clear_strings

#define element_clear_strings   "none;left;right;both"

◆ element_float_strings

#define element_float_strings   "none;left;right"

◆ element_position_strings

#define element_position_strings   "static;relative;absolute;fixed"

◆ flex_align_content_strings

#define flex_align_content_strings   "flex-start;start;flex-end;end;center;space-between;space-around;stretch"

◆ flex_align_items_strings

#define flex_align_items_strings   "auto;normal;stretch;baseline;" self_position_strings

◆ flex_basis_strings

#define flex_basis_strings   "auto;content;fit-content;min-content;max-content"

◆ flex_direction_strings

#define flex_direction_strings   "row;row-reverse;column;column-reverse"

◆ flex_justify_content_strings

#define flex_justify_content_strings   "normal;flex-start;flex-end;center;space-between;space-around;start;end;left;right;space-evenly;stretch"

◆ flex_wrap_strings

#define flex_wrap_strings   "nowrap;wrap;wrap-reverse"

◆ font_size_strings

#define font_size_strings   "xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"

◆ font_style_strings

#define font_style_strings   "normal;italic"

◆ font_system_family_name_strings

#define font_system_family_name_strings   "caption;icon;menu;message-box;small-caption;status-bar"

◆ font_variant_strings

#define font_variant_strings   "normal;small-caps"

◆ font_weight_strings

#define font_weight_strings   "normal;bold;bolder;lighter"

◆ line_height_strings

#define line_height_strings   "normal"

◆ list_style_position_strings

#define list_style_position_strings   "inside;outside"

◆ list_style_type_strings

#define list_style_type_strings   "none;circle;disc;square;armenian;cjk-ideographic;decimal;decimal-leading-zero;georgian;hebrew;hiragana;hiragana-iroha;katakana;katakana-iroha;lower-alpha;lower-greek;lower-latin;lower-roman;upper-alpha;upper-latin;upper-roman"

◆ media_type_strings

#define media_type_strings   "all;print;screen;" deprecated_media_type_strings

◆ overflow_strings

#define overflow_strings   "visible;hidden;scroll;auto;no-display;no-content"

◆ self_position_strings

#define self_position_strings   "center;start;end;self-start;self-end;flex-start;flex-end"

◆ style_display_strings

#define style_display_strings   "none;block;inline;inline-block;inline-table;list-item;table;table-caption;table-cell;table-column;table-column-group;table-footer-group;table-header-group;table-row;table-row-group;inline-text;flex;inline-flex"

◆ text_align_strings

#define text_align_strings   "left;right;center;justify"

◆ text_transform_strings

#define text_transform_strings   "none;capitalize;uppercase;lowercase"

◆ vertical_align_strings

#define vertical_align_strings   "baseline;sub;super;top;text-top;middle;bottom;text-bottom"

◆ visibility_strings

#define visibility_strings   "visible;hidden;collapse"

◆ white_space_strings

#define white_space_strings   "normal;nowrap;pre;pre-line;pre-wrap"