36 #include "gui_component.h"
44 class CSSComputedValues;
45 class GUIThemePart_Impl;
51 class CSSPropertyValue;
73 void throw_if_null()
const;
79 Font get_font()
const;
82 std::string get_tag_name()
const;
85 std::string get_id()
const;
88 bool get_class(
const std::string &name)
const;
91 std::vector<std::string> get_classes()
const;
94 bool get_pseudo_class(
const std::string &name)
const;
97 std::vector<std::string> get_pseudo_classes()
const;
100 Size get_css_size()
const;
103 int get_css_width()
const;
106 int get_css_height()
const;
109 Rect get_render_text_span_box(
Canvas &canvas,
const std::string &str,
const Rect &content_rect)
const;
112 Rect get_render_text_box(
Canvas &canvas,
const std::string &str,
const Rect &content_rect)
const;
115 Size get_render_text_size(
Canvas &canvas,
const std::string &str)
const;
118 Rect get_content_box(
const Rect &render_box_rect)
const;
121 Rect get_content_shrink_box()
const;
124 Rect get_border_box(
const Rect &content_box_rect)
const;
127 std::string get_property(
const std::string &property,
const std::string &default_value)
const;
130 int get_property_int(
const std::string &property,
const std::string &default_value)
const;
137 void render_box(
Canvas &canvas,
const Rect &border_box);
140 void set_tag_name(
const std::string &name);
145 bool set_class(
const std::string &name,
bool enable);
148 void set_id(
const std::string &name);
153 void set_style(
const std::string &name);
161 bool set_pseudo_class(
const std::string &name,
bool enable);
163 Rect render_text_span(
Canvas &canvas,
const std::string &text,
const Rect &content_rect);
164 Rect render_text(
Canvas &canvas,
const std::string &text,
const Rect &content_box);
165 Rect render_text(
Canvas &canvas,
const std::string &text,
const Rect &content_box,
int baseline);
175 std::shared_ptr<GUIThemePart_Impl>
impl;
Definition: css_computed_values.h:58
2D Graphics Canvas
Definition: canvas.h:70
Definition: gui_component.h:73
std::shared_ptr< GUIThemePart_Impl > impl
Definition: gui_theme_part.h:175
GUI base component class.
Definition: gui_component.h:81
A GUI theme part represents a pseudo element in CSS.
Definition: gui_theme_part.h:54
2D (left,top,right,bottom) rectangle structure - Integer
Definition: rect.h:453
Definition: css_property_value.h:41
Font class.
Definition: font.h:52
2D (width,height) size structure - Integer
Definition: size.h:157
bool is_null() const
Returns true if this object is invalid.
Definition: gui_theme_part.h:70