diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-07 00:37:13 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-07-07 00:37:13 +0000 |
commit | 10cb0a7646ae7da18e5e6f49b940a5e921a73b57 (patch) | |
tree | 9d23f3e2e5d961aa2520f51ebcf5ed9b64cf7c5c /gtk2_ardour/axis_view.cc | |
parent | d5bb72975523a35e65d94605de2abff01c3e6ce7 (diff) |
introduce GUIObjectState; massive, pervasive changes in visibility and height management for track displays in the editor
git-svn-id: svn://localhost/ardour2/branches/3.0@9796 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/axis_view.cc')
-rw-r--r-- | gtk2_ardour/axis_view.cc | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/gtk2_ardour/axis_view.cc b/gtk2_ardour/axis_view.cc index dcbaa35d37..65a9f1b79a 100644 --- a/gtk2_ardour/axis_view.cc +++ b/gtk2_ardour/axis_view.cc @@ -35,6 +35,8 @@ #include "ardour/utils.h" #include "public_editor.h" +#include "ardour_ui.h" +#include "gui_object.h" #include "axis_view.h" #include "i18n.h" @@ -49,7 +51,6 @@ AxisView::AxisView (ARDOUR::Session* sess) : SessionHandlePtr (sess) { _selected = false; - _marked_for_display = false; } AxisView::~AxisView() @@ -95,3 +96,43 @@ AxisView::unique_random_color() /* XXX need throttle here to make sure we don't spin for ever */ } } + +void +AxisView::set_gui_property (const string& property_name, const string& value) +{ + ARDOUR_UI::instance()->gui_object_state->set (state_id(), property_name, value); +} + +void +AxisView::set_gui_property (const string& property_name, int value) +{ + ARDOUR_UI::instance()->gui_object_state->set (state_id(), property_name, value); +} + +string +AxisView::gui_property (const string& property_name) const +{ + return ARDOUR_UI::instance()->gui_object_state->get_string (state_id(), property_name); +} + +bool +AxisView::marked_for_display () const +{ + return string_is_affirmative (gui_property ("visible")); +} + +bool +AxisView::set_marked_for_display (bool yn) +{ + if (yn != marked_for_display()) { + if (yn) { + set_gui_property ("visible", "yes"); + } else { + set_gui_property ("visible", "no"); + } + return true; // things changed + } + + return false; +} + |