+ if( Gesture::Started == gesture.state )
+ {
+ handle.grabDisplacementX = handle.grabDisplacementY = 0;
+ }
+
+ handle.grabDisplacementX += gesture.displacement.x;
+ handle.grabDisplacementY += gesture.displacement.y;
+
+ const float x = handle.position.x + handle.grabDisplacementX;
+ const float y = handle.position.y + handle.lineHeight*0.5f + handle.grabDisplacementY;
+
+ if( Gesture::Started == gesture.state ||
+ Gesture::Continuing == gesture.state )
+ {
+ Vector2 targetSize;
+ mController.GetTargetSize( targetSize );
+
+ if( x < mScrollThreshold )
+ {
+ mScrollDirection = SCROLL_RIGHT;
+ mHandleScrolling = type;
+ StartScrollTimer();
+ }
+ else if( x > targetSize.width - mScrollThreshold )
+ {
+ mScrollDirection = SCROLL_LEFT;
+ mHandleScrolling = type;
+ StartScrollTimer();
+ }
+ else
+ {
+ mHandleScrolling = HANDLE_TYPE_COUNT;
+ StopScrollTimer();
+ mController.DecorationEvent( type, HANDLE_PRESSED, x, y );
+ }
+ }
+ else if( Gesture::Finished == gesture.state ||
+ Gesture::Cancelled == gesture.state )