24#ifndef WEBDAR_CSS_STYLE_HPP
25#define WEBDAR_CSS_STYLE_HPP
38#include "css_library.hpp"
47 constexpr const char* text_grey =
"wcs_tg";
48 constexpr const char* text_bold =
"wcs_tb";
49 constexpr const char* text_shadow_dark =
"wcs_tsd";
50 constexpr const char* text_shadow_bright =
"wcs_tsb";
51 constexpr const char* text_color_normal =
"wcs_cn";
52 constexpr const char* text_color_red =
"wcs_cr";
53 constexpr const char* text_color_green =
"wcs_cg";
54 constexpr const char* text_top_right =
"wcs_ttr";
55 constexpr const char* text_top_center =
"wcs_tc";
56 constexpr const char* text_right =
"wcs_tr";
57 constexpr const char* float_left =
"wcs_fll";
58 constexpr const char* float_right =
"wcs_flr";
59 constexpr const char* float_flush =
"wcs_flf";
60 constexpr const char* spacing_vertical =
"wcs_spcv";
61 constexpr const char* spacing_horizontal =
"wcs_spch";
62 constexpr const char* width_100vw =
"wcs_w100";
63 constexpr const char* width_100vw_3em =
"wcs_w100_3em";
64 constexpr const char* width_100vw_8em =
"wcs_w100_8em";
65 constexpr const char* width_100vw_5em =
"wcs_w100_5em";
66 constexpr const char* width_80vw =
"wcs_w80";
67 constexpr const char* width_60vw =
"wcs_w60";
68 constexpr const char* red_border =
"wcs_red_border";
69 constexpr const char* indent =
"wcs_indent";
80 constexpr const char* width_8em =
"wcs_w8em";
81 constexpr const char* width_full =
"fullwidth";
82 constexpr const char* btn_off =
"wcs_btn_off";
83 constexpr const char* btn_small =
"wcs_btn_small";
84 constexpr const char* btn_on =
"wcs_btn_on";
85 constexpr const char* btn_void =
"wcs_btn_void";
86 constexpr const char* btn_grey =
"wcs_btn_grey";
87 constexpr const char* url_selected =
"wcs_url_selected";
88 constexpr const char* url_normal =
"wcs_url_normal";
89 constexpr const char* url_void =
"wcs_url_void";
90 constexpr const char* url_grey =
"wcs_url_grey";
96 obj.clear_css_classes();
97 obj.add_css_class(btn_off);
98 obj.url_clear_css_classes();
99 obj.url_add_css_class(url_normal);
101 obj.add_css_class(width_8em);
104 template <
class T>
void small_button(T & obj)
106 obj.clear_css_classes();
107 obj.add_css_class(btn_small);
108 obj.url_clear_css_classes();
109 obj.url_add_css_class(url_normal);
116 obj.clear_css_classes();
117 obj.add_css_class(btn_on);
118 obj.url_clear_css_classes();
119 obj.url_add_css_class(url_selected);
121 obj.add_css_class(width_8em);
125 template <
class T>
void void_button(T & obj,
bool fullwidth =
false)
127 obj.clear_css_classes();
128 obj.add_css_class(btn_void);
129 obj.url_clear_css_classes();
130 obj.url_add_css_class(url_void);
132 obj.add_css_class(width_8em);
135 template <
class T>
void grey_button(T & obj,
bool fullwidth =
false)
137 obj.clear_css_classes();
138 obj.add_css_class(btn_grey);
139 obj.url_clear_css_classes();
140 obj.url_add_css_class(url_grey);
142 obj.add_css_class(width_8em);
class css_class gather css attributed under a given label
Definition: css_class.hpp:51
class css_library
Definition: css_library.hpp:46
the webdar_css_style namespace defines a set of global css objets and some routines to use them
Definition: webdar_css_style.cpp:45
void normal_button(T &obj, bool fullwidth=false)
apply to the given button the css_classe names defined by update_library to get a normal button style
Definition: webdar_css_style.hpp:94
void update_library(css_library &csslib)
update a css_library with all css definitions of this webdar_css_style module
Definition: webdar_css_style.cpp:452
void void_button(T &obj, bool fullwidth=false)
apply to the given button the css_classe names defined by update_library to get an void/invisible but...
Definition: webdar_css_style.hpp:125
const css_class & get_css_class(const string &name)
obtain the css_class object corresponding to the given name
Definition: webdar_css_style.cpp:465
void active_button(T &obj, bool fullwidth=false)
apply to the given button the css_classe names defined by update_library to get an active button styl...
Definition: webdar_css_style.hpp:114