On Sun, 3 Sep 2000, David Stuart wrote:

> Hi All,
> 
> I know this is a theoretical question at best, but I'm new to dia's
> source code so bear with me.. I see lots of things like this:
> 
> /* This is a subclass of Object used to help implementing objects
>  * that form a polygon-like shape of line-segments.
>  */
> struct _BezierShape {
>   /* Object must be first because this is a 'subclass' of it. */
>   Object object;
> 
>   int numpoints; /* >= 2 */
>   BezPoint *points;
>   BezCornerType *corner_types;
> };
> 
> 
> And of course, the declaration of "object.h" in "lib".. which is basically
> just pointers to functions (+ some other stuff)..
> 
> So, since we're already doing a kind of 'inheritance', and we are using
> 'interfaces' (like in object.h), I can't help wondering why the project
> wasn't done using an OO language (like say, C++)..

C is an OO language (that is, if you define OO language as a language you
can do OO programming in).  In future, most of these objects in dia will
probably be moved over to the GObject system found in glib-1.3, as it
provides a lot of the base features we use for the objects in dia.

> 
> Don't get me wrong, I'm not advocating that we change (and I don't want
> to get into a debate about the merits of one language over another),
> I'm just wondering why.. :) (was g++ not 'up to snuff' yet?)
> 
> My 2nd question, where can I find docs on the gtk and gnome APIs that
> dia uses? (hope I don't have to grok all that source code to figure them
> out myself..)

Check out developer.gnome.org.  You can find all the gtk and gnome API
documentation and the online version of Havoc's book GTK+/GNOME
Application Development.

> 
> Dave
> 

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



Reply via email to