ScrollBar.pkg 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. $#include "ScrollBar.h"
  2. class ScrollBar : public UIElement
  3. {
  4. public:
  5. // Methods:
  6. ScrollBar(Context* context);
  7. virtual ~ScrollBar();
  8. void SetOrientation(Orientation orientation);
  9. void SetRange(float range);
  10. void SetValue(float value);
  11. void ChangeValue(float delta);
  12. void SetScrollStep(float step);
  13. void SetStepFactor(float factor);
  14. void StepBack();
  15. void StepForward();
  16. Orientation GetOrientation() const;
  17. float GetRange() const;
  18. float GetValue() const;
  19. float GetScrollStep() const;
  20. float GetStepFactor() const;
  21. float GetEffectiveScrollStep() const;
  22. Button* GetBackButton() const;
  23. Button* GetForwardButton() const;
  24. Slider* GetSlider() const;
  25. // Properties:
  26. tolua_property__get_set Orientation orientation;
  27. tolua_property__get_set float range;
  28. tolua_property__get_set float value;
  29. tolua_property__get_set float scrollStep;
  30. tolua_property__get_set float stepFactor;
  31. tolua_readonly tolua_property__get_set float effectiveScrollStep;
  32. tolua_readonly tolua_property__get_set Button* backButton;
  33. tolua_readonly tolua_property__get_set Button* forwardButton;
  34. tolua_readonly tolua_property__get_set Slider* slider;
  35. };