Gtk::DrawingArea
- From: TheLonelyStar <nabble lonely-star org>
- To: gtkmm-list gnome org
- Subject: Gtk::DrawingArea
- Date: Tue, 20 Feb 2007 14:47:00 -0800 (PST)
Hello dear community,
I have trouble with Gtk::DrawingArea. Since the class seem to have no more
than the gobj() member function, I tried the following (copying from
examples I found in the net):
bool on_exposure(GdkEventExpose* event)
{
Gtk::DrawingArea* tmp=(Gtk::DrawingArea*)refXml->get_widget("DrawingArea");
GtkDrawingArea* da=tmp->gobj();
gdk_draw_arc (da->window,
da->style->fg_gc[GTK_WIDGET_STATE (da)],
TRUE,
0, 0, da->allocation.width, da->allocation.height,
0, 64 * 360);
return true;
}
Now, when I try to compile, I get:
g++ $(pkg-config --libs --cflags gtkmm-2.4) $(pkg-config --libs --cflags
libglademm-2.4) main.cc
main.cc: In function 'bool do_draw(GdkEventExpose*)':
main.cc:30: error: invalid use of undefined type 'struct _GtkDrawingArea'
/usr/include/gtkmm-2.4/gtkmm/drawingarea.h:34: error: forward declaration of
'struct _GtkDrawingArea'
main.cc:31: error: invalid use of undefined type 'struct _GtkDrawingArea'
/usr/include/gtkmm-2.4/gtkmm/drawingarea.h:34: error: forward declaration of
'struct _GtkDrawingArea'
main.cc:33: error: invalid use of undefined type 'struct _GtkDrawingArea'
/usr/include/gtkmm-2.4/gtkmm/drawingarea.h:34: error: forward declaration of
'struct _GtkDrawingArea'
main.cc:33: error: invalid use of undefined type 'struct _GtkDrawingArea'
/usr/include/gtkmm-2.4/gtkmm/drawingarea.h:34: error: forward declaration of
'struct _GtkDrawingArea'
What is wrong? Is this the correct way to use DrawingArea in gtkmm???
Thanks!
Nathan
--
View this message in context: http://www.nabble.com/Gtk%3A%3ADrawingArea-tf3263742.html#a9072090
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]