How to declare widgets (lower case w)



All:

I was wondering, how do people on the list declare widgets (lower case w)?  For
example, say you have a CList.  You could do

GtkClist *LocalClist

or you could to

GtkWidget *LocalClist

I have seen some programs that declare everything as the "correct" type, and
some programs that declare everything as GtkWidget.  Either way, you will have
to do some casting back and forth.  The only advantages I can think of about
doing everything as GtkWidget are:

* There are probably more functions dealing with widget arguments than any
other, thus less casting overall.

* Easier to remember that everything is a GtkWidget, rather than this type,
that type, etc, thus you are more apt to treat all widgets consistently.

Any comments?  Thanks.

Neil Hodge


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/



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