summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-05-02 13:38:16 +0000
committerCarl Hetherington <carl@carlh.net>2011-05-02 13:38:16 +0000
commit988348185ece58b9af4ecc3a919e7f4862fa9a54 (patch)
tree7e5af4a639509127d075fd50c03b76261dd20d0a /gtk2_ardour/editor_canvas.cc
parent5711425f187573caa53b040a81d39e3cca9f61f1 (diff)
Separate verbose cursor out into its own class and clean up the API. Fixes #4010.
git-svn-id: svn://localhost/ardour2/branches/3.0@9455 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r--gtk2_ardour/editor_canvas.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 5d2d8d0166..816f551fcf 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -54,6 +54,7 @@
#include "keyboard.h"
#include "editor_cursors.h"
#include "mouse_cursors.h"
+#include "verbose_cursor.h"
#include "i18n.h"
@@ -116,18 +117,8 @@ Editor::initialize_canvas ()
gint phys_width = physical_screen_width (Glib::RefPtr<Gdk::Window>());
gint phys_height = physical_screen_height (Glib::RefPtr<Gdk::Window>());
- /* stuff for the verbose canvas cursor */
-
- Pango::FontDescription* font = get_font_for_style (N_("VerboseCanvasCursor"));
-
- verbose_canvas_cursor = new ArdourCanvas::NoEventText (*track_canvas->root());
- verbose_canvas_cursor->property_font_desc() = *font;
- verbose_canvas_cursor->property_anchor() = ANCHOR_NW;
-
- delete font;
-
- verbose_cursor_visible = false;
-
+ _verbose_cursor = new VerboseCursor (this);
+
/* on the bottom, an image */
if (Profile->get_sae()) {
@@ -774,7 +765,7 @@ void
Editor::color_handler()
{
playhead_cursor->canvas_item.property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_PlayHead.get();
- verbose_canvas_cursor->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_VerboseCanvasCursor.get();
+ _verbose_cursor->set_color (ARDOUR_UI::config()->canvasvar_VerboseCanvasCursor.get());
meter_bar->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MeterBar.get();
meter_bar->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerBarSeparator.get();