diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-11 20:32:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-11 20:32:33 +0000 |
commit | 6dc74f8c871752b05eb7def894bd44e38d76c3f4 (patch) | |
tree | 58f1b847c5771b32b1e078d378631348855c1345 /gtk2_ardour/axis_view.h | |
parent | 58a3d6c72030a90c54e5582b75ed520536749504 (diff) |
clean up GUIObjectState API, and use bools when setting "visible" property rather than string (not that it matters); don't unconditionally set visible to true unless a non-hidden track/bus has no visibility property already
git-svn-id: svn://localhost/ardour2/branches/3.0@9843 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/axis_view.h')
-rw-r--r-- | gtk2_ardour/axis_view.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/axis_view.h b/gtk2_ardour/axis_view.h index d24cd62a73..ea502f8181 100644 --- a/gtk2_ardour/axis_view.h +++ b/gtk2_ardour/axis_view.h @@ -30,6 +30,7 @@ #include "ardour/session_handle.h" +#include "gui_object.h" #include "prompter.h" #include "selectable.h" @@ -61,11 +62,13 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu uint32_t old_order_key() const { return _old_order_key; } virtual std::string state_id() const = 0; + /* for now, we always return properties in string form. + */ std::string gui_property (const std::string& property_name) const; - - void set_gui_property (const std::string& property_name, const std::string& value); - void set_gui_property (const std::string& property_name, int value); - void set_gui_property (const std::string& property_name, double value); + + 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 marked_for_display () const; virtual bool set_marked_for_display (bool); @@ -92,6 +95,9 @@ class AxisView : public virtual Selectable, public PBD::ScopedConnectionList, pu bool _marked_for_display; uint32_t _old_order_key; + private: + static GUIObjectState& gui_object_state(); + }; /* class AxisView */ #endif /* __ardour_gtk_axis_view_h__ */ |