diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-06-12 17:16:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-06-12 17:16:43 +0000 |
commit | aadd594bd8c9226b087ab477e98c8d0c9c4072aa (patch) | |
tree | ca06a6a296cebb26f751b57b097018b864beab6b /gtk2_ardour/canvas-flag.h | |
parent | 92432f3e80d621816ac0b05484eb59fb9348ac34 (diff) |
change CanvasFlag to use a pixbuf for text rather than Canvas::Text, because we know the performance improvements are good
git-svn-id: svn://localhost/ardour2/branches/3.0@12676 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-flag.h')
-rw-r--r-- | gtk2_ardour/canvas-flag.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gtk2_ardour/canvas-flag.h b/gtk2_ardour/canvas-flag.h index 306694e870..17edc19880 100644 --- a/gtk2_ardour/canvas-flag.h +++ b/gtk2_ardour/canvas-flag.h @@ -2,13 +2,13 @@ #define CANVASFLAG_H_ #include <string> +#include <libgnomecanvasmm/pixbuf.h> #include <libgnomecanvasmm/group.h> #include <libgnomecanvasmm/widget.h> -#include <libgnomecanvasmm/text.h> #include "simplerect.h" #include "simpleline.h" -#include "canvas-noevent-text.h" +#include "canvas.h" class MidiRegionView; @@ -18,13 +18,13 @@ namespace Canvas { class CanvasFlag : public Group { public: - CanvasFlag(MidiRegionView& region, - Group& parent, - double height, - guint outline_color_rgba = 0xc0c0c0ff, - guint fill_color_rgba = 0x07070707, - double x = 0.0, - double y = 0.0); + CanvasFlag (MidiRegionView& region, + Group& parent, + double height, + guint outline_color_rgba = 0xc0c0c0ff, + guint fill_color_rgba = 0x07070707, + double x = 0.0, + double y = 0.0); virtual ~CanvasFlag(); @@ -33,12 +33,15 @@ public: virtual void set_text(const std::string& a_text); virtual void set_height (double); + int width () const { return name_pixbuf_width + 10.0; } + protected: - NoEventText* _text; + ArdourCanvas::Pixbuf* _name_pixbuf; double _height; guint _outline_color_rgba; guint _fill_color_rgba; MidiRegionView& _region; + int name_pixbuf_width; private: void delete_allocated_objects(); |