1 #include "canvas-flag.h"
5 using namespace Gnome::Canvas;
10 CanvasFlag::delete_allocated_objects()
29 CanvasFlag::set_text(string& a_text)
31 delete_allocated_objects();
33 _text = new CanvasFlagText(*this, 0.0, 0.0, Glib::ustring(a_text));
34 _text->property_justification() = Gtk::JUSTIFY_CENTER;
35 _text->property_fill_color_rgba() = _outline_color_rgba;
36 double flagwidth = _text->property_text_width() + 10.0;
37 double flagheight = _text->property_text_height() + 3.0;
38 _text->property_x() = flagwidth / 2.0;
39 _text->property_y() = flagheight / 2.0;
41 _line = new SimpleLine(*this, 0.0, 0.0, 0.0, _height);
42 _line->property_color_rgba() = _outline_color_rgba;
43 _rect = new CanvasFlagRect(*this, 0.0, 0.0, flagwidth, flagheight);
44 _rect->property_outline_color_rgba() = _outline_color_rgba;
45 _rect->property_fill_color_rgba() = _fill_color_rgba;
46 _text->lower_to_bottom();
50 CanvasFlag::~CanvasFlag()
52 delete_allocated_objects();
56 CanvasFlag::on_event(GdkEvent* ev)
58 cerr << "CanvasFlag::on_event(GdkEvent* ev)" << endl;