xtd 1.0.0
Loading...
Searching...
No Matches
style_sheet.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "../border_style.hpp"
7#include "button.hpp"
8#include "control.hpp"
9#include "form.hpp"
10#include "label.hpp"
11#include "link_label.hpp"
12#include "panel.hpp"
13#include "pseudo_state.hpp"
14#include "status_bar.hpp"
15#include "status_bar_panel.hpp"
16#include "system_colors.hpp"
17#include "theme.hpp"
18#include "user_control.hpp"
19#include "toggle_button.hpp"
20#include "tool_bar.hpp"
21#include "tool_bar_button.hpp"
22#include <xtd/collections/generic/list>
23#include <xtd/web/css/css_reader>
24#include <xtd/event_handler>
25#include <xtd/iequatable>
26#include <xtd/object>
27#include <xtd/uri>
28#include <map>
29
31class __test_style_sheet__; // Necessary for the test unit to access the private member functions
33
35namespace xtd {
37 namespace forms {
39 class control;
40 class form;
42
44 namespace style_sheets {
64 class forms_export_ style_sheet final : public xtd::iequatable<style_sheet>, public xtd::object {
65 struct data;
66
67 public:
69
72 using buttons_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::button>;
74 using controls_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::control>;
76 using forms_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::form>;
78 using labels_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::label>;
80 using link_labels_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::link_label>;
82 using panels_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::panel>;
84 using style_sheets_t = std::map<xtd::string, style_sheet>;
88 using status_bars_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::status_bar>;
90 using status_bar_panels_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::status_bar_panel>;
92 using toggle_buttons_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::toggle_button>;
94 using tool_bars_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::tool_bar>;
96 using tool_bar_buttons_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::tool_bar_button>;
98 using user_controls_t = std::map<xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::user_control>;
100
102
105 static const style_sheet empty;
107
109
115 explicit style_sheet(const xtd::string& css_text);
116
118 style_sheet(const style_sheet&);
119 style_sheet(style_sheet&&) = default;
120 style_sheet& operator =(const style_sheet&);
121 style_sheet& operator =(style_sheet&&) = default;
123
125
129 [[nodiscard]] auto button() const noexcept -> xtd::forms::style_sheets::button;
133 [[nodiscard]] auto button(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::button;
136 [[nodiscard]] auto buttons() const noexcept -> const buttons_t&;
137
140 [[nodiscard]] auto control() const noexcept -> xtd::forms::style_sheets::control;
144 [[nodiscard]] auto control(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::control;
147 [[nodiscard]] auto controls() const noexcept -> const controls_t&;
148
151 [[nodiscard]] auto flat_button() const noexcept -> xtd::forms::style_sheets::button;
155 [[nodiscard]] auto flat_button(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::button;
158 [[nodiscard]] auto flat_buttons() const noexcept -> const buttons_t&;
159
162 [[nodiscard]] auto flat_toggle_button() const noexcept -> xtd::forms::style_sheets::toggle_button;
166 [[nodiscard]] auto flat_toggle_button(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::toggle_button;
169 [[nodiscard]] auto flat_toggle_buttons() const noexcept -> const toggle_buttons_t&;
170
173 [[nodiscard]] auto form() const noexcept -> xtd::forms::style_sheets::form;
177 [[nodiscard]] auto form(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::form;
180 [[nodiscard]] auto forms() const noexcept -> const forms_t&;
181
185 [[nodiscard]] auto is_system_style_sheet() const noexcept -> bool;
186
189 [[nodiscard]] auto label() const noexcept -> xtd::forms::style_sheets::label;
193 [[nodiscard]] auto label(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::label;
196 [[nodiscard]] auto labels() const noexcept -> const labels_t&;
197
200 [[nodiscard]] auto link_label() const noexcept -> xtd::forms::style_sheets::link_label;
204 [[nodiscard]] auto link_label(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::link_label;
207 [[nodiscard]] auto link_labels() const noexcept -> const link_labels_t&;
208
211 [[nodiscard]] auto panel() const noexcept -> xtd::forms::style_sheets::panel;
215 [[nodiscard]] auto panel(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::panel;
218 [[nodiscard]] auto panels() const noexcept -> const panels_t&;
219
222 [[nodiscard]] auto popup_button() const noexcept -> xtd::forms::style_sheets::button;
226 [[nodiscard]] auto popup_button(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::button;
229 [[nodiscard]] auto popup_buttons() const noexcept -> const buttons_t&;
230
233 [[nodiscard]] auto popup_toggle_button() const noexcept -> xtd::forms::style_sheets::toggle_button;
237 [[nodiscard]] auto popup_toggle_button(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::toggle_button;
240 [[nodiscard]] auto popup_toggle_buttons() const noexcept -> const toggle_buttons_t&;
241
244 [[nodiscard]] auto status_bar() const noexcept -> xtd::forms::style_sheets::status_bar;
248 [[nodiscard]] auto status_bar(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::status_bar;
251 [[nodiscard]] auto status_bars() const noexcept -> const status_bars_t&;
252
255 [[nodiscard]] auto status_bar_panel() const noexcept -> xtd::forms::style_sheets::status_bar_panel;
259 [[nodiscard]] auto status_bar_panel(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::status_bar_panel;
262 [[nodiscard]] auto status_bar_panels() const noexcept -> const status_bar_panels_t&;
263
266 [[nodiscard]] auto system_colors() const noexcept -> const xtd::forms::style_sheets::system_colors&;
267
270 [[nodiscard]] auto theme() const noexcept -> const xtd::forms::style_sheets::theme&;
271
274 [[nodiscard]] auto toggle_button() const noexcept -> xtd::forms::style_sheets::toggle_button;
278 [[nodiscard]] auto toggle_button(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::toggle_button;
281 [[nodiscard]] auto toggle_buttons() const noexcept -> const toggle_buttons_t&;
282
285 [[nodiscard]] auto tool_bar() const noexcept -> xtd::forms::style_sheets::tool_bar;
289 [[nodiscard]] auto tool_bar(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::tool_bar;
292 [[nodiscard]] auto tool_bars() const noexcept -> const tool_bars_t&;
293
296 [[nodiscard]] auto tool_bar_button() const noexcept -> xtd::forms::style_sheets::tool_bar_button;
300 [[nodiscard]] auto tool_bar_button(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::tool_bar_button;
303 [[nodiscard]] auto tool_bar_buttons() const noexcept -> const tool_bar_buttons_t&;
304
307 [[nodiscard]] auto user_control() const noexcept -> xtd::forms::style_sheets::user_control;
311 [[nodiscard]] auto user_control(xtd::forms::style_sheets::pseudo_state state) const noexcept -> xtd::forms::style_sheets::user_control;
314 [[nodiscard]] auto user_controls() const noexcept -> const user_controls_t&;
316
318
323 [[nodiscard]] static auto current_style_sheet() noexcept -> const style_sheet&;
327 static auto current_style_sheet(const style_sheet& value) -> void;
328
332 [[nodiscard]] static auto style_sheets() noexcept -> const style_sheets_t&;
333
337 [[nodiscard]] static auto style_sheet_names() noexcept -> const style_sheet_names_t&;
338
343 [[nodiscard]] static auto system_style_sheet() noexcept -> const style_sheet&;
345
347
352 [[nodiscard]] auto equals(const xtd::object& obj) const noexcept -> bool override;
356 [[nodiscard]] auto equals(const style_sheet& other) const noexcept -> bool override;
357
360 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::usize override;
362
364
370 [[nodiscard]] static auto button_from_css(const xtd::string& css_text) -> buttons_t;
371
376 [[nodiscard]] static auto control_from_css(const xtd::string& css_text) -> controls_t;
377
383 [[nodiscard]] static auto get_style_sheet_from_name(const xtd::string& name) -> style_sheet;
384
390 [[nodiscard]] static auto get_style_sheet_from_file(const xtd::string& file_name) -> style_sheet;
391
397 [[nodiscard]] static auto get_style_sheet_from_path(const xtd::string& path_name) -> style_sheet;
398
403 [[nodiscard]] static auto form_from_css(const xtd::string& css_text) -> forms_t;
404
409 [[nodiscard]] static auto system_colors_from_css(const xtd::string& css_text) -> xtd::forms::style_sheets::system_colors;
410
415 [[nodiscard]] static auto theme_from_css(const xtd::string& css_text) -> xtd::forms::style_sheets::theme;
416
420 [[nodiscard]] static auto to_border_type(xtd::forms::border_style border) -> std::tuple<xtd::forms::style_sheets::border_type, int32, int32>;
422
424
431
432 private:
433 friend class ::__test_style_sheet__; // Necessary for the test unit to access the private member functions
434 friend class xtd::forms::control;
435 friend class xtd::forms::form;
436 style_sheet(const xtd::string& css_text, bool init_system);
437
438 [[nodiscard]] auto background_color_from_css(const xtd::string& css_text, const xtd::drawing::color& default_value) const noexcept -> xtd::drawing::color;
439 [[nodiscard]] auto background_image_from_css(const xtd::string& css_text, const background_image& default_value) const noexcept -> background_image;
440 [[nodiscard]] auto border_color_from_css(const xtd::string& css_text, const border_color& default_value) const noexcept -> border_color;
441 [[nodiscard]] auto border_style_from_css(const string& text, const border_style& default_value) const noexcept -> border_style;
442 [[nodiscard]] auto border_radius_from_css(const xtd::string& css_text, const border_radius& default_value) const noexcept -> border_radius;
443 [[nodiscard]] auto border_width_from_css(const xtd::string& css_text, const border_width& default_value) const noexcept -> border_width;
444 [[nodiscard]] auto color_from_css(const xtd::string& css_text, const xtd::drawing::color& default_value) const noexcept -> xtd::drawing::color;
445 [[nodiscard]] auto length_from_css(const xtd::string& css_text, const length& default_value) const noexcept -> length;
446 [[nodiscard]] auto margin_from_css(const xtd::string& css_text, const margin& default_value) const noexcept -> margin;
447 [[nodiscard]] auto margin_bottom_from_css(const xtd::string& css_text, const margin& default_value) const noexcept -> margin;
448 [[nodiscard]] auto margin_left_from_css(const xtd::string& css_text, const margin& default_value) const noexcept -> margin;
449 [[nodiscard]] auto margin_right_from_css(const xtd::string& css_text, const margin& default_value) const noexcept -> margin;
450 [[nodiscard]] auto margin_top_from_css(const xtd::string& css_text, const margin& default_value) const noexcept -> margin;
451 [[nodiscard]] auto padding_from_css(const xtd::string& css_text, const padding& default_value) const noexcept -> padding;
452 [[nodiscard]] auto padding_bottom_from_css(const xtd::string& css_text, const padding& default_value) const noexcept -> padding;
453 [[nodiscard]] auto padding_left_from_css(const xtd::string& css_text, const padding& default_value) const noexcept -> padding;
454 [[nodiscard]] auto padding_right_from_css(const xtd::string& css_text, const padding& default_value) const noexcept -> padding;
455 [[nodiscard]] auto padding_top_from_css(const xtd::string& css_text, const padding& default_value) const noexcept -> padding;
456 [[nodiscard]] auto string_from_css(const xtd::string& css_text, const xtd::string& default_value) const noexcept -> xtd::string;
457 [[nodiscard]] auto text_align_from_css(const xtd::string& css_text, const xtd::forms::content_alignment& default_value) const noexcept -> xtd::forms::content_alignment;
458 [[nodiscard]] auto text_decoration_from_css(const xtd::string& css_text, const xtd::forms::style_sheets::text_decoration& default_value) const noexcept -> xtd::forms::style_sheets::text_decoration;
459 [[nodiscard]] auto text_transformation_from_css(const xtd::string& css_text, const xtd::forms::style_sheets::text_transformation& default_value) const noexcept -> xtd::forms::style_sheets::text_transformation;
460 [[nodiscard]] auto uri_from_css(const xtd::string& css_text, const xtd::uri& default_value) const noexcept -> xtd::uri;
461 [[nodiscard]] auto white_space_from_css(const xtd::string& css_text, const xtd::forms::style_sheets::white_space& default_value) const noexcept -> xtd::forms::style_sheets::white_space;
462
463 template<typename type_t, typename collection_t>
464 [[nodiscard]] auto get_state_control(const collection_t& collection, pseudo_state state) const noexcept -> type_t {
465 auto result = type_t();
466 auto it = collection.find(pseudo_state::standard);
467 if (it != collection.end()) result = it->second;
468 it = collection.find(state);
469 if (it != collection.end()) result = it->second;
470 return result;
471 }
472
473 static auto on_style_sheet_changed(const xtd::event_args& e) -> void;
474 static auto on_system_colors_changed(const event_args& e) -> void;
475 [[nodiscard]] auto split_values_from_text(const xtd::string& text) const noexcept -> xtd::array<xtd::string>;
476
477 auto button_reader(xtd::web::css::css_reader& reader) noexcept -> void;
478 auto control_reader(xtd::web::css::css_reader& reader) noexcept -> void;
479 auto fill_control(const xtd::web::css::selector_dictionary::const_iterator& selectors_iterator, xtd::forms::style_sheets::control& control) noexcept -> void;
480 auto flat_button_reader(xtd::web::css::css_reader& reader) noexcept -> void;
481 auto flat_toggle_button_reader(xtd::web::css::css_reader& reader) noexcept -> void;
482 auto form_reader(xtd::web::css::css_reader& reader) noexcept -> void;
483 auto label_reader(xtd::web::css::css_reader& reader) noexcept -> void;
484 auto link_label_reader(xtd::web::css::css_reader& reader) noexcept -> void;
485 auto panel_reader(xtd::web::css::css_reader& reader) noexcept -> void;
486 auto popup_button_reader(xtd::web::css::css_reader& reader) noexcept -> void;
487 auto popup_toggle_button_reader(xtd::web::css::css_reader& reader) noexcept -> void;
488 auto status_bar_reader(xtd::web::css::css_reader& reader) noexcept -> void;
489 auto status_bar_panel_reader(xtd::web::css::css_reader& reader) noexcept -> void;
490 auto system_colors_reader(xtd::web::css::css_reader& reader) noexcept -> void;
491 auto theme_reader(xtd::web::css::css_reader& reader) noexcept -> void;
492 auto toggle_button_reader(xtd::web::css::css_reader& reader) noexcept -> void;
493 auto tool_bar_reader(xtd::web::css::css_reader& reader) noexcept -> void;
494 auto tool_bar_button_reader(xtd::web::css::css_reader& reader) noexcept -> void;
495 auto user_control_reader(xtd::web::css::css_reader& reader) noexcept -> void;
496
497 //s[[nodiscard]] tatic auto system_style_sheet_gnome_dark() noexcept -> style_sheet; // Declared in system_style_sheet_gnome_dark.cpp
498 //[[nodiscard]] static auto system_style_sheet_gnome_light() noexcept -> style_sheet; // Declared in system_style_sheet_gnome_light.cpp
499 //[[nodiscard]] static auto system_style_sheet_kde_dark() noexcept -> style_sheet; // Declared in system_style_sheet_kde_dark.cpp
500 //[[nodiscard]] static auto system_style_sheet_kde_light() noexcept -> style_sheet; // Declared in system_style_sheet_kde_light.cpp
501 //[[nodiscard]] static auto system_style_sheet_macos_dark() noexcept -> style_sheet; // Declared in system_style_sheet_macos_dark.cpp
502 //[[nodiscard]] static auto system_style_sheet_macos_light() noexcept -> style_sheet; // Declared in system_style_sheet_macos_light.cpp
503 [[nodiscard]] static auto system_style_sheet_unknown_dark() noexcept -> style_sheet; // Declared in system_style_sheet_unknown_dark.cpp
504 [[nodiscard]] static auto system_style_sheet_unknown_light() noexcept -> style_sheet; // Declared in system_style_sheet_unknown_light.cpp
505 //[[nodiscard]] static auto system_style_sheet_windows_dark() noexcept -> style_sheet; // Declared in system_style_sheet_windows_dark.cpp
506 //[[nodiscard]] static auto system_style_sheet_windows_light() noexcept -> style_sheet; // Declared in system_style_sheet_windows_light.cpp
507
508 auto try_parse_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
509 auto try_parse_conic_gradient(const xtd::string& text, background_image& result) const noexcept -> bool;
510 auto try_parse_hex_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
511 auto try_parse_linear_gradient(const xtd::string& text, background_image& result) const noexcept -> bool;
512 auto try_parse_named_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
513 auto try_parse_radial_gradient(const xtd::string& text, background_image& result) const noexcept -> bool;
514 auto try_parse_rgb_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
515 auto try_parse_rgba_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
516 auto try_parse_hsv_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
517 auto try_parse_hsva_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
518 auto try_parse_hsl_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
519 auto try_parse_hsla_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
520 auto try_parse_system_color(const xtd::string& text, xtd::drawing::color& result) const noexcept -> bool;
521 auto try_parse_uri(const xtd::string& text, xtd::uri& result) const noexcept -> bool;
522
523 auto system_colors_(const xtd::forms::style_sheets::system_colors& system_colors) -> void;
524 auto theme_(const xtd::forms::style_sheets::theme& theme) -> void;
525 auto theme_name_(const xtd::string& name) -> void;
526
527 static style_sheet current_style_sheet_;
528 static style_sheets_t style_sheets_;
529 static style_sheet_names_t style_sheet_names_;
530 static style_sheet system_style_sheet_;
531
532 xtd::sptr<data> data_;
533 };
534 }
535 }
536}
Contains xtd::forms::border_style enum class.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
Represents an event.
Definition event.hpp:23
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
The image data allows you to specify the url or gradient mode.
Definition background_image.hpp:42
The xtd::forms::style_sheets::border_color is used to set the color of the borders.
Definition border_color.hpp:33
The radius is used to add rounded borders to an element.
Definition border_radius.hpp:33
The style specifies what kind of borders to display.
Definition border_style.hpp:33
The control selector allows you to specify the box and color of a control.
Definition control.hpp:35
The xtd::forms::style_sheets::length specifies the legth and unit of many properties of the xtd::form...
Definition length.hpp:77
The xtd::forms::style_sheets::style_sheet allows you to specify an xtd style sheet.
Definition style_sheet.hpp:64
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::status_bar_panel > status_bar_panels_t
Represents a style sheet buttons collection.
Definition style_sheet.hpp:90
style_sheet(const xtd::string &css_text)
Initialize a new xtd::forms::style_sheets::style_sheet instance from specified css forrmated text.
auto status_bar_panels() const noexcept -> const status_bar_panels_t &
Gets the style sheet status bar panels collection of this instance.
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::tool_bar_button > tool_bar_buttons_t
Represents a style sheet buttons collection.
Definition style_sheet.hpp:96
static auto system_colors_from_css(const xtd::string &css_text) -> xtd::forms::style_sheets::system_colors
Gets the style sheet system colors from specified css string.
auto tool_bar_buttons() const noexcept -> const tool_bar_buttons_t &
Gets the style sheet tool bar buttons collection of this instance.
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::tool_bar > tool_bars_t
Represents a style sheet tool_bars collection.
Definition style_sheet.hpp:94
auto status_bar() const noexcept -> xtd::forms::style_sheets::status_bar
Gets the style sheet status_bar for the xtd::forms::style_sheets::pseudo_state::standard pseudo state...
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::control > controls_t
Represents a style sheet controls collection.
Definition style_sheet.hpp:74
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::toggle_button > toggle_buttons_t
Represents a style sheet toggle buttons collection.
Definition style_sheet.hpp:92
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::status_bar > status_bars_t
Represents a style sheet tool_bars collection.
Definition style_sheet.hpp:88
auto theme() const noexcept -> const xtd::forms::style_sheets::theme &
Gets The style sheet theme of this instance.
static auto style_sheet_names() noexcept -> const style_sheet_names_t &
Gets the installed xtd::forms::style_sheets::style_sheet style sheet names.
static auto theme_from_css(const xtd::string &css_text) -> xtd::forms::style_sheets::theme
Gets the style sheet theme from specified css string.
static auto form_from_css(const xtd::string &css_text) -> forms_t
Gets the style sheet forms collection from specified css string.
auto flat_button() const noexcept -> xtd::forms::style_sheets::button
Gets the style sheet button for the xtd::forms::style_sheets::pseudo_state::standard pseudo state.
xtd::collections::generic::list< xtd::string > style_sheet_names_t
Represents a style_sheet names collection.
Definition style_sheet.hpp:86
std::map< xtd::string, style_sheet > style_sheets_t
Represents a style_sheets collection.
Definition style_sheet.hpp:84
static auto button_from_css(const xtd::string &css_text) -> buttons_t
Gets the style sheet buttons collection from specified css string.
auto toggle_buttons() const noexcept -> const toggle_buttons_t &
Gets the style sheet buttons collection of this instance.
auto tool_bar_button() const noexcept -> xtd::forms::style_sheets::tool_bar_button
Gets the style sheet tool bar button for the xtd::forms::style_sheets::pseudo_state::standard pseudo ...
static const style_sheet empty
Provides an empty xtd::forms::style_sheets::style_sheet object.
Definition style_sheet.hpp:105
style_sheet()
Initialize a new xtd::forms::style_sheets::style_sheet instance.
auto flat_toggle_button() const noexcept -> xtd::forms::style_sheets::toggle_button
Gets the style sheet toggle_button for the xtd::forms::style_sheets::pseudo_state::standard pseudo st...
auto popup_toggle_button() const noexcept -> xtd::forms::style_sheets::toggle_button
Gets the style sheet toggle_button for the xtd::forms::style_sheets::pseudo_state::standard pseudo st...
auto flat_buttons() const noexcept -> const buttons_t &
Gets the style sheet buttons collection of this instance.
auto is_system_style_sheet() const noexcept -> bool
Gets a value indicate if this instance is system style sheet.
auto controls() const noexcept -> const controls_t &
Gets the style sheet controls collection of this instance.
auto panel() const noexcept -> xtd::forms::style_sheets::panel
Gets the style sheet panel for the xtd::forms::style_sheets::pseudo_state::standard pseudo state.
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::button > buttons_t
Represents a style sheet buttons collection.
Definition style_sheet.hpp:72
static auto current_style_sheet() noexcept -> const style_sheet &
Gets current xtd::forms::style_sheets::style_sheet style sheet.
static event< style_sheet, event_handler > style_sheet_changed
Occurs when the value of the xtd::forms::style_sheets::style_sheet::current_style_sheet property chan...
Definition style_sheet.hpp:429
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::link_label > link_labels_t
Represents a style sheet link_label collection.
Definition style_sheet.hpp:80
auto forms() const noexcept -> const forms_t &
Gets the style sheet forms collection of this instance.
static auto system_style_sheet() noexcept -> const style_sheet &
Gets system xtd::forms::style_sheets::style_sheet style sheet.
auto panels() const noexcept -> const panels_t &
Gets the style sheet panels collection of this instance.
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::user_control > user_controls_t
Represents a style sheet user_controls collection.
Definition style_sheet.hpp:98
auto status_bars() const noexcept -> const status_bars_t &
Gets the style sheet status_bar collection of this instance.
static auto get_style_sheet_from_path(const xtd::string &path_name) -> style_sheet
Gets the installed xtd::forms::style_sheets::style_sheet style sheet from specified name.
auto user_controls() const noexcept -> const user_controls_t &
Gets the style sheet user_control collection of this instance.
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::label > labels_t
Represents a style sheet labels collection.
Definition style_sheet.hpp:78
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::form > forms_t
Represents a style sheet forms collection.
Definition style_sheet.hpp:76
static auto get_style_sheet_from_file(const xtd::string &file_name) -> style_sheet
Gets the installed xtd::forms::style_sheets::style_sheet style sheet from specified name.
auto tool_bars() const noexcept -> const tool_bars_t &
Gets the style sheet tool_bars collection of this instance.
auto toggle_button() const noexcept -> xtd::forms::style_sheets::toggle_button
Gets the style sheet button for the xtd::forms::style_sheets::pseudo_state::standard pseudo state.
auto popup_buttons() const noexcept -> const buttons_t &
Gets the style sheet buttons collection of this instance.
auto flat_toggle_buttons() const noexcept -> const toggle_buttons_t &
Gets the style sheet toggle_buttons collection of this instance.
static auto style_sheets() noexcept -> const style_sheets_t &
Gets the installed xtd::forms::style_sheets::style_sheet style sheets.
auto user_control() const noexcept -> xtd::forms::style_sheets::user_control
Gets the style sheet user_control for the xtd::forms::style_sheets::pseudo_state::standard pseudo sta...
auto equals(const xtd::object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
auto button() const noexcept -> xtd::forms::style_sheets::button
Gets the style sheet button for the xtd::forms::style_sheets::pseudo_state::standard pseudo state.
auto popup_button() const noexcept -> xtd::forms::style_sheets::button
Gets the style sheet button for the xtd::forms::style_sheets::pseudo_state::standard pseudo state.
auto link_labels() const noexcept -> const link_labels_t &
Gets the style sheet link_label collection of this instance.
auto label() const noexcept -> xtd::forms::style_sheets::label
Gets the style sheet label for the xtd::forms::style_sheets::pseudo_state::standard pseudo state.
auto labels() const noexcept -> const labels_t &
Gets the style sheet labels collection of this instance.
auto tool_bar() const noexcept -> xtd::forms::style_sheets::tool_bar
Gets the style sheet tool_bar for the xtd::forms::style_sheets::pseudo_state::standard pseudo state.
std::map< xtd::forms::style_sheets::pseudo_state, xtd::forms::style_sheets::panel > panels_t
Represents a style sheet panels collection.
Definition style_sheet.hpp:82
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
static auto get_style_sheet_from_name(const xtd::string &name) -> style_sheet
Gets the installed xtd::forms::style_sheets::style_sheet style sheet from specified name.
auto system_colors() const noexcept -> const xtd::forms::style_sheets::system_colors &
Gets The style sheet system colors of this instance.
static auto to_border_type(xtd::forms::border_style border) -> std::tuple< xtd::forms::style_sheets::border_type, int32, int32 >
Converts xtd::forms::border_style in std::tuple<xtd::forms::style_sheets::border_type,...
auto status_bar_panel() const noexcept -> xtd::forms::style_sheets::status_bar_panel
Gets the style sheet status bar panel for the xtd::forms::style_sheets::pseudo_state::standard pseudo...
static auto control_from_css(const xtd::string &css_text) -> controls_t
Gets the style sheet controls collection from specified css string.
auto popup_toggle_buttons() const noexcept -> const toggle_buttons_t &
Gets the style sheet toggle_buttons collection of this instance.
auto buttons() const noexcept -> const buttons_t &
Gets the style sheet buttons collection of this instance.
auto link_label() const noexcept -> xtd::forms::style_sheets::link_label
Gets the style sheet link_label for the xtd::forms::style_sheets::pseudo_state::standard pseudo state...
The theme data allows you to specify the theme informations.
Definition system_colors.hpp:34
The theme data allows you to specify the theme informations.
Definition theme.hpp:32
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition uri.hpp:103
Definition css_reader.hpp:14
Contains forms_export_ keyword.
generic_event_handler< const xtd::event_args & > event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:24
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
xtd::forms::style_sheets::lengths padding
Padding is used to create space around an element's content, inside of any defined borders.
Definition padding.hpp:26
text_decoration
The xtd::forms::style_sheets::text_decoration enum class is used to set or remove decorations from te...
Definition text_decoration.hpp:25
white_space
The white_space enum class specifies how white-space inside an element is handled.
Definition white_space.hpp:23
xtd::forms::style_sheets::lengths margin
Margins are used to create space around elements, outside of any defined borders.
Definition margin.hpp:26
xtd::forms::style_sheets::lengths border_width
The width specifies the width of the borders.
Definition border_width.hpp:26
pseudo_state
The pseudo_state enum class flag specifies the pseudo state of an element.
Definition pseudo_state.hpp:23
text_transformation
The xtd::forms::style_sheets::text_transformation enum class is used to specify uppercase and lowerca...
Definition text_transformation.hpp:24
border_type
The border_type enum class specifies what kind of border to display.
Definition border_type.hpp:23
@ standard
The item is in standard state.
Definition pseudo_state.hpp:25
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
content_alignment
Specifies alignment of content on the drawing surface.
Definition content_alignment.hpp:21
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms::style_sheets namespace contains various properties, states, and subcontrols that make...
Definition background_image.hpp:21
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Contains xtd::forms::style_sheets::pseudo_state enum class.
Contains xtd::forms::style_sheets::button alias.
Contains xtd::forms::style_sheets::control class.
Contains xtd::forms::style_sheets::form alias.
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::toggle_button alias.
Contains xtd::forms::style_sheets::tool_bar class.
Contains xtd::forms::style_sheets::tool_bar_button alias.
Contains xtd::forms::style_sheets::user_control class.
Contains xtd::forms::style_sheets::theme class.
Contains xtd::forms::style_sheets::system_colors class.