[AdgAlignment] Implemented relevant alignment logic
commit2be1d0efcebd1a8e4740f1210727731b9d64658b
authorNicola Fontana <ntd@entidi.it>
Thu, 12 Nov 2009 21:38:55 +0000 (12 22:38 +0100)
committerNicola Fontana <ntd@entidi.it>
Thu, 12 Nov 2009 21:38:55 +0000 (12 22:38 +0100)
tree2dd04dc3051ebe71aad5c8976eef2dd44a6b5136
parent3e2ab38f03ba4e244351fc616063ac072c7b65d1
[AdgAlignment] Implemented relevant alignment logic

Now the AdgAlignment container is working. The translation trick is
implemented in the "global-changed" signal handler: whenever a global
changed signal is caught, the default handler checks if the extents
are defined and applies a translation proportional to the provided
factors. The global matrix is changed BEFORE propagating the
global-changed signal to the childres, so they adjust their global
matrices accoringly. To update the position, a "global-matrix" signal is
emitted programmatically by the arrange() method after the extents
computation.

The main problem is the global matrix should be restored after the
alignment translation without reemitting the "global-changed" signal,
otherwise the children entities turn back to their usual position. To be
able to do that I had to access the private AdgEntity members directly
by including adg-entity-private.h.
adg/adg-alignment.c