EditorWindowDock.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. DockManager implementation plan:
  2. - DockManager main class
  3. - When empty make sure it has a GUIElement that covers its entire space so it can catch and drop events. Will likely need a special transparent GUIElement?
  4. - Has a reference to one DockContainer, which is initially empty
  5. - DockContainer can have two DockContainer children, or one EditorWidgetContainer child (maybe make a container base class? - optional)
  6. - DockContainer should probably contain a GUIElement which can receieve events
  7. - This would mean extending GUIManager so it can send events to top level elements, and if they don't process them, send them one level lower?
  8. - Resizing a DockContainer resizes all child DockContainers recursively (and EditorWidgetContainers)
  9. - If DockContainer has DockContainer children then it also contains a GUIElement resizer (just an empty space, in the direction of the split)
  10. - Moving the element allows you to resize the two child DockContainers
  11. - When last element is removed from EditorWidgetContainer make sure to notify the parent
  12. - Make main render window frameless
  13. - Implement MainEditorWindow from EditorWindowBase
  14. - Make sure MainEditorWindow holds a DockManager reference and resizes it with the window
  15. DockContainer biggest issues:
  16. - How do I draw the drag and drop overlay??
  17. - How do I detect mouse input yet still let it through to child widget
  18. FIRST CREATE DOCK CONTAINER WITHOUT DRAG AND DROP SUPPORT
  19. RenderTexture issues:
  20. Set up a GUIViewport element which sets up a camera so it renders to that part of the window
  21. Make sure to test everything thoroughly - right now I have tested very little
  22. Drag and drop manager currently ignores the provided icon, but it should use it as a cursor
  23. Prevent docking if available size is less than 20 pixels, otherwise there might be some weirdness
  24. GUIViewport:
  25. - MAJOR TODO - Don't forget to update GUIViewport is to also gets updated when only mesh is dirty!
  26. - Test DX11 and GL
  27. - Clear the viewport before rendering. (Add Viewport.requiresClear)
  28. ------------------------
  29. Other things to remember:
  30. - Possibly add a way to have hidden widgets in the EditorWidgetContainer (like side-bars that pop on mouse over in Visual Studio)
  31. - A way to persist window states
  32. - Also a way to reset all widgets to original locations
  33. ------------------------
  34. Some use cases:
  35. 1. User drags one of the tabs on EditorWindow and then drops it
  36. - If user drags for N pixels the draged tab (and its EditorWidget) is removed from the EditorWindow and added to DragAndDropManager
  37. - If user drops the window onto empty/unsupported element drag and drop manager "dropCallback" is executed and EditorWidget is restored in its own EditorWindow.
  38. - If user drags the window over a title bar, drop positions get highlighted on the title bar
  39. - If the user releases over the title bar, the window is added at the specified drop position
  40. - If the user drags over an EditorWidget content area, semi-transparent drop areas are shown, and current area is highlighted
  41. - Dropping the window in that area will split the available space between existng and new window contents
  42. 2. User organizes his windows and the quits and restarts the program
  43. - TODO