A color with a name and a description, as stored in a Scheme or a Palette.
More...
#include <headers/guillaume/theme.hpp>
|
|
| ExtendedColor (void) |
| | Create a default-constructed color with an empty name and description, not harmonized.
|
| | ExtendedColor (const utility::graphic::Color32Bit &color, const std::string &name, const std::string &description, bool harmonized) |
| | Create a color with its documentation.
|
|
| ~ExtendedColor (void)=default |
| | Default destructor.
|
| const utility::graphic::Color32Bit & | getColor (void) const |
| | Get the color to draw with.
|
| const std::string & | getName (void) const |
| | Get the name of the color.
|
| const std::string & | getDescription (void) const |
| | Get the text describing what the color is for.
|
| bool | isHarmonized (void) const |
| | Tell whether the color was shifted toward the theme's source color.
|
| void | setColor (const utility::graphic::Color32Bit &color) |
| | Replace the color value; the name and the description are kept.
|
| void | setName (const std::string &name) |
| | Replace the name of the color.
|
| void | setDescription (const std::string &description) |
| | Replace the text describing what the color is for.
|
| void | setHarmonized (bool harmonized) |
| | Mark the color as harmonized or not.
|
A color with a name and a description, as stored in a Scheme or a Palette.
Only the color value is used for drawing. The name and the description document the theme (the default theme names each color after its role, "primary", "onPrimary", ...).
Definition at line 157 of file theme.hpp.
◆ ExtendedColor()
| guillaume::ExtendedColor::ExtendedColor |
( |
const utility::graphic::Color32Bit & | color, |
|
|
const std::string & | name, |
|
|
const std::string & | description, |
|
|
bool | harmonized ) |
Create a color with its documentation.
- Parameters
-
| color | The color, 8 bits per RGBA channel. |
| name | The name of the color, such as "primary". |
| description | What the color is for; may be empty. |
| harmonized | True when the color was shifted toward the theme's source color, false when it is used as designed. |
◆ getColor()
| const utility::graphic::Color32Bit & guillaume::ExtendedColor::getColor |
( |
void | | ) |
const |
Get the color to draw with.
- Returns
- The color, 8 bits per RGBA channel.
◆ getDescription()
| const std::string & guillaume::ExtendedColor::getDescription |
( |
void | | ) |
const |
Get the text describing what the color is for.
- Returns
- The description; empty when none was given.
◆ getName()
| const std::string & guillaume::ExtendedColor::getName |
( |
void | | ) |
const |
Get the name of the color.
- Returns
- The name; empty when none was given.
◆ isHarmonized()
| bool guillaume::ExtendedColor::isHarmonized |
( |
void | | ) |
const |
Tell whether the color was shifted toward the theme's source color.
- Returns
- True when the color is marked as harmonized. The flag is informative; nothing in the library computes from it.
◆ setColor()
| void guillaume::ExtendedColor::setColor |
( |
const utility::graphic::Color32Bit & | color | ) |
|
Replace the color value; the name and the description are kept.
- Parameters
-
| color | The new color, 8 bits per RGBA channel. |
◆ setDescription()
| void guillaume::ExtendedColor::setDescription |
( |
const std::string & | description | ) |
|
Replace the text describing what the color is for.
- Parameters
-
| description | The new description; may be empty. |
◆ setHarmonized()
| void guillaume::ExtendedColor::setHarmonized |
( |
bool | harmonized | ) |
|
Mark the color as harmonized or not.
- Parameters
-
| harmonized | True when the color was shifted toward the theme's source color. |
◆ setName()
| void guillaume::ExtendedColor::setName |
( |
const std::string & | name | ) |
|
Replace the name of the color.
- Parameters
-
The documentation for this class was generated from the following file: