29      const auto *dvalue = GetDefaults().Find(
name);
 
   30      if (!dvalue || !dvalue->Compatible(value.
Kind()))
 
   34   if (
auto access = EnsureAttr(
name)) {
 
   35      access.attr->Add(access.fullname, value.
Copy());
 
   47   if (
auto v = AccessValue(
name, use_style))
 
   48      return v.value->IsEqual(value);
 
   58   for (
const auto &entry : GetDefaults()) {
 
   59      if (
auto v = AccessValue(entry.first, use_style))
 
   69   for (
const auto &entry : GetDefaults()) {
 
   70      if (
auto v = AccessValue(entry.first, use_style))
 
   71         if (!tgt.
IsValueEqual(entry.first, *
v.value, use_style)) 
return false;
 
   97   if (
auto access = AccessAttr(
name))
 
   98       const_cast<RAttrMap*
>(access.attr)->Clear(access.fullname);
 
  103   if (
auto access = EnsureAttr(
name))
 
  104      access.attr->AddBool(access.fullname, value);
 
  109   if (
auto access = EnsureAttr(
name))
 
  110      access.attr->AddInt(access.fullname, value);
 
  115   if (
auto access = EnsureAttr(
name))
 
  116      access.attr->AddDouble(access.fullname, value);
 
  121   if (
auto access = EnsureAttr(
name))
 
  122      access.attr->AddString(access.fullname, value);
 
  128   for (
const auto &entry : GetDefaults())
 
  129      ClearValue(entry.first);
 
Base class for all attributes, used with RDrawable.
 
bool IsValueEqual(const std::string &name, const RAttrMap::Value_t &value, bool use_style=false) const
Copy attributes into target object.
 
void Clear()
Clear all respective values from drawable.
 
bool CopyValue(const std::string &name, const RAttrMap::Value_t &value, bool check_type=true)
Copy attributes from other object.
 
void ClearValue(const std::string &name)
 
void AssignDrawable(RDrawable *drawable, const std::string &prefix)
Return value from attributes container - no style or defaults are used.
 
void SetValue(const std::string &name, bool value)
 
bool IsSame(const RAttrBase &src, bool use_style=true) const
Check if all values which are evaluated in this object are exactly the same as in tgt object.
 
void AssignParent(RAttrBase *parent, const std::string &prefix)
 
virtual const RAttrMap & GetDefaults() const
Return default values for attributes, empty for base class.
 
void CopyTo(RAttrBase &tgt, bool use_style=true) const
Copy attributes into target object.
 
virtual EValuesKind Kind() const =0
 
virtual std::unique_ptr< Value_t > Copy() const =0
 
Base class for drawable entities: objects that can be painted on a RPad.