Hello,
Darryl Pentz wrote:
Hi John, Jeroen, (and the list :)
I've been poking around in the GDL code a fair bit and I must say I still
find it quite a challenge getting to grips with all the relationships and
keeping tabs on all the behaviour (events etc) during a
dock/undock/iconify/uniconify activity. To this simple mind it is quite
complex.
One test case I'm trying to get working right now is to have a Dock and a
DockBar in an HBox; the Dock in on one side and the DockBar on the other.
When the DockItem (which contains a TextView) that I add to the Dock is
iconified, obviously the item is then represented as a button in the
DockBar. When I click on that button to 'uniconify' it, I want it to
reappear in that initial Dock. However, I can't seem to get my mind around
how this is done, as I can see that the DockItem, once iconified, now has
the DockPlacement.Floating attribute, and not the DockPlacement.Center
attribute I initially gave it. And when I 'uniconify' it, it is then
rendered in a new Dock item which is floating.
I know it has to do with the fact that a DockPlaceholder is created and
attached to the DockItem when it is iconified. What I am unclear on is the
correct (or intended) behaviour of this placeholder, given that you mention
in the README that the placeholder code hasn't been done yet. So is it
currently broken, or is it incomplete? As I step through the GDL code as it
runs, I don't know whether what I am observing is correct or broken. Also,
why is the placeholder a DockObject, rather than simply a record of 'where
was this dock item before it was iconified/closed'?
Yes this is what is broken/not implemented, it ends up Floating if it
can't place it back right.
Can anybody elaborate a bit on how DockPlaceholder is meant to work?
It's been a while, but I seem to remember:
- item is iconified or hidden
- a placeholder is created and added to the parent that stores the location
- when it is deiconified or shown it goes through the process of placing
it back to the right spot, I don't remember exactly and it is
probably more
complicated than necessary.
It is not likely to make sense without reading the c code at the same
time as looking at the C# version.
_______________________________________________
Gtk-sharp-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list