I have a number of panes docked together in one or more docking pane containers. I need to "remove" some of the panes temporarily and restore them back later.
I am finding this a hard task to accomplish. I don't want save the layout and reload it since all the docking panes empty (and the background is drawn) and then come back. This is overkill. So what I found I can do is get all the panes that are displayed, and save their IDs in a stl vector using push_back. Then I save the IDs of the panes I don't close in another vector. Later to restore with a minimum of display issues I close those in the vector of panes I did not originally close. Then I call ShowPane on the vector I populated with all the panes that were originally displayed.
This works great and the order of the panes is the original order before all this happend.
However, if I reorder the display of the panes by mousing down over a "tab" and moving a pane, I am finding that when I call GetPaneList on the pane manager and then enumerate (GetHeadPosition, GetNext) the panes, the order the manager gives out the panes is NOT the order they are displayed in.
I don't see a way to determine an "order" by getting the layout or by using the tabbed container (I don't see any methods that would give me this info).
So ...
How can I get the panes in the order they are displayed in a tabbed container?
or even better, what do I need to do in order to close a pane and then open it so that it comes back exactly where it was before I closed it? Note I don't have to necessary "close" the pane. I just want it undisplayed so the user cannot interact with the contents (before moving to codejock we used a property sheet and simply disabled the tabs for the items we wanted to temporarily prevent the user from accessing).
|