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