ScrollView¶
A container view that can scroll its content view.
Declaration¶
namespace bdn::ui { class ScrollView : public View }
Example¶
#include <bdn/ui/ScrollView.h> #include <bdn/ui/ImageView.h> // ... auto image = std::make_shared<ImageView>(); image->url = "https:://www.xyz.com/some_huge_image.png"; auto scrollView = std::make_shared<ScrollView>(); scrollView->contentView = image;
Properties¶
-
Property<std::shared_ptr<View>> contentView
The content view to be scrolled.
-
Property<bool> verticalScrollingEnabled
Whether vertical scrolling is enabled.
-
Property<bool> horizontalScrollingEnabled
Whether horizontal scrolling is enabled.
-
Property<Rect> visibleClientRect
The currently visible part of the content view.
Actions¶
-
void scrollClientRectToVisible(const Rect &area)
Scrolls the view so that the area of the content view is visible.
Relationships¶
Inherits from: View