| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- //********************************** 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
- {
- /**
- * @brief Manages that handles creation, destruction and updates of editor windows.
- *
- * @note Internal class.
- */
- class BS_ED_EXPORT EditorWindowManager : public Module<EditorWindowManager>
- {
- public:
- EditorWindowManager();
- ~EditorWindowManager();
- /**
- * @brief 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);
- /**
- * @brief Creates a new editor window. There is no limit on the number of editor windows.
- */
- EditorWindow* create();
- /**
- * @brief Notifies the manager that a new editor window was created.
- */
- void registerWindow(EditorWindowBase* window);
- /**
- * @brief Schedules the window for destruction. Actual destruction will happen on next update.
- */
- void destroy(EditorWindowBase* window);
- /**
- * @brief Returns the main editor window, or null if one doesn't exist.
- */
- MainEditorWindow* getMainWindow() const { return mMainWindow; }
- /**
- * @brief Update to be called once per frame. Calls update on all active editor windows.
- */
- void update();
- /**
- * @brief Checks if any editor window has keyboard focus.
- */
- bool hasFocus() const;
- protected:
- MainEditorWindow* mMainWindow;
- Vector<EditorWindowBase*> mEditorWindows;
- Vector<EditorWindowBase*> mScheduledForDestruction;
- Vector<EditorWindowBase*> mEditorWindowsSnapshot;
- };
- }
|