Badge specifications.
More...
#include <widget.h>
|
std::string | _text |
| The badge's text.
|
|
std::string | _font = "Segoe UI" |
| The font to use for the badge's text.
|
|
float | _font_size = 8.f |
| The font size of the badge's text.
|
|
float | _border = .5f |
| The thickness of the badge's border.
|
|
color | _color = { 255, 0, 0, 180 } |
| The fill color of the badge.
|
|
color | _color_border = { 255, 255, 255, 180 } |
| The color of the badge's border.
|
|
color | _color_text = { 255, 255, 255, 255 } |
| The color of the badge's text.
|
|
badge_position | _position = badge_position::bottom_right |
| The badge's position.
|
|
◆ badge_position
Badge position within the widget.
Enumerator |
---|
top_left | Badget on the top left of the widget.
|
top_right | Badget on the top right of the widget.
|
bottom_left | Badget on the bottom left of the widget.
|
bottom_right | Badget on the bottom right of the widget.
|
◆ border() [1/2]
float & liblec::lecui::widgets::badge_specs::border |
( |
| ) |
|
Get or set the thickness of the border.
- Returns
- A reference to the border thickness, in pixels.
◆ border() [2/2]
badge_specs & liblec::lecui::widgets::badge_specs::border |
( |
const float & |
border | ) |
|
Set the thickness of the border.
- Parameters
-
border | The border thickness, in pixels. |
- Returns
- A reference to the modified object.
◆ color() [1/2]
lecui::color & liblec::lecui::widgets::badge_specs::color |
( |
| ) |
|
Get or set the color of the badge.
- Returns
- A reference to the badge's color.
◆ color() [2/2]
Set the color of the badge.
- Parameters
-
- Returns
- A reference to the modified object.
◆ color_border() [1/2]
lecui::color & liblec::lecui::widgets::badge_specs::color_border |
( |
| ) |
|
Get or set the color of the badge's border.
- Returns
- A reference to the badge's border color.
◆ color_border() [2/2]
Set the color of the badge's border.
- Parameters
-
color_border | The color of the badge's border, as defined in lecui::color. |
- Returns
- A reference to the modified object.
◆ color_text() [1/2]
lecui::color & liblec::lecui::widgets::badge_specs::color_text |
( |
| ) |
|
Get or set the color of the badge's text.
- Returns
- A reference to the badge's text color.
◆ color_text() [2/2]
Set the color of the badge's text.
- Parameters
-
color_text | The color of the badge's text, as defined in lecui::color. |
- Returns
- A reference to the modified object.
◆ font() [1/2]
std::string & liblec::lecui::widgets::badge_specs::font |
( |
| ) |
|
Get or set the default badge font, e.g. "Georgia".
- Returns
- A reference to the badge's font name.
◆ font() [2/2]
badge_specs & liblec::lecui::widgets::badge_specs::font |
( |
const std::string & |
font | ) |
|
Set the badge font.
- Parameters
-
font | The name of the font, e.g. "Georgia". |
- Returns
- A reference to the modified object.
◆ font_size() [1/2]
float & liblec::lecui::widgets::badge_specs::font_size |
( |
| ) |
|
Get or set the badge's font size in points, e.g. 9.0f.
- Returns
- A reference to the widget's font size.
◆ font_size() [2/2]
badge_specs & liblec::lecui::widgets::badge_specs::font_size |
( |
const float & |
font_size | ) |
|
Set the badge's font size.
- Parameters
-
font_size | The font size in points, e.g. 9.0f. |
- Returns
- A reference to the modified object.
◆ operator!=()
bool liblec::lecui::widgets::badge_specs::operator!= |
( |
const badge_specs & |
param | ) |
|
Check whether badge specs are NOT equal. Only those properties that require the widget's basic resources to be re-created are considered.
- Parameters
-
param | The specs to compare to. |
- Returns
- Returns true when the badge specs are NOT equal, else false.
◆ operator==()
bool liblec::lecui::widgets::badge_specs::operator== |
( |
const badge_specs & |
param | ) |
|
Check whether badge specs are equal. Only those properties that require the widget's basic resources to be re-created are considered.
- Parameters
-
param | The specs to compare to. |
- Returns
- Returns true when the badge specs are equal, else false.
◆ position() [1/2]
Get or set the badge's position.
- Returns
- A reference to the badge's position.
◆ position() [2/2]
Set the badge's position.
- Parameters
-
- Returns
- A reference to the modified object.
◆ text() [1/2]
std::string & liblec::lecui::widgets::badge_specs::text |
( |
| ) |
|
Get or set the badge text.
- Returns
- A reference to the badge text.
◆ text() [2/2]
badge_specs & liblec::lecui::widgets::badge_specs::text |
( |
const std::string & |
text | ) |
|
Set the badge text.
- Parameters
-
- Returns
- A reference to the modified object.
The documentation for this class was generated from the following file: