2
0

BsScriptGUIPanel.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include "BsScriptEnginePrerequisites.h"
  3. #include "BsScriptObject.h"
  4. #include "BsRect2I.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_SCR_BE_EXPORT ScriptGUIPanel : public ScriptObject<ScriptGUIPanel>
  8. {
  9. public:
  10. SCRIPT_OBJ(BansheeEngineAssemblyName, "BansheeEngine", "GUIPanel")
  11. GUIWidget& getWidget() const { return *mParentWidget; }
  12. const Rect2I& getClippedArea() const { return mClippedArea; }
  13. void setParentArea(INT32 x, INT32 y, UINT32 width, UINT32 height);
  14. void setParentWidget(GUIWidget* widget);
  15. void registerArea(ScriptGUIArea* area);
  16. void unregisterArea(ScriptGUIArea* area);
  17. const Vector<ScriptGUIArea*>& getAreas() const { return mAreas; }
  18. Rect2I getArea() const { return mMyArea; }
  19. void destroy();
  20. protected:
  21. ScriptGUIPanel(MonoObject* instance);
  22. static void internal_createInstance(MonoObject* instance);
  23. static void internal_setArea(ScriptGUIPanel* thisPtr, INT32 x, INT32 y,
  24. UINT32 width, UINT32 height);
  25. void updateArea();
  26. GUIWidget* mParentWidget;
  27. Vector<ScriptGUIArea*> mAreas;
  28. Rect2I mParentArea;
  29. Rect2I mMyArea;
  30. Rect2I mClippedArea;
  31. static MonoMethod* mDestroyMethod;
  32. };
  33. }