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



 
> 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).
> 
> I'm not describing this very well, but if you've read the book you'll know
> what I mean.  So is anyone doing something similar with C++ and Gtk, and do
> they have any pointers?  Again, I'm aware of Gtk--, but that's not what I'm
> asking about
> 
> Steve Molitor
> smolitor@insight-tech.com

I've seen that other people have already replied about this, but just
wanted to let you know that Young's ideas from the book were used to
create SGI's ViewKit library (I'm pretty certain Young wrote it for SGI
while working for them)- it's very similar to the book, but I think it
includes a few improvements.  If you have access to an SGI machine,
you might want to check it out for some ideas.  I used ViewKit while
in graduate school and found it very nice - a good tradeoff between
low-level control (which you could do if you wanted to by directly
manipulating the Motif widgets) and a higher level, VERY reusable
interface.

At one point, I started a ViewKit-like library on top of gtk+, but
unfortunately, I didn't (and still don't) have time to do much with
it.  It has the following classes:

GkApp (application class)
GkComponent (the base component class)
GkWindow (generic window)
GkWindowMenu (generic window w/ menu support)
GkMesaGL (encapsulation of a Mesa rendering window w/ support for the
various callbacks)

and one or two others.

If you'd like to see it, I'll be happy to make it available, but I did
so little work that you might as well just start over exactly how you
want it to be.

Dave
dreed@capital.edu



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