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.

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to