-
- template<typename T> void set_gui_property (const std::string& property_name, const T& value) {
- gui_object_state().set<T> (state_id(), property_name, value);
+
+ bool get_gui_property (const std::string& property_name, std::string& value) const;
+
+ template <typename T>
+ bool get_gui_property (const std::string& property_name, T& value) const
+ {
+ std::string str = gui_property (property_name);
+
+ if (!str.empty ()) {
+ return PBD::string_to<T>(str, value);
+ }
+ return false;
+ }
+
+ void set_gui_property (const std::string& property_name, const std::string& value);
+
+ void set_gui_property (const std::string& property_name, const char* value) {
+ set_gui_property (property_name, std::string(value));