Hello, I am trying to implement something I call Sizer. A Sizer can be attached to my subclass of ClutterGroup which I call SizedGroup. It has a method "update" in which size and position of the children of the SizedGroup is updated. I am overriding the "add" virtual function to call sizer.update() when a child is added to my SizedGroup.
My problem is: How can I know that the SizedGroup changed its size, so I can call update() on the Sizer? I already tried to override the "allocate" virtual function and call sizer.update() there, but this doesn't seem the right place to reposition the children, as it causes allocate to be executed an infinite number of times (due to a relayout I suppose). Overriding set_size/set_sizeu etc. in my SizedGroup is not an option as well, as the SizedGroup is inside an actor which calls allocate (and not set_size) on it (and I think this would be an ugly solution anyway). I am not calling allocate on the children in my SizedGroup because I would like to be able to switch the sizer of a SizedGroup dynamically using an animation (there could be a grid sizer, random sizer etc.), and I am not sure if that can be done using allocate. Hope you can help me. Thomas -- To unsubscribe send a mail to [email protected]
