On Tue, 2007-02-20 at 14:47 -0800, TheLonelyStar wrote:
> 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;
> }

better:

        Glib::RefPtr<Gdk::Window> window (tmp->get_window());
        window->draw_arc (tmp->get_style()->fg_gc[tmp->get_state()],
                          true, ....


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

Reply via email to