BsMainEditorWindow.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 Gets status bar GUI element.
  33. */
  34. GUIStatusBar& getStatusBar() const { return *mStatusBar; }
  35. /**
  36. * @brief Creates a new main editor window. If one is already open this method
  37. * will return the existing one.
  38. *
  39. * @param renderWindow Previously created render window to initialize the main
  40. * editor window in.
  41. *
  42. * @return Instance of the main editor window.
  43. */
  44. static MainEditorWindow* create(const RenderWindowPtr& renderWindow);
  45. protected:
  46. friend class EditorWindowManager;
  47. MainEditorWindow(const RenderWindowPtr& renderWindow);
  48. protected:
  49. static const UINT32 MENU_BAR_HEIGHT;
  50. static const UINT32 STATUS_BAR_HEIGHT;
  51. GUIMenuBar* mMenuBar;
  52. DockManager* mDockManager;
  53. GUIStatusBar* mStatusBar;
  54. HProfilerOverlay mProfilerOverlay;
  55. /**
  56. * @copydoc EditorWindowBase::resized
  57. */
  58. virtual void resized() override;
  59. /**
  60. * @brief Updates the placement of child GUI elements and their non-client
  61. * areas (used for OS move/resize operations). Should be called after
  62. * window size changes.
  63. */
  64. void updateAreas();
  65. };
  66. }