#pragma once #include #include #include #include #include namespace psemek::ui { enum class bevel_type { up, down, }; struct element; enum class text_style_flag { bold, underline, strikethrough, }; using text_style = util::flag_set; struct style { std::optional scale; std::optional bg_color; std::optional fg_color; std::optional highlight_color; std::optional action_color; std::optional> action_offset; std::optional border_color; std::optional border_width; std::optional bevel_light_color; std::optional bevel_dark_color; std::optional bevel_type; std::optional bevel_width; std::optional axis_color; std::optional ref_height; std::optional> shadow_offset; std::optional shadow_color; std::optional> inner_margin; std::optional outer_margin; std::optional text_color; std::optional text_scale; std::optional text_style; std::optional> text_shadow_offset; std::optional link_color; std::optional link_style; std::optional link_hover_color; std::optional link_hover_style; std::optional link_click_color; std::optional link_click_style; std::shared_ptr font; std::shared_ptr bold_font; mutable std::unordered_set use_as_style; mutable std::unordered_set use_as_own_style; style() = default; style(style &&) = default; style(style const &); style & operator = (style &&) = default; style & operator = (style const &) = delete; void on_changed(); }; void merge(style & dst, style const & src); style scale(style const & s, float factor); style default_style(); }