BsScriptGUIPanel.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include "BsScriptEnginePrerequisites.h"
  3. #include "BsScriptObject.h"
  4. #include "CmRectI.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_SCR_BE_EXPORT ScriptGUIPanel : public ScriptObject<ScriptGUIPanel>
  8. {
  9. public:
  10. static void initMetaData();
  11. GUIWidget& getWidget() const { return *mParentWidget; }
  12. const CM::RectI& getClippedArea() const { return mClippedArea; }
  13. void setParentArea(CM::INT32 x, CM::INT32 y, CM::UINT32 width, CM::UINT32 height);
  14. void setParentWidget(GUIWidget* widget);
  15. void registerArea(ScriptGUIArea* area);
  16. void unregisterArea(ScriptGUIArea* area);
  17. protected:
  18. ScriptGUIPanel();
  19. static void initRuntimeData();
  20. static void internal_createInstance(MonoObject* instance);
  21. static void internal_destroyInstance(ScriptGUIPanel* thisPtr);
  22. static void internal_setArea(ScriptGUIPanel* thisPtr, CM::INT32 x, CM::INT32 y,
  23. CM::UINT32 width, CM::UINT32 height, CM::UINT16 depth);
  24. void updateArea();
  25. GUIWidget* mParentWidget;
  26. CM::Vector<ScriptGUIArea*>::type mAreas;
  27. CM::RectI mParentArea;
  28. CM::RectI mMyArea;
  29. CM::RectI mClippedArea;
  30. };
  31. }