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>
31class __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>;
182 bool is_system_style_sheet() const noexcept;
346 bool equals(const
style_sheet& other) const noexcept override;
419 friend class ::__test_style_sheet__;
424 xtd::drawing::color background_color_from_css(const
xtd::
ustring& css_text, const
xtd::drawing::color& default_value) const noexcept;
430 xtd::drawing::color color_from_css(const
xtd::
ustring& css_text, const
xtd::drawing::color& default_value) const noexcept;
449 template<typename type_t, typename collection_t>
450 type_t get_state_control(const collection_t& collection,
pseudo_state state) const noexcept {
451 auto result = type_t();
452 auto it = collection.find(pseudo_state::standard);
453 if (it != collection.end()) result = it->second;
454 it = collection.find(state);
455 if (it != collection.end()) result = it->second;
460 static void on_system_colors_changed(
const event_args& e);
461 std::vector<xtd::ustring> split_values_from_text(
const xtd::ustring& text)
const noexcept;
489 static style_sheet system_style_sheet_unknown_dark() noexcept;
490 static
style_sheet system_style_sheet_unknown_light() noexcept;
494 bool try_parse_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
495 bool try_parse_hex_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
497 bool try_parse_named_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
498 bool try_parse_rgb_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
499 bool try_parse_rgba_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
500 bool try_parse_hsv_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
501 bool try_parse_hsva_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
502 bool try_parse_hsl_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
503 bool try_parse_hsla_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
504 bool try_parse_system_color(const
xtd::
ustring& text,
xtd::drawing::color& result) const noexcept;
505 bool try_parse_uri(const
xtd::
ustring& text,
xtd::
uri& result) const noexcept;
512 static style_sheets_t style_sheets_;
513 static style_sheet_names_t style_sheet_names_;
516 std::shared_ptr<data> data_;
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
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
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition uri.h:103
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
Definition css_reader.h:16
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.h:32
#define forms_export_
Define shared library export.
Definition forms_export.h:13
xtd::forms::style_sheets::control form
The form data allows you to specify the box of a form control.
Definition form.h:21
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
white_space
The white_space enum class specifies how white-space inside an element is handled.
Definition white_space.h:21
pseudo_state
The pseudo_state enum class flag specifies the pseudo state of an element.
Definition pseudo_state.h:21
text_transformation
The xtd::forms::style_sheets::text_transformation enum class is used to specify uppercase and lowerca...
Definition text_transformation.h:22
border_type
The border_type enum class specifies what kind of border to display.
Definition border_type.h:21
int_least32_t int32
Represents a 32-bit signed integer.
Definition types.h:131
@ control
The left or right CTRL modifier key.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::style_sheets::pseudo_state enum class.
Contains xtd::forms::style_sheets::control class.
Contains xtd::forms::style_sheets::label class.
Contains xtd::forms::style_sheets::label class.
Contains xtd::forms::style_sheets::panel class.
Contains xtd::forms::style_sheets::status_bar class.
Contains xtd::forms::style_sheets::status_bar_panel alias.
Contains xtd::forms::style_sheets::theme class.
Contains xtd::forms::user_control control.