Re: UrShape definition Part I




Andre Kloss wrote:

Hi, there.

Since I don't see anyone providing a basic UrShape definition, I'll
try to write one myself. It is far from complete, but I need to
advance with this project, since my profesor will stop me from using
dia if I don't have a "working draft" of a UrShape by Friday.

typedef struct UrShape {
  ObjectOps my_ops; /* As seen in custom_object.c */
  ObjectType my_type; /* dito */
  ObjectTypeOps my_type_ops; /* nuff said */
  /* ... and the other stuff from custom_objects ... */

Could someone give a brief overview of what the ObjectOps and ObjectType
stuff do?  Is this still used or is it depricated in the StdProps code?


  int max_children;
  UrShapePtr parent, child, pre_sibling, next_sibling;
  /* This should do for the mini-dom */
} UrShape, *UrShapePtr;


We don't need a max_children do we? unsigned int child_count; perhaps.

Also some way to store an arbitrary structure (i.e. Gtk Widgets - This
is where I wish we were using an OO language).   And how are we going to
handle attributes?  Should we use a hash or hard code them in a
structure?


Or something like this. This will not compile, but I just want to
formalize the basis. Someone willing to improve this?

cu Andre
--
Tolerance rulez, everything else sux! -- Andre Kloss

_______________________________________________
Dia-list mailing list
Dia-list gnome org
http://mail.gnome.org/mailman/listinfo/dia-list

This is a good start.  Is there any other code that you guys are working
on that you just havn't shared yet?  I think we need to see more
progress.

-J5





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