108 void convert(
const std::string& str);
158 const T& result = execute(v);
160 LOG_GUI_D <<
"Formula: execute '" << formula_ <<
"' result '" << result <<
"'.\n";
242 const auto& result = v.
as_list();
243 const int alpha = result.size() == 4 ? result[3].as_int() :
ALPHA_OPAQUE;
246 result.at(0).as_int(),
247 result.at(1).as_int(),
248 result.at(2).as_int(),
265 static_assert(
sizeof(T) == 0,
"typed_formula: Missing execute specialization");
272 value_ = lexical_cast_default<T>(str);
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.
const std::vector< variant > & as_list() const
const std::string & as_string() const
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.
const uint8_t ALPHA_OPAQUE
bool as_bool() const
Returns a boolean state of the variant value.
static color_t from_rgba_string(const std::string &c)
Creates a new color_t object from a string variable in "R,G,B,A" format.