Re: [gtk-list] Using C++ with Gtk



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 --



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