13
0
livetrax/gtk2_ardour/canvas-flag.h
Hans Baier 30daaebaa2 * fixed memory allocation bugs
* commented out a crash line in ardour_ui2.cc (added a warning message).
  (I thought, it may be fairly efficient to keep issues as code instead of putting
  them in the tracker where hardly ever one would notice the needle in the haystack)
* forgot to clear two other collections on MidiPatchManager::refresh()


git-svn-id: svn://localhost/ardour2/branches/3.0@4312 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-12 06:57:38 +00:00

61 lines
1.4 KiB
C++

#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:
void delete_allocated_objects();
MidiRegionView& _region;
SimpleLine* _line;
SimpleRect* _rect;
};
} // namespace Canvas
} // namespace Gnome
#endif /*CANVASFLAG_H_*/