Re: Gtk::Window and GtkWindow
- From: Ian Martin <martin_id vodafone co nz>
- To: Russel Winder <russel winder org uk>
- Cc: Gtkmm List <gtkmm-list gnome org>
- Subject: Re: Gtk::Window and GtkWindow
- Date: Sun, 6 Mar 2016 21:04:03 +1300
Hi Russel,
Sorry, wasn't supposed to be off-list; we've all had to hunt down the
answer to questions answered off list before, and knowing someone else
has asked it doesn't help anyone looking later.
In the docs every class has a wrap() method associated with it. I agree
the general idea is not well documented, but then there shouldn't be the
need to use them; if you're having to use wrap() then there's something
missing in gtkmm, and it's probably better to fix that than plan to use
C routinely.
The other piece of relevant information is that some objects are owned
by another - Gtk::Adjustment is a good example; these are only provided
via a RefPtr, rather than a raw pointer. Also, before you update the
docs, from a recent thread on the mailing list it's possible all
pointers may be deprecated soon in favour of some form of smart
pointer. That'd be a significant improvement from a C++ perspective,
but I believe the mechanics of it are still being ironed out.
Ian.
On 06/03/16 20:48, Russel Winder wrote:
Ian,
Thanks for the ofllist follow up confirmation. Sebastian also suggested
the same, via Glib::Object::wrap.
I have to admit, I was baffled by the gtkmm documentation on this
point. I guess I should get stuck in a rewrite that bit of the
documentation and create a pull request.
On Sun, 2016-03-06 at 20:21 +1300, Ian Martin wrote:
On 06/03/16 18:23, Russel Winder wrote:
On Sun, 2016-03-06 at 07:45 +1300, Ian Martin wrote:
Hi,
Gtk::Window::wrap()
<https://developer.gnome.org/gtkmm/stable/classGtk_1_1Window.html
#ae4
50767a1f7f277ee50a0acb197f3e08>returns
a pointer to the Window you are wrapping. Every widget in gtkmm
has
a
wrap() method- and a gobj() method if you need to get the C
object
back;
some of them return a Glib::RefPtr rather than a raw pointer.
Gtk::Window::wrap doesn't exist, at least compilers tell me this :-
),
did you mean use Glib::wrap?
Yes.
--
Russel.============================================================
=================Dr Russel Winder t: +44 20 7585 2200 voip:
sip:russel winder ekiga net41 Buckmaster Road m: +44 7770 465
077 xmpp: russel winder org ukLondon SW11 1EN, UK w:
www.russel.org.uk skype: russel_winder
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]