Jump to content

  • Log In with Google      Sign In   
  • Create Account


Window Docking System


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Amr0   Members   -  Reputation: 1070

Like
0Likes
Like

Posted 16 June 2012 - 03:44 PM

Hello there fellow GameDev citizens. How are you doing this fine evening? How's it going with your work on your awesome engines and demos and games?

I'm STUCK! I've been working on a docking system for use with Win32 applications, very much inspired by that used in Visual Studio. Such a system should be very useful for editor-type applications which is exactly what I'm going to be using it for. I've made good progress - have a look at this video here if you will:



I'm quite comfortable working with the Win32 GUI API, so I'm not really stuck on something technical, but rather on the design of the thing. Currently a tree structure keeps track of the windows' layout. What I'm stuck on is implementing the behavior of restoring a window to its previous position after it has been hidden or otherwise removed from the layout tree. This is the same issue of implementing the behavior of restoring the layout from file at startup or applying a certain layout in certain application operation modes and then restoring a previous layout.

For example, at 0:29 in the video, we have a floating "pane" which has two windows docked inside it. Once one of these windows is undocked, the pane is left with just one window docked inside it, making it a redundant pane, so the remaining window is undocked and the empty pane is removed. In VS, if the user hides one of these two windows, and then shows it again through the View window, the window is put back where it was and a pane is created again. So I guess my question is what would be the best way to represent the placement of a window, and how to use that representation when removing and restoring windows into the layout tree? Or maybe I'm thinking about this whole thing in the wrong way. Any thoughts are welcome.

If anybody has any experience with such a system in a different language or environment, I'd appreciate it if they would shed some light on how it's done there.

Sponsor:

#2 WiredCat   Members   -  Reputation: 223

Like
0Likes
Like

Posted 17 June 2012 - 08:43 AM

make an fixed size array(or dynamic whatever) then store each tree settings in its element i think the y sue simple visible =false routine ;]

Edited by ___, 17 June 2012 - 08:46 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS