Re: Gtk::Window and GtkWindow

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.


On 06/03/16 20:48, Russel Winder wrote:

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:
a pointer to the Window you are wrapping.  Every widget in gtkmm
wrap() method- and a gobj() method if you need to get the C
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?

=================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:  skype: russel_winder

gtkmm-list mailing list
gtkmm-list gnome org

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