36 #include "gui_component.h"
44 class CSSComputedValues;
45 class GUIThemePart_Impl;
72 void throw_if_null()
const;
78 Font get_font()
const;
81 std::string get_tag_name()
const;
84 std::string get_id()
const;
87 bool get_class(
const std::string &name)
const;
90 std::vector<std::string> get_classes()
const;
93 bool get_pseudo_class(
const std::string &name)
const;
96 std::vector<std::string> get_pseudo_classes()
const;
99 Size get_css_size()
const;
102 int get_css_width()
const;
105 int get_css_height()
const;
108 Rect get_render_text_span_box(
Canvas &canvas,
const std::string &str,
const Rect &content_rect)
const;
111 Rect get_render_text_box(
Canvas &canvas,
const std::string &str,
const Rect &content_rect)
const;
114 Size get_render_text_size(
Canvas &canvas,
const std::string &str)
const;
117 Rect get_content_box(
const Rect &render_box_rect)
const;
120 Rect get_content_shrink_box()
const;
123 Rect get_border_box(
const Rect &content_box_rect)
const;
126 std::string get_property(
const std::string &property,
const std::string &default_value)
const;
129 int get_property_int(
const std::string &property,
const std::string &default_value)
const;
136 void render_box(
Canvas &canvas,
const Rect &border_box);
139 void set_tag_name(
const std::string &name);
144 bool set_class(
const std::string &name,
bool enable);
147 void set_id(
const std::string &name);
152 bool set_pseudo_class(
const std::string &name,
bool enable);
154 Rect render_text_span(
Canvas &canvas,
const std::string &text,
const Rect &content_rect);
155 Rect render_text(
Canvas &canvas,
const std::string &text,
const Rect &content_box);
156 Rect render_text(
Canvas &canvas,
const std::string &text,
const Rect &content_box,
int baseline);
166 std::shared_ptr<GUIThemePart_Impl>
impl;
Definition: css_computed_values.h:58
2D Graphics Canvas
Definition: canvas.h:70
Definition: gui_component.h:72
std::shared_ptr< GUIThemePart_Impl > impl
Definition: gui_theme_part.h:166
GUI base component class.
Definition: gui_component.h:80
A GUI theme part represents a pseudo element in CSS.
Definition: gui_theme_part.h:53
2D (left,top,right,bottom) rectangle structure - Integer
Definition: rect.h:453
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:69