BsMainEditorWindow.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsEditorWindowBase.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Primary editor window, containing the menu bar, status bar
  8. * and the dock area.
  9. */
  10. class BS_ED_EXPORT MainEditorWindow : public EditorWindowBase
  11. {
  12. public:
  13. ~MainEditorWindow();
  14. /**
  15. * @copydoc EditorWindowBase::update
  16. */
  17. void update() override;
  18. /**
  19. * @copydoc EditorWindowBase::isMain
  20. */
  21. virtual bool isMain() const override { return true; }
  22. /**
  23. * @brief Gets the DockManager that is responsible for docking and placement
  24. * of EditorWidget%s on the main window.
  25. */
  26. DockManager& getDockManager() const { return *mDockManager; }
  27. /**
  28. * @brief Gets the primary menu bar element.
  29. */
  30. GUIMenuBar& getMenuBar() const { return *mMenuBar; }
  31. /**
  32. * @brief Creates a new main editor window. If one is already open this method
  33. * will return the existing one.
  34. *
  35. * @param renderWindow Previously created render window to initialize the main
  36. * editor window in.
  37. *
  38. * @return Instance of the main editor window.
  39. */
  40. static MainEditorWindow* create(const RenderWindowPtr& renderWindow);
  41. protected:
  42. friend class EditorWindowManager;
  43. MainEditorWindow(const RenderWindowPtr& renderWindow);
  44. protected:
  45. GUIMenuBar* mMenuBar;
  46. DockManager* mDockManager;
  47. GUIStatusBar* mStatusBar;
  48. HProfilerOverlay mProfilerOverlay;
  49. /**
  50. * @copydoc EditorWindowBase::resized
  51. */
  52. virtual void resized() override;
  53. /**
  54. * @brief Updates the placement of child GUI elements and their non-client
  55. * areas (used for OS move/resize operations). Should be called after
  56. * window size changes.
  57. */
  58. void updateAreas();
  59. };
  60. }