+void TextSelectionToolbar::SetUpScrollView( Toolkit::ScrollView& scrollView )
+{
+ scrollView.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
+ scrollView.SetParentOrigin( ParentOrigin::CENTER_LEFT );
+ scrollView.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ scrollView.SetMaximumSize( mMaxSize );
+
+ scrollView.SetScrollingDirection( PanGestureDetector::DIRECTION_HORIZONTAL, Degree( 40.0f ) );
+ scrollView.SetAxisAutoLock( true );
+ scrollView.ScrollStartedSignal().Connect( this, &TextSelectionToolbar::OnScrollStarted );
+ scrollView.ScrollCompletedSignal().Connect( this, &TextSelectionToolbar::OnScrollCompleted );
+
+ mRulerX = new DefaultRuler(); // IntrusivePtr which is unreferenced when ScrollView is destroyed.
+
+ RulerPtr rulerY = new DefaultRuler(); // IntrusivePtr which is unreferenced when ScrollView is destroyed.
+ rulerY->Disable();
+ scrollView.SetRulerY( rulerY );
+}
+