ScrollView.pkg 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 bool horizontalScrollBarVisible;
  36. tolua_property__get_set bool verticalScrollBarVisible;
  37. tolua_property__get_set float scrollStep;
  38. tolua_property__get_set float pageStep;
  39. tolua_property__get_set float scrollDeceleration;
  40. tolua_property__get_set float scrollSnapEpsilon;
  41. };
  42. ${
  43. #define TOLUA_DISABLE_tolua_UILuaAPI_ScrollView_new00
  44. static int tolua_UILuaAPI_ScrollView_new00(lua_State* tolua_S)
  45. {
  46. return ToluaNewObject<ScrollView>(tolua_S);
  47. }
  48. #define TOLUA_DISABLE_tolua_UILuaAPI_ScrollView_new00_local
  49. static int tolua_UILuaAPI_ScrollView_new00_local(lua_State* tolua_S)
  50. {
  51. return ToluaNewObjectGC<ScrollView>(tolua_S);
  52. }
  53. $}