diff options
author | David Robillard <d@drobilla.net> | 2007-06-29 04:02:58 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-29 04:02:58 +0000 |
commit | 24ccaac67e9d416b3f3c564a441934313f3e9a21 (patch) | |
tree | f244c9835aadc67f88c73ad2f499b6575f06c27c /libs/gtkmm2ext | |
parent | f8697ed223c1f59dde5aee1ac7bff8bd8a6e19a8 (diff) |
Further automation refactoring - bring in the concept of Controllable, work towards
making automation + GUI + play/write/touch generic and easily reusable.
Added bar controller to automation track controls (mostly relevant for MIDI CC, but added for gain and pan too Just Because).
Fixed glaring "redirect" list errors.
Fix plugin controls/automation loading.
git-svn-id: svn://localhost/ardour2/trunk@2080 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/barcontroller.cc | 3 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/barcontroller.h | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc index c3c15b4281..142d224171 100644 --- a/libs/gtkmm2ext/barcontroller.cc +++ b/libs/gtkmm2ext/barcontroller.cc @@ -349,7 +349,8 @@ BarController::expose (GdkEventExpose* event) char buf[64]; buf[0] = '\0'; - label_callback (buf, 64); + if (label_callback) + label_callback (buf, 64); if (buf[0] != '\0') { diff --git a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h index c91f4c8a06..ba2e1f3f7b 100644 --- a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h +++ b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h @@ -32,7 +32,10 @@ namespace Gtkmm2ext { class BarController : public Gtk::Frame { public: - BarController (Gtk::Adjustment& adj, PBD::Controllable&, sigc::slot<void,char*,unsigned int>); + typedef sigc::slot<void,char*,unsigned int> LabelCallback; + + BarController (Gtk::Adjustment& adj, PBD::Controllable&, LabelCallback lc = LabelCallback()); + virtual ~BarController () {} enum Style { @@ -40,6 +43,7 @@ class BarController : public Gtk::Frame RightToLeft, Line, CenterOut, + TopToBottom, BottomToTop }; @@ -64,7 +68,7 @@ class BarController : public Gtk::Frame Gtk::Adjustment& adjustment; BindingProxy binding_proxy; Gtk::DrawingArea darea; - sigc::slot<void,char*,unsigned int> label_callback; + LabelCallback label_callback; Glib::RefPtr<Pango::Layout> layout; Style _style; bool grabbed; |