BsEditorWindowBase.h 972 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. protected:
  23. EditorWindowBase();
  24. EditorWindowBase(const RenderWindowPtr& renderWindow);
  25. RenderWindowPtr mRenderWindow;
  26. HSceneObject mSceneObject;
  27. HGUIWidget mGUI;
  28. HCamera mCamera;
  29. GameObjectHandle<WindowFrameWidget> mWindowFrame;
  30. bool mOwnsRenderWindow;
  31. void construct(const RenderWindowPtr& renderWindow);
  32. virtual void initialize();
  33. virtual void resized() { }
  34. private:
  35. HEvent mResizedConn;
  36. };
  37. }