Re: Conceptual Question on Signal Handling in Subclasses



Ian Flanigan <flan lean to> writes:
Havoc Pennington writes:
 > 
 > I would suggest using virtual functions. You can do this in several
 > ways:
 >   - just use that C++ feature and build with a C++ compiler
 >   - just have a variable in your struct:
 >        void (* do_whatever) (blah blah);
 >   - use the GtkObject system and derive GtkObjects

Since I'm not using C++, the first option is out.  The second option
is one of the ways I thought of.  But I'm not sure what you mean by
the third option -- I thought that's what I was doing already.  Can
you explain in more detail?


Write a custom object derived from GtkObject using the GTK object/type
system. See for example the source code for any widget in GTK.

It involves knowing a lot about the GTK object/type system, so you may
not want to go there.

Havoc




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