5 #ifndef __uiattributes__ 6 #define __uiattributes__ 8 #include "../lib/vstguifwd.h" 9 #include "../lib/cstring.h" 12 #include "../lib/platform/std_unorderedmap.h" 18 using UIAttributesMap = std::unordered_map<std::string,std::string>;
24 using StringArray = std::vector<std::string>;
26 explicit UIAttributes (UTF8StringPtr* attributes =
nullptr);
29 using UIAttributesMap::begin;
30 using UIAttributesMap::end;
31 using UIAttributesMap::iterator;
32 using UIAttributesMap::const_iterator;
34 bool hasAttribute (
const std::string& name)
const;
35 const std::string* getAttributeValue (
const std::string& name)
const;
36 void setAttribute (
const std::string& name,
const std::string& value);
37 void setAttribute (
const std::string& name, std::string&& value);
38 void setAttribute (std::string&& name, std::string&& value);
39 void removeAttribute (
const std::string& name);
41 void setBooleanAttribute (
const std::string& name,
bool value);
42 bool getBooleanAttribute (
const std::string& name,
bool& value)
const;
44 void setIntegerAttribute (
const std::string& name, int32_t value);
45 bool getIntegerAttribute (
const std::string& name, int32_t& value)
const;
47 void setDoubleAttribute (
const std::string& name,
double value);
48 bool getDoubleAttribute (
const std::string& name,
double& value)
const;
50 void setPointAttribute (
const std::string& name,
const CPoint& p);
51 bool getPointAttribute (
const std::string& name,
CPoint& p)
const;
53 void setRectAttribute (
const std::string& name,
const CRect& r);
54 bool getRectAttribute (
const std::string& name,
CRect& r)
const;
56 void setStringArrayAttribute (
const std::string& name,
const StringArray& values);
57 bool getStringArrayAttribute (
const std::string& name, StringArray& values)
const;
59 static std::string createStringArrayValue (
const StringArray& values);
61 void removeAll () { clear (); }
69 #endif // __uiattributes__
Rect structure.
Definition: crect.h:17
Definition: customcontrols.cpp:8
Definition: uiattributes.h:21
Definition: vstguibase.h:247
Point structure.
Definition: cpoint.h:17