BsMainEditorWindow.h 2.0 KB

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