ScrollView.pkg 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. $#include "UI/ScrollView.h"
  2. class ScrollView : public UIElement
  3. {
  4. ScrollView();
  5. virtual ~ScrollView();
  6. void SetContentElement(UIElement* element);
  7. void SetViewPosition(const IntVector2& position);
  8. void SetViewPosition(int x, int y);
  9. void SetScrollBarsVisible(bool horizontal, bool vertical);
  10. void SetScrollBarsAutoVisible(bool enable);
  11. void SetScrollStep(float step);
  12. void SetPageStep(float step);
  13. void SetScrollDeceleration(float deceleration);
  14. void SetScrollSnapEpsilon(float snap);
  15. void SetAutoDisableChildren(bool disable);
  16. void SetAutoDisableThreshold(float amount);
  17. const IntVector2& GetViewPosition() const;
  18. UIElement* GetContentElement() const;
  19. ScrollBar* GetHorizontalScrollBar() const;
  20. ScrollBar* GetVerticalScrollBar() const;
  21. BorderImage* GetScrollPanel() const;
  22. bool GetScrollBarsAutoVisible() const;
  23. float GetScrollStep() const;
  24. float GetPageStep() const;
  25. float GetScrollDeceleration() const;
  26. float GetScrollSnapEpsilon() const;
  27. bool GetAutoDisableChildren() const;
  28. float GetAutoDisableThreshold() const;
  29. tolua_property__get_set IntVector2& viewPosition;
  30. tolua_property__get_set UIElement* contentElement;
  31. tolua_readonly tolua_property__get_set ScrollBar* horizontalScrollBar;
  32. tolua_readonly tolua_property__get_set ScrollBar* verticalScrollBar;
  33. tolua_readonly tolua_property__get_set BorderImage* scrollPanel;
  34. tolua_property__get_set bool scrollBarsAutoVisible;
  35. tolua_property__get_set float scrollStep;
  36. tolua_property__get_set float pageStep;
  37. tolua_property__get_set float scrollDeceleration;
  38. tolua_property__get_set float scrollSnapEpsilon;
  39. };
  40. ${
  41. #define TOLUA_DISABLE_tolua_UILuaAPI_ScrollView_new00
  42. static int tolua_UILuaAPI_ScrollView_new00(lua_State* tolua_S)
  43. {
  44. return ToluaNewObject<ScrollView>(tolua_S);
  45. }
  46. #define TOLUA_DISABLE_tolua_UILuaAPI_ScrollView_new00_local
  47. static int tolua_UILuaAPI_ScrollView_new00_local(lua_State* tolua_S)
  48. {
  49. return ToluaNewObjectGC<ScrollView>(tolua_S);
  50. }
  51. $}