5 #include "../../forms_export.h" 6 #include "../border_style.h" 22 #include <xtd/web/css/css_reader> 23 #include <xtd/event_handler> 24 #include <xtd/iequatable> 31 class __test_style_sheet__;
44 namespace style_sheets {
70 using buttons_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::button>;
72 using controls_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::control>;
74 using forms_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::form>;
76 using labels_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::label>;
78 using link_labels_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::link_label>;
80 using panels_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::panel>;
86 using status_bars_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::status_bar>;
88 using status_bar_panels_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::status_bar_panel>;
90 using toggle_buttons_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::toggle_button>;
92 using tool_bars_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::tool_bar>;
94 using tool_bar_buttons_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::tool_bar_button>;
96 using user_controls_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::user_control>;
149 static const
style_sheet& current_style_sheet() noexcept;
153 static
void current_style_sheet(const
style_sheet& value);
164 const
buttons_t& flat_buttons() const noexcept;
191 bool is_system_style_sheet() const noexcept;
202 const
labels_t& labels() const noexcept;
224 const
panels_t& panels() const noexcept;
235 const
buttons_t& popup_buttons() const noexcept;
288 static const
style_sheet& system_style_sheet() noexcept;
342 bool equals(const
style_sheet& other) const noexcept override;
411 friend class ::__test_style_sheet__;
414 style_sheet(const
xtd::
ustring& css_text,
bool init_system);
416 xtd::drawing::color background_color_from_css(const
xtd::
ustring& css_text, const
xtd::drawing::color& default_value) const noexcept;
422 xtd::drawing::color color_from_css(const
xtd::
ustring& css_text, const
xtd::drawing::color& default_value) const noexcept;
441 template<typename type_t, typename collection_t>
442 type_t get_state_control(const collection_t& collection,
pseudo_state state) const noexcept {
443 auto result = type_t();
445 if (it != collection.end()) result = it->second;
446 it = collection.find(state);
447 if (it != collection.end()) result = it->second;
452 static void on_system_colors_changed(
const event_args& e);
453 std::vector<xtd::ustring> split_values_from_text(
const xtd::ustring& text)
const noexcept;
481 static style_sheet system_style_sheet_unknown_dark() noexcept;
482 static
style_sheet system_style_sheet_unknown_light() noexcept;
486 bool try_parse_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
487 bool try_parse_hex_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
489 bool try_parse_named_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
490 bool try_parse_rgb_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
491 bool try_parse_rgba_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
492 bool try_parse_hsv_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
493 bool try_parse_hsva_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
494 bool try_parse_hsl_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
495 bool try_parse_hsla_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
496 bool try_parse_system_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
497 bool try_parse_uri(const
xtd::
ustring& text,
xtd::
uri& result) const noexcept;
504 static style_sheets_t style_sheets_;
505 static style_sheet_names_t style_sheet_names_;
508 std::shared_ptr<data> data_;
Contains xtd::forms::style_sheets::status_bar_panel alias.
Contains xtd::forms::style_sheets::control class.
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition: event_handler.h:32
border_type
The border_type enum class specifies what kind of border to display.
Definition: border_type.h:21
xtd::forms::style_sheets::control button
The buttton data allows you to specify the box of a button control.
Definition: button.h:23
Contains xtd::forms::style_sheets::label class.
white_space
The white_space enum class specifies how white-space inside an element is handled.
Definition: white_space.h:21
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::forms::style_sheets::theme class.
Contains xtd::forms::style_sheets::label class.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Contains xtd::forms::style_sheets::status_bar class.
pseudo_state
The pseudo_state enum class flag specifies the pseudo state of an element.
Definition: pseudo_state.h:21
Definition: css_reader.h:16
Contains xtd::forms::style_sheets::pseudo_state enum class.
Represents an event.
Definition: event.h:21
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
The item is in standard state.
Contains xtd::forms::style_sheets::user_control class.
text_transformation
The xtd::forms::style_sheets::text_transformation enum class is used to specify uppercase and lowerca...
Definition: text_transformation.h:22
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition: uri.h:103
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
xtd::forms::style_sheets::control form
The form data allows you to specify the box of a form control.
Definition: form.h:21
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
Contains xtd::forms::style_sheets::panel class.
text_decoration
The xtd::forms::style_sheets::text_decoration enum class is used to set or remove decorations from te...
Definition: text_decoration.h:23
The left or right CTRL modifier key.