BsEditorWindowBase.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include <boost/signals/connection.hpp>
  4. namespace BansheeEditor
  5. {
  6. class EditorWindowBase
  7. {
  8. public:
  9. virtual ~EditorWindowBase();
  10. virtual void setPosition(CM::INT32 x, CM::INT32 y);
  11. virtual void setSize(CM::UINT32 width, CM::UINT32 height);
  12. CM::INT32 getLeft() const;
  13. CM::INT32 getTop() const;
  14. CM::UINT32 getWidth() const;
  15. CM::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 CM::RenderWindowPtr& renderWindow);
  25. CM::RenderWindowPtr mRenderWindow;
  26. CM::HSceneObject mSceneObject;
  27. BS::HGUIWidget mGUI;
  28. BS::HCamera mCamera;
  29. CM::GameObjectHandle<WindowFrameWidget> mWindowFrame;
  30. bool mOwnsRenderWindow;
  31. void construct(const CM::RenderWindowPtr& renderWindow);
  32. virtual void initialize();
  33. virtual void resized() { }
  34. private:
  35. boost::signals::connection mResizedConn;
  36. };
  37. }