3 /* libglademm example Copyright (C) 2003 libglademm development team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #include "midrawingarea.h"
21 MiDrawingArea::MiDrawingArea(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
22 : Gtk::DrawingArea(cobject)
24 //signal_expose_event().connect(slot(*this, &MiDrawingArea::on_expose_event));
27 MiDrawingArea::~MiDrawingArea()
31 bool MiDrawingArea::on_expose_event(GdkEventExpose* event)
33 Glib::RefPtr<Gdk::Window> win = get_window();
34 Glib::RefPtr<Gdk::GC> gc = get_style()->get_black_gc();
35 win->draw_line(gc, 5, 2, 5, 20);
36 win->draw_line(gc, 5, 11, 10, 11);
37 win->draw_line(gc, 10, 2, 10, 20);
38 win->draw_line(gc, 15, 2, 21, 2);
39 win->draw_line(gc, 18, 2, 18, 20);
40 win->draw_line(gc, 15, 20, 21, 20);
41 return true; // No llama otros handlers.