return;
}
- if( gesture.GetState() == Gesture::Continuing )
+ if( gesture.GetState() == GestureState::CONTINUING )
{
const Vector2& displacement = gesture.GetDisplacement();
if( displacement.x < 0)
return;
}
- if( gesture.GetState() == Gesture::Continuing )
+ if( gesture.GetState() == GestureState::CONTINUING )
{
const Vector2& displacement = gesture.GetDisplacement();
if( displacement.x < 0)
*/
void OnLongPress( Actor actor, const LongPressGesture& longPress )
{
- if( longPress.GetState() == Gesture::Started )
+ if( longPress.GetState() == GestureState::STARTED )
{
// When we first receive a long press, attach the actor to the pan detector.
mPanDetector.Attach( actor );
switch( pan.GetState() )
{
- case Gesture::Started:
+ case GestureState::STARTED:
{
mPanStarted = true;
break;
}
- case Gesture::Finished:
- case Gesture::Cancelled:
+ case GestureState::FINISHED:
+ case GestureState::CANCELLED:
{
// If we cancel or finish the pan, do an animation to indicate this and stop the shake animation.
{
switch( pinch.GetState() )
{
- case Gesture::Started:
+ case GestureState::STARTED:
{
// Starting scale is required so that we know what to multiply the pinch.scale by.
mStartingScale = actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
break;
}
- case Gesture::Finished:
- case Gesture::Cancelled:
+ case GestureState::FINISHED:
+ case GestureState::CANCELLED:
{
Vector3 scale( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) );
{
switch( rotation.GetState() )
{
- case Gesture::Started:
+ case GestureState::STARTED:
{
// Starting orientation is required so that we know what to multiply the rotation.rotation by.
mStartingOrientation = actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION );
break;
}
- case Gesture::Finished:
- case Gesture::Cancelled:
+ case GestureState::FINISHED:
+ case GestureState::CANCELLED:
{
// Do an animation to come back to go back to the original orientation.
Animation anim = Animation::New( ROTATE_BACK_ANIMATION_DURATION );
void OnPinch( Actor actor, const PinchGesture& pinch )
{
- if( pinch.GetState() == Gesture::Started )
+ if( pinch.GetState() == GestureState::STARTED )
{
mLastPinchScale = pinch.GetScale();
}
// Callback of pan gesture, for moving the actors
void OnPanGesture( Actor actor, const PanGesture& gesture )
{
- if( gesture.GetState() == Gesture::Continuing )
+ if( gesture.GetState() == GestureState::CONTINUING )
{
for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
{
{
// Only scale the image when we start or continue pinching
- case Gesture::Started:
- case Gesture::Continuing:
+ case GestureState::STARTED:
+ case GestureState::CONTINUING:
{
float scale = std::max( gesture.GetScale(), MIN_SCALE / mScale );
scale = std::min( MAX_SCALE / mScale, scale );
break;
}
- case Gesture::Finished:
+ case GestureState::FINISHED:
{
// Resize the image when pinching is complete, this will rasterize the SVG to the new size
break;
}
- case Gesture::Cancelled:
- case Gesture::Clear:
- case Gesture::Possible:
+ case GestureState::CANCELLED:
+ case GestureState::CLEAR:
+ case GestureState::POSSIBLE:
break;
}
}
{
switch( gesture.GetState() )
{
- case Gesture::Started:
+ case GestureState::STARTED:
{
const Size& size = mApplication.GetWindow().GetSize();
break;
}
- case Gesture::Finished:
+ case GestureState::FINISHED:
{
Property::Map attributes;
mItemView.DoAction( "stopScrolling", attributes );
{
switch( gesture.GetState() )
{
- case Gesture::Started:
+ case GestureState::STARTED:
{
//Pause animation, as the gesture will be used to manually rotate the model
mRotationAnimation.Pause();
break;
}
- case Gesture::Continuing:
+ case GestureState::CONTINUING:
{
//Rotate based off the gesture.
const Vector2& displacement = gesture.GetDisplacement();
break;
}
- case Gesture::Finished:
+ case GestureState::FINISHED:
{
//Return to automatic animation
mRotationAnimation.Play();
break;
}
- case Gesture::Cancelled:
+ case GestureState::CANCELLED:
{
//Return to automatic animation
mRotationAnimation.Play();
{
switch (gesture.GetState())
{
- case Gesture::Continuing:
+ case GestureState::CONTINUING:
{
const Vector2& displacement = gesture.GetDisplacement();
switch(mPanState)
}
break;
- case Gesture::Finished:
+ case GestureState::FINISHED:
// Start animation at last known speed
break;
void OnPinch(Actor actor, const PinchGesture& gesture)
{
- if (gesture.GetState() == Gesture::Started)
+ if (gesture.GetState() == GestureState::STARTED)
{
mScaleAtPinchStart = mContents.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x;
}
*/
void OnPan( Actor actor, const PanGesture& gesture )
{
- if( gesture.GetState() == Gesture::Finished )
+ if( gesture.GetState() == GestureState::FINISHED )
{
switch(mAnimationIndex)
{
void OnPan( Actor actor, const PanGesture& gesture )
{
// Reset mLayoutSize when the pan starts
- Gesture::State state = gesture.GetState();
- if( state == Gesture::Started )
+ GestureState state = gesture.GetState();
+ if( state == GestureState::STARTED )
{
if( mLayoutSize.x < 2.0f )
{
mContainer.SetProperty( Actor::Property::SIZE, clampedSize );
}
- if( state == Gesture::Cancelled || state == Gesture::Finished )
+ if( state == GestureState::CANCELLED || state == GestureState::FINISHED )
{
// Resize the text label to match the container size when panning is finished
mLabel.SetProperty( Actor::Property::SIZE, mLayoutSize );
void TextOverlapController::OnPan( Actor actor, const PanGesture& gesture )
{
- const Gesture::State state = gesture.GetState();
- if( ! mGrabbedActor || state == PanGesture::Started )
+ const GestureState state = gesture.GetState();
+ if( ! mGrabbedActor || state == GestureState::STARTED )
{
const Vector2& gesturePosition = gesture.GetPosition();
for( int i=0; i<NUMBER_OF_LABELS; ++i )
}
}
}
- else if( mGrabbedActor && state == PanGesture::Continuing )
+ else if( mGrabbedActor && state == GestureState::CONTINUING )
{
Vector2 windowSize = mApplication.GetWindow().GetSize();
Vector3 size = mGrabbedActor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
void OnPanGesture( Actor actor, const PanGesture& gesture )
{
- if( gesture.GetState() == Gesture::Continuing )
+ if( gesture.GetState() == GestureState::CONTINUING )
{
mTargetActorPosition.y = mTargetActorPosition.y + gesture.GetDisplacement().y;
mTargetActorPosition.y = std::min( mTargetActorPosition.y, -mTargetActorSize.height );
void OnPan( Actor actor, const PanGesture& gesture )
{
- if( !mIsFullScreen && gesture.GetState() == Gesture::Continuing )
+ if( !mIsFullScreen && gesture.GetState() == GestureState::CONTINUING )
{
mVideoView.TranslateBy( Vector3( gesture.GetDisplacement() ) );
}
void OnPinch( Actor actor, const PinchGesture& gesture )
{
- Gesture::State state = gesture.GetState();
- if( state == Gesture::Started )
+ GestureState state = gesture.GetState();
+ if( state == GestureState::STARTED )
{
mPinchStartScale = mScale;
}
- if( state == Gesture::Finished )
+ if( state == GestureState::FINISHED )
{
mScale = mPinchStartScale * gesture.GetScale();
mVideoView.SetProperty( Actor::Property::SCALE, mScale );