Re: [gtk-list] Using C++ with Gtk
- From: Tero Pulkkinen <terop students cc tut fi>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Using C++ with Gtk
- Date: 16 Oct 1998 22:51:19 +0300
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]