$#include "ScrollView.h" /// Scrollable %UI element for showing a (possibly large) child element. class ScrollView : public UIElement { public: /// Construct. ScrollView(Context* context); /// Destruct. virtual ~ScrollView(); /// Set content element. void SetContentElement(UIElement* element); /// Set view offset from the top-left corner. void SetViewPosition(const IntVector2& position); /// Set view offset from the top-left corner. void SetViewPosition(int x, int y); /// Set scrollbars' visibility manually. Disables scrollbar autoshow/hide. void SetScrollBarsVisible(bool horizontal, bool vertical); /// Set whether to automatically show/hide scrollbars. Default true. void SetScrollBarsAutoVisible(bool enable); /// Set arrow key scroll step. Also sets it on the scrollbars. void SetScrollStep(float step); /// Set arrow key page step. void SetPageStep(float step); /// Return view offset from the top-left corner. const IntVector2& GetViewPosition() const { return viewPosition_; } /// Return content element. UIElement* GetContentElement() const { return contentElement_; } /// Return horizontal scroll bar. ScrollBar* GetHorizontalScrollBar() const { return horizontalScrollBar_; } /// Return vertical scroll bar. ScrollBar* GetVerticalScrollBar() const { return verticalScrollBar_; } /// Return scroll panel. BorderImage* GetScrollPanel() const { return scrollPanel_; } /// Return whether scrollbars are automatically shown/hidden. bool GetScrollBarsAutoVisible() const { return scrollBarsAutoVisible_; } /// Return arrow key scroll step. float GetScrollStep() const; /// Return arrow key page step. float GetPageStep() const { return pageStep_; } /// Set view position attribute. void SetViewPositionAttr(const IntVector2& value); };