ScrollView.pkg 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. $#include "ScrollView.h"
  2. /// Scrollable %UI element for showing a (possibly large) child element.
  3. class ScrollView : public UIElement
  4. {
  5. public:
  6. /// Set content element.
  7. void SetContentElement(UIElement* element);
  8. /// Set view offset from the top-left corner.
  9. void SetViewPosition(const IntVector2& position);
  10. /// Set view offset from the top-left corner.
  11. void SetViewPosition(int x, int y);
  12. /// Set scrollbars' visibility manually. Disables scrollbar autoshow/hide.
  13. void SetScrollBarsVisible(bool horizontal, bool vertical);
  14. /// Set whether to automatically show/hide scrollbars. Default true.
  15. void SetScrollBarsAutoVisible(bool enable);
  16. /// Set arrow key scroll step. Also sets it on the scrollbars.
  17. void SetScrollStep(float step);
  18. /// Set arrow key page step.
  19. void SetPageStep(float step);
  20. /// Return view offset from the top-left corner.
  21. const IntVector2& GetViewPosition() const;
  22. /// Return content element.
  23. UIElement* GetContentElement() const;
  24. /// Return horizontal scroll bar.
  25. ScrollBar* GetHorizontalScrollBar() const;
  26. /// Return vertical scroll bar.
  27. ScrollBar* GetVerticalScrollBar() const;
  28. /// Return scroll panel.
  29. BorderImage* GetScrollPanel() const;
  30. /// Return whether scrollbars are automatically shown/hidden.
  31. bool GetScrollBarsAutoVisible() const;
  32. /// Return arrow key scroll step.
  33. float GetScrollStep() const;
  34. /// Return arrow key page step.
  35. float GetPageStep() const;
  36. /// Set view position attribute.
  37. void SetViewPositionAttr(const IntVector2& value);
  38. };