add shortcuts, node text font attributes

This commit is contained in:
2019-12-02 17:10:08 +01:00
parent baec98835a
commit aac280f48a
8 changed files with 80 additions and 18 deletions

View File

@@ -456,6 +456,11 @@ public:
{
return has(key) ? std::dynamic_pointer_cast<T>(props.at(key)) : nullptr;
}
void unset(const std::string& key)
{
if (has(key))
props.erase(key);
}
template<typename T> std::shared_ptr<T> set(const std::string& key, const T value)
{
if (auto ptr = get<T>(key))