BsScriptGUIPanel.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. protected:
  20. ScriptGUIPanel(MonoObject* instance);
  21. static void internal_createInstance(MonoObject* instance);
  22. static void internal_setArea(ScriptGUIPanel* thisPtr, INT32 x, INT32 y,
  23. UINT32 width, UINT32 height, UINT16 depth);
  24. void updateArea();
  25. GUIWidget* mParentWidget;
  26. Vector<ScriptGUIArea*> mAreas;
  27. Rect2I mParentArea;
  28. Rect2I mMyArea;
  29. Rect2I mClippedArea;
  30. };
  31. }