Re: [gtkmm] Whats up with refptr?



On Fri, 2002-12-06 at 01:14, Juan Linietsky wrote:
> 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);
> 

No, that can not work because there is no public Gdk::GC constructor.
Use the create() method, as with all such types.

-- 
Murray Cumming
murray usa net
www.murrayc.com




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