[gtkmm] Whats up with refptr?



Hello! I am trying to use Window::draw_rectangle, where the first parameter used to be a Gdk::GC in gtk-- 1.2, it is now a 
RefPtr<Gdk:GC>. I was expecting this to work the same way it did in 1.2, but instead it only works if I pass the GC this way:

Gdk::GC MyGC;
[..]
get_window()->draw_rectangle(Glib::RefPtr<Gdk::GC>(&MyGC),false,0,0,20,20);

Why does this happen?

Thanks in advance!

Juan Linietsky





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]