summaryrefslogtreecommitdiff
path: root/gtk2_ardour/canvas-flag.h
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2008-12-11 08:06:27 +0000
committerHans Baier <hansfbaier@googlemail.com>2008-12-11 08:06:27 +0000
commite009016b03ea5c5c690d7d4939b264313600fd4b (patch)
tree6de5374502891ad1229fffae5ab5f7d71eed70c2 /gtk2_ardour/canvas-flag.h
parentdfed4965b7cf74f21a9e78689dbda1bc5892cde8 (diff)
* added myself to about.cc
* created ArdourCanvas::CanvasFlag as a base class for flags * removed obsolete cruft from midi_model * made MidiTimeAxisView and MidiRegionView work together to display program changes as names by means of MidiPatchManager git-svn-id: svn://localhost/ardour2/branches/3.0@4307 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-flag.h')
-rw-r--r--gtk2_ardour/canvas-flag.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/gtk2_ardour/canvas-flag.h b/gtk2_ardour/canvas-flag.h
new file mode 100644
index 0000000000..ec150f685a
--- /dev/null
+++ b/gtk2_ardour/canvas-flag.h
@@ -0,0 +1,58 @@
+#ifndef CANVASFLAG_H_
+#define CANVASFLAG_H_
+
+#include <libgnomecanvasmm/group.h>
+#include <libgnomecanvasmm/text.h>
+#include <libgnomecanvasmm/widget.h>
+
+#include <ardour/midi_model.h>
+
+#include "simplerect.h"
+#include "simpleline.h"
+
+class MidiRegionView;
+
+namespace Gnome {
+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
+ ) : 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();
+
+ void set_text(string a_text);
+
+protected:
+ Text* _text;
+ double _height;
+ guint _outline_color_rgba;
+ guint _fill_color_rgba;
+
+private:
+ MidiRegionView& _region;
+ SimpleLine* _line;
+ SimpleRect* _rect;
+};
+
+} // namespace Canvas
+} // namespace Gnome
+
+#endif /*CANVASFLAG_H_*/