[Gtk-sharp-list] GDL - Docking documentation
john.luke at gmail.com
Wed Sep 28 12:30:42 EDT 2005
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
> 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
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.
More information about the Gtk-sharp-list