2008-12-11 03:06:27 -05:00
|
|
|
#ifndef CANVASFLAG_H_
|
|
|
|
#define CANVASFLAG_H_
|
|
|
|
|
2009-02-16 00:54:12 -05:00
|
|
|
#include <string>
|
2008-12-11 03:06:27 -05:00
|
|
|
#include <libgnomecanvasmm/group.h>
|
|
|
|
#include <libgnomecanvasmm/widget.h>
|
2010-05-28 12:37:04 -04:00
|
|
|
#include <libgnomecanvasmm/text.h>
|
2008-12-11 03:06:27 -05:00
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/midi_model.h"
|
2008-12-11 03:06:27 -05:00
|
|
|
|
|
|
|
#include "simplerect.h"
|
|
|
|
#include "simpleline.h"
|
|
|
|
|
|
|
|
class MidiRegionView;
|
|
|
|
|
|
|
|
namespace Gnome {
|
|
|
|
namespace Canvas {
|
|
|
|
|
2010-05-28 12:37:04 -04:00
|
|
|
class CanvasFlag : public Group
|
2008-12-11 03:06:27 -05:00
|
|
|
{
|
|
|
|
public:
|
2010-05-28 12:37:04 -04:00
|
|
|
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);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-12-11 03:06:27 -05:00
|
|
|
virtual ~CanvasFlag();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-12-12 17:04:22 -05:00
|
|
|
virtual bool on_event(GdkEvent* ev);
|
|
|
|
|
2010-08-11 14:21:37 -04:00
|
|
|
virtual void set_text(const std::string& a_text);
|
|
|
|
virtual void set_height (double);
|
2008-12-11 03:06:27 -05:00
|
|
|
|
|
|
|
protected:
|
2010-05-28 12:37:04 -04:00
|
|
|
Text* _text;
|
2009-02-16 00:54:12 -05:00
|
|
|
double _height;
|
|
|
|
guint _outline_color_rgba;
|
|
|
|
guint _fill_color_rgba;
|
|
|
|
MidiRegionView& _region;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-12-11 03:06:27 -05:00
|
|
|
private:
|
2008-12-12 01:57:38 -05:00
|
|
|
void delete_allocated_objects();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-02-16 00:54:12 -05:00
|
|
|
SimpleLine* _line;
|
2010-05-28 12:37:04 -04:00
|
|
|
SimpleRect* _rect;
|
2008-12-12 17:04:22 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-12-11 03:06:27 -05:00
|
|
|
} // namespace Canvas
|
|
|
|
} // namespace Gnome
|
|
|
|
|
|
|
|
#endif /*CANVASFLAG_H_*/
|