138 : formula_(), value_(value)
160 const T& result = execute(v);
162 DBG_GUI_D <<
"Formula: execute '" << *formula_ <<
"' result '" << result <<
"'.";
244 const auto& result = v.
as_list();
245 const int alpha = result.size() == 4 ? result[3].as_int() :
ALPHA_OPAQUE;
248 result.at(0).as_int(),
249 result.at(1).as_int(),
250 result.at(2).as_int(),
267 static_assert(
sizeof(T) == 0,
"typed_formula: Missing execute specialization");
274 value_ = lexical_cast_default<T>(str);
const std::string & as_string() const
bool as_bool() const
Returns a boolean state of the variant value.
const std::vector< variant > & as_list() const
constexpr uint8_t ALPHA_OPAQUE
Define the common log macros for the gui toolkit.
New lexcical_cast header.
PangoAlignment decode_text_alignment(const std::string &alignment)
Converts a text alignment string to a text alignment.
bool string_bool(const std::string &str, bool def)
Convert no, false, off, 0, 0.0 to false, empty to def, and others to true.
The basic class for representing 8-bit RGB or RGBA colour values.
static color_t from_rgba_string(std::string_view c)
Creates a new color_t object from a string variable in "R,G,B,A" format.