| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #pragma once
- #include "BsEditorPrerequisites.h"
- #include "BsEvent.h"
- namespace BansheeEngine
- {
- class EditorWindowBase
- {
- public:
- virtual ~EditorWindowBase();
- virtual void setPosition(INT32 x, INT32 y);
- virtual void setSize(UINT32 width, UINT32 height);
- INT32 getLeft() const;
- INT32 getTop() const;
- UINT32 getWidth() const;
- UINT32 getHeight() const;
- virtual void close();
- void hide();
- /**
- * @brief Return true if this is the main editor window.
- */
- virtual bool isMain() const { return false; }
- /**
- * @brief Called once every frame. Internal method.
- */
- virtual void update() { }
- /**
- * @brief Returns the render window that this editor window is being rendered to.
- */
- RenderWindowPtr getRenderWindow() const { return mRenderWindow; }
- protected:
- EditorWindowBase();
- EditorWindowBase(const RenderWindowPtr& renderWindow);
- RenderWindowPtr mRenderWindow;
- HSceneObject mSceneObject;
- HGUIWidget mGUI;
- HCamera mCamera;
- GameObjectHandle<WindowFrameWidget> mWindowFrame;
- bool mOwnsRenderWindow;
- void construct(const RenderWindowPtr& renderWindow);
- virtual void initialize();
- virtual void resized() { }
- private:
- HEvent mResizedConn;
- };
- }
|