Re: [gtkmm] Gdk::GC doesn't work as described
- From: murrayc t-online de (Murray Cumming)
- To: Juan Linietsky <coding reduz com ar>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Gdk::GC doesn't work as described
- Date: 06 Dec 2002 10:44:59 +0100
On Fri, 2002-12-06 at 04:30, Juan Linietsky wrote:
> Glib::RefPtr<Gdk::GC> MyGC;
> MyGC = Gdk::GC::create(drawingarea);
>
> It used to be
> Gdk_GC MyGC;
> MyGC.create(drawingarea);
>
> Beats me why it needs to be that more complicated, I am probably doing something wrong anyway.
The new way is far simpler and more consistent. You'll get used to it.
You can of course simplify your first line to:
Glib::RefPtr<Gdk::GC> refGC = Gdk::GC::create(drawingarea);
In particular, you should never need to worry about reference counting
in gtkmm2, just pass those RefPtrs around and let the RefPtr worry about
the details.
--
Murray Cumming
murray usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]