Thanks for your answer!

My function looks now like this:

Gtk::DrawingArea* tmp=(Gtk::DrawingArea*)refXml->get_widget("DrawingArea");
Glib::RefPtr<Gdk::Window> window(tmp->get_window());
        
window->draw_arc(tmp->get_style()->get_fg_gc[tmp->get_state()],
                                 TRUE,
                                 0, 0, 550,550,
                                 0, 64 * 360);

Unfortantly I still have problems:

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:31: error: invalid types '<unresolved overloaded function
type>[Gtk::StateType]' for array subscript

Line 31 is the "window->draw_arc" line.


Paul Davis wrote:
> 
> 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Gtk%3A%3ADrawingArea-tf3263742.html#a9081447
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