BsEditorWindowBase.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsEvent.h"
  4. namespace BansheeEngine
  5. {
  6. class EditorWindowBase
  7. {
  8. public:
  9. virtual ~EditorWindowBase();
  10. virtual void setPosition(INT32 x, INT32 y);
  11. virtual void setSize(UINT32 width, UINT32 height);
  12. INT32 getLeft() const;
  13. INT32 getTop() const;
  14. UINT32 getWidth() const;
  15. UINT32 getHeight() const;
  16. virtual void close();
  17. void hide();
  18. /**
  19. * @brief Called once every frame. Internal method.
  20. */
  21. virtual void update() { }
  22. /**
  23. * @brief Returns the render window that this editor window is being rendered to.
  24. */
  25. RenderWindowPtr _getRenderWindow() const { return mRenderWindow; }
  26. protected:
  27. EditorWindowBase();
  28. EditorWindowBase(const RenderWindowPtr& renderWindow);
  29. RenderWindowPtr mRenderWindow;
  30. HSceneObject mSceneObject;
  31. HGUIWidget mGUI;
  32. HCamera mCamera;
  33. GameObjectHandle<WindowFrameWidget> mWindowFrame;
  34. bool mOwnsRenderWindow;
  35. void construct(const RenderWindowPtr& renderWindow);
  36. virtual void initialize();
  37. virtual void resized() { }
  38. private:
  39. HEvent mResizedConn;
  40. };
  41. }