| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsEditorPrerequisites.h"
- #include "BsModule.h"
- #include "BsEvent.h"
- namespace BansheeEngine
- {
- /** @cond INTERNAL */
- /** @addtogroup EditorWindow
- * @{
- */
- /** Manages that handles creation, destruction and updates of editor windows. */
- class BS_ED_EXPORT EditorWindowManager : public Module<EditorWindowManager>
- {
- public:
- EditorWindowManager();
- ~EditorWindowManager();
- /**
- * Creates the main editor window using a previously created render window. If a main window already exists, this
- * will return the existing instance.
- */
- MainEditorWindow* createMain(const RenderWindowPtr& parentRenderWindow);
- /** Creates a new editor window. There is no limit on the number of editor windows. */
- EditorWindow* create();
- /** Notifies the manager that a new editor window was created. */
- void registerWindow(EditorWindowBase* window);
- /** Schedules the window for destruction. Actual destruction will happen on next update. */
- void destroy(EditorWindowBase* window);
- /** Returns the main editor window, or null if one doesn't exist. */
- MainEditorWindow* getMainWindow() const { return mMainWindow; }
- /** Update to be called once per frame. Calls update on all active editor windows. */
- void update();
- /** Checks if any editor window has keyboard focus. */
- bool hasFocus() const;
- protected:
- MainEditorWindow* mMainWindow;
- Vector<EditorWindowBase*> mEditorWindows;
- Vector<EditorWindowBase*> mScheduledForDestruction;
- Vector<EditorWindowBase*> mEditorWindowsSnapshot;
- };
- /** @} */
- /** @endcond */
- }
|