BsMainEditorWindow.h 2.2 KB

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