BsScriptGUIPanel.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "BsScriptEnginePrerequisites.h"
  3. #include "BsScriptObject.h"
  4. #include "BsRectI.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 RectI& 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. protected:
  19. ScriptGUIPanel(MonoObject* instance);
  20. static void internal_createInstance(MonoObject* instance);
  21. static void internal_setArea(ScriptGUIPanel* thisPtr, INT32 x, INT32 y,
  22. UINT32 width, UINT32 height, UINT16 depth);
  23. void updateArea();
  24. GUIWidget* mParentWidget;
  25. Vector<ScriptGUIArea*> mAreas;
  26. RectI mParentArea;
  27. RectI mMyArea;
  28. RectI mClippedArea;
  29. };
  30. }