30 #ifndef Pt_Forms_SCROLLVIEW_H
31 #define Pt_Forms_SCROLLVIEW_H
33 #include <Pt/Forms/Api.h>
34 #include <Pt/Forms/Control.h>
35 #include <Pt/Forms/ScrollLayout.h>
36 #include <Pt/Forms/ScrollBar.h>
42 class PT_FORMS_API ScrollView :
public Control
49 virtual ~ScrollView();
51 void setScrollBars(
bool hasScrollBars);
53 void setContent(Control& control);
55 void setContentMode(SizePolicy::Mode horizontal,
56 SizePolicy::Mode vertical);
58 void scrollX(
double xpos);
60 void scrollY(
double ypos);
62 double maximumX()
const;
64 double maximumY()
const;
67 void onScrollBarX(
double pos);
69 void onScrollBarY(
double pos);
71 void onScrolledX(
double n);
73 void onScrolledY(
double n);
76 virtual Gfx::SizeF onMeasure(
const SizePolicy& policy);
78 virtual void onLayout(
const Gfx::RectF& rect);
81 void updateScrollBar(ScrollBar& scroll,
double maxRange);
84 ScrollLayout _scrollLayout;
87 ScrollBar _scrollBarX;
88 ScrollBar _scrollBarY;