diff options
author | David Robillard <d@drobilla.net> | 2009-02-16 05:54:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-16 05:54:12 +0000 |
commit | 31a6e0b2541f7e0f84fc3293930eff021f31d84b (patch) | |
tree | ea7163caab8640ac8131d30244c73a206e14ca2f /gtk2_ardour/canvas-flag.h | |
parent | de8864059836e510fb8f33de36fe499c42a391ac (diff) |
Fix time / positioning of PC flags (beat time).
Fix needless string copying in flag stuff.
Clean up.
git-svn-id: svn://localhost/ardour2/branches/3.0@4601 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-flag.h')
-rw-r--r-- | gtk2_ardour/canvas-flag.h | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/gtk2_ardour/canvas-flag.h b/gtk2_ardour/canvas-flag.h index c48f78b358..ad8c506d65 100644 --- a/gtk2_ardour/canvas-flag.h +++ b/gtk2_ardour/canvas-flag.h @@ -1,6 +1,7 @@ #ifndef CANVASFLAG_H_ #define CANVASFLAG_H_ +#include <string> #include <libgnomecanvasmm/group.h> #include <libgnomecanvasmm/widget.h> @@ -19,41 +20,41 @@ class CanvasFlag : public Group, public InteractiveItem { 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 - ) : Group(parent, x, y) - , _text(0) - , _height(height) - , _outline_color_rgba(outline_color_rgba) - , _fill_color_rgba(fill_color_rgba) - , _region(region) - , _line(0) - , _rect(0) + MidiRegionView& region, + Group& parent, + double height, + guint outline_color_rgba = 0xc0c0c0ff, + guint fill_color_rgba = 0x07070707, + double x = 0.0, + double y = 0.0) + : Group(parent, x, y) + , _text(0) + , _height(height) + , _outline_color_rgba(outline_color_rgba) + , _fill_color_rgba(fill_color_rgba) + , _region(region) + , _line(0) + , _rect(0) {} virtual ~CanvasFlag(); virtual bool on_event(GdkEvent* ev); - void set_text(string& a_text); + void set_text(const std::string& a_text); protected: - InteractiveText* _text; - double _height; - guint _outline_color_rgba; - guint _fill_color_rgba; - MidiRegionView& _region; + InteractiveText* _text; + double _height; + guint _outline_color_rgba; + guint _fill_color_rgba; + MidiRegionView& _region; private: void delete_allocated_objects(); - SimpleLine* _line; - InteractiveRect* _rect; + SimpleLine* _line; + InteractiveRect* _rect; }; |