C++ Wrappers



Here's a problem that I'm sure has been solved elegantly by someone.  
I've been porting some software (more like re-writing it) from Qt to GTK, 
and in the process I've played around with some basic C++ wrappers.  
Since GTK uses inhertance, I thought that the wrapper classes could be 
inherited also.  So the problem is how to initalize somthing like this.  
I can't make constructors virtual.  The first solution I thought of was 
to create a _GTKObject which is the object which is the base object which 
gets inherited by derived classes.  _GTKObject has a blank constructor, 
and the functional GTKObject would be created by inheriting _GTKObject 
and adding the proper constructer, which would contain the gtk_new_object 
call or whatever.

Also, I haven't noticed any Postscript printing ability with GTK.  Have I 
just missed it?

-------------------------------------------
Jay Painter -- jay@ssc.com -- jay@a42.com
Systema Admin., SSC/Linux Journal
http://www.a42.com/~jay



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