The "normal" UrContainer should have just layout behaviors same as the
Drag n' Drop ones without allowing Drag n' Drop.  Perhaps we should make
DnD an attribute instead of a separate type of container.  A note on
HORIZANTAL_ARRAY, VERTICAL_ARRAY containers.  Perhaps these should be VBOX
and HBOX to correspond to Gtk+ containers of which they take the same
behaviors from.  Arrays should be introduced during the scripting phase.
I will look at the code this weekend and comment more.  Any luck with
CVS?  Worse comes to worse we can always start a sourceforge project and
then send patches to the core team.  Give me a month and I will be able to
start contributing code. I hate not having the T3 connection I had at
school.  What happened to the other guys?  The world will never know.
Hehe.

-J5

Andre Kloss wrote:

> Hi again.
>
> I'm running out of time as well as motivation and, worst of all,
> ideas. Ok, let's see, what we have now:
>
> I need some Callback that a dragged UrShape can perform in order to
> interact somehow with the UrContainer. The source for the UrShape
> side of this functionality should read like this:
>
> if (IS_IN(myself, container->bounding_box) && !isOver) {
>   isOver = TRUE; /* Perform this once */
>   container->behaviour->isOver(container, myself); /* interact */
> }
>
> Same goes for isOut and isDropped. I'm not sure yet if the select
> callback belongs to the container or the UrShape, but well, here we
> are - for now.
>
> I still have no clue about the "normal" UrContainer Behaviour. If
> someone could enlighten this to me, I would be able to think further
> in that direction.
>
> cu Andre
>
> 8<-----------------------------UrShape.h--------------------->8
>
> /* urshape.h : defining the generic UrShape */
> #ifndef URSHAPE_H
> #define URSHAPE_H
>
> #include "element.h"
> /* What else has to be included? */
>
> typedef enum _UrContainerType UrContainerType;
> typedef struct _UrContainerBehaviour UrContainerBehaviour;
> typedef struct _UrContainer UrContainer;
> typedef struct _UrShape UrShape;
>
> enum _UrContainerType {
>   SINGLE,
>   HORIZANTAL_ARRAY,
>   VERTICAL_ARRAY,
>   TABLE
> };
>
> struct _UrContainerBehaviour {
>   void (isOver)(UrContainer *myself, UrShape *other);
>   void (isOut)(UrContainer *myself, UrShape *other);
>   void (isDropped)(UrContainer *myself, UrShape *other);
>   void (select)(UrContainer *myself);
> /* YOUR PROPOSAL GOES HERE */
> }
>
> struct _UrContainer {
>   UrContainerType type; /* Is it a Simple-/Array- or
>                            Table-Container? */
>   UrContainerBehaviour behaviour; /* To discriminate behaviour */
>
>   /* (Dynamic) geometry stuff */
>   Rectangle *bounding_box;
>   GList *rows;          /* The left border of rows */
>   GList *columns;       /* The upper border of columns */
> }
>
> struct _UrShape {
>   Element element;      /* Inheritance (C sometimes sucks ;) */
>
>   /* UrShape container stuff */
>   UrContainer *embedding; /* NULL if free,
>                              "parent's" container else */
>   int row,column; /* For all but SINGLE, it'll be nice to know in what
>                      row/column the UrShape is embedded. */
>   GList *childrenContainers; /* The containers I have */
>
>   /* The miniDOM. Thanx to Cyrille, now it _is_ mini. */
>   UrShape *parent_shape;
>   GList *self; /* this->self->data == this */
>   GList *children; /* (this->children->data->parent_shape == this ||
>                        this->children == NULL) */
> };
>
> #endif
>
> _______________________________________________
> Dia-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/dia-list


_______________________________________________
Dia-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/dia-list

Reply via email to