properly track step edit status in editor & mixer windows
[ardour.git] / gtk2_ardour / canvas-flag.h
1 #ifndef CANVASFLAG_H_
2 #define CANVASFLAG_H_
3
4 #include <string>
5 #include <libgnomecanvasmm/group.h>
6 #include <libgnomecanvasmm/widget.h>
7 #include <libgnomecanvasmm/text.h>
8
9 #include "ardour/midi_model.h"
10
11 #include "simplerect.h"
12 #include "simpleline.h"
13
14 class MidiRegionView;
15
16 namespace Gnome {
17 namespace Canvas {
18
19 class CanvasFlag : public Group
20 {
21 public:
22         CanvasFlag(MidiRegionView& region,
23                    Group&          parent,
24                    double          height,
25                    guint           outline_color_rgba = 0xc0c0c0ff,
26                    guint           fill_color_rgba = 0x07070707,
27                    double          x = 0.0,
28                    double          y = 0.0);
29
30         virtual ~CanvasFlag();
31
32         virtual bool on_event(GdkEvent* ev);
33
34         void set_text(const std::string& a_text);
35
36 protected:
37         Text*            _text;
38         double           _height;
39         guint            _outline_color_rgba;
40         guint            _fill_color_rgba;
41         MidiRegionView&  _region;
42
43 private:
44         void delete_allocated_objects();
45
46         SimpleLine*      _line;
47         SimpleRect*      _rect;
48 };
49
50
51 } // namespace Canvas
52 } // namespace Gnome
53
54 #endif /*CANVASFLAG_H_*/