[9359] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: Using C++ with Gtk
daemon@ATHENA.MIT.EDU (Tero Pulkkinen)
Fri Oct 16 15:52:34 1998
To: gtk-list@redhat.com
From: Tero Pulkkinen <terop@students.cc.tut.fi>
Date: 16 Oct 1998 22:51:19 +0300
In-Reply-To: smolitor@insight-tech.com's message of "Fri, 16 Oct 1998 14:35:01 -0500"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
smolitor@insight-tech.com (Stephen Molitor) writes:
> Is anyone out there coding in Gtk (not Gtk--), using C++? I'm thinking of
> the approach described in the book "Object Oriented Programming with C++ and
> Motif," by Young. Instead of creating a complete C++ wrapper around Motif,
> Young describes how to create C++ components that encapsulate large chunks
> of Motif C code and widgets. For example, one could create a tic-tac-toe
> board component (C++ class) that would encapsulate a bunch of Motif widgets
> (usually as a single-rooted widget tree).
The only real problem with using C++ with gtk+ is using callbacks.
The problem comes from C++ nonstatic member function cannot be passed
to gtk+'s functions as callbacks. Support for callbacks properly and
support for C++ style inheritance is the main things why gtk-- is
useful.
--
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null