Change-Id: I8bc67f3b0c781f0f5c30f3576972ff1008c8c16c
- mShadowPlane.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, Source( mShadowPlaneBg, Actor::SIZE ), EqualToConstraint() ) );
+ mShadowPlane.SetSizeMode( SIZE_EQUAL_TO_PARENT );
- mBlurRootActor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, Source( mShadowPlane, Actor::SIZE ), EqualToConstraint() ) );
+ mBlurRootActor.SetSizeMode( SIZE_EQUAL_TO_PARENT );
}
void ShadowView::SetPointLight(Actor pointLight)
}
void ShadowView::SetPointLight(Actor pointLight)
{
// root actor to parent all user added actors. Used as source actor for shadow render task.
mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
{
// root actor to parent all user added actors. Used as source actor for shadow render task.
mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
- mChildrenRoot.ApplyConstraint(Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ));
+ mChildrenRoot.SetSizeMode( SIZE_EQUAL_TO_PARENT );
Vector2 stageSize = Stage::GetCurrent().GetSize();
mCameraActor = CameraActor::New(stageSize);
Vector2 stageSize = Stage::GetCurrent().GetSize();
mCameraActor = CameraActor::New(stageSize);
Actor handleGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
handleGrabArea.SetName( name );
Actor handleGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
handleGrabArea.SetName( name );
- handleGrabArea.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( relativeScale ) ) ); // grab area to be larger than text actor
+ handleGrabArea.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ handleGrabArea.SetSizeModeFactor( relativeScale );
handleGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
return handleGrabArea;
handleGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
return handleGrabArea;
mGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mGrabArea.SetName( "GrabArea" );
mGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
mGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mGrabArea.SetName( "GrabArea" );
mGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
- mGrabArea.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( DEFAULT_GRAB_HANDLE_RELATIVE_SIZE ) ) ); // grab area to be larger than text actor
+ mGrabArea.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mGrabArea.SetSizeModeFactor( DEFAULT_GRAB_HANDLE_RELATIVE_SIZE );
mGrabArea.TouchedSignal().Connect(this,&TextInput::OnPressDown);
mTapDetector.Attach( mGrabArea );
mPanGestureDetector.Attach( mGrabArea );
mGrabArea.TouchedSignal().Connect(this,&TextInput::OnPressDown);
mTapDetector.Attach( mGrabArea );
mPanGestureDetector.Attach( mGrabArea );
mHandleOneGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mHandleOneGrabArea.SetName("SelectionHandleOneGrabArea");
mHandleOneGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mHandleOneGrabArea.SetName("SelectionHandleOneGrabArea");
- mHandleOneGrabArea.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE ) ) ); // grab area to be larger than text actor
+ mHandleOneGrabArea.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mHandleOneGrabArea.SetSizeModeFactor( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
mHandleOneGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
mTapDetector.Attach( mHandleOneGrabArea );
mHandleOneGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
mTapDetector.Attach( mHandleOneGrabArea );
mHandleTwoGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mHandleTwoGrabArea.SetName("SelectionHandleTwoGrabArea");
mHandleTwoGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mHandleTwoGrabArea.SetName("SelectionHandleTwoGrabArea");
- mHandleTwoGrabArea.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE ) ) ); // grab area to be larger than text actor
+ mHandleTwoGrabArea.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mHandleTwoGrabArea.SetSizeModeFactor( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
mHandleTwoGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
mTapDetector.Attach( mHandleTwoGrabArea );
mHandleTwoGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
mTapDetector.Attach( mHandleTwoGrabArea );
mBackgroundEffect.SetAnchorPoint( AnchorPoint::CENTER );
mBackgroundEffect.SetParentOrigin( ParentOrigin::CENTER );
mBackgroundEffect.SetName( "text-input-popup-background-effect" );
mBackgroundEffect.SetAnchorPoint( AnchorPoint::CENTER );
mBackgroundEffect.SetParentOrigin( ParentOrigin::CENTER );
mBackgroundEffect.SetName( "text-input-popup-background-effect" );
- mBackgroundEffect.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mBackgroundEffect.SetSizeMode( SIZE_EQUAL_TO_PARENT );
mBackgroundEffect.SetZ( 1.0f );
mBackground.Add( mBackgroundEffect );
mBackgroundEffect.SetZ( 1.0f );
mBackground.Add( mBackgroundEffect );
mBackgroundLine.SetAnchorPoint( AnchorPoint::CENTER);
mBackgroundLine.SetParentOrigin( ParentOrigin::CENTER );
mBackgroundLine.SetName( "text-input-popup-background-effect" );
mBackgroundLine.SetAnchorPoint( AnchorPoint::CENTER);
mBackgroundLine.SetParentOrigin( ParentOrigin::CENTER );
mBackgroundLine.SetName( "text-input-popup-background-effect" );
- mBackgroundLine.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mBackgroundLine.SetSizeMode( SIZE_EQUAL_TO_PARENT );
mBackgroundLine.SetColor( mLineColor );
mBackgroundLine.SetZ( 0.1f );
mBackgroundEffect.Add( mBackgroundLine );
mBackgroundLine.SetColor( mLineColor );
mBackgroundLine.SetZ( 0.1f );
mBackgroundEffect.Add( mBackgroundLine );
mTailEffect.SetParentOrigin( ParentOrigin::CENTER );
mTailEffect.SetAnchorPoint( AnchorPoint::CENTER );
mTailEffect.SetName( "text-input-popup-tail-effect" );
mTailEffect.SetParentOrigin( ParentOrigin::CENTER );
mTailEffect.SetAnchorPoint( AnchorPoint::CENTER );
mTailEffect.SetName( "text-input-popup-tail-effect" );
- mTailEffect.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mTailEffect.SetSizeMode( SIZE_EQUAL_TO_PARENT );
mTailEffect.SetZ( 0.1f );
mTail.Add( mTailEffect );
mTailEffect.SetZ( 0.1f );
mTail.Add( mTailEffect );
mTailLine = ImageActor::New( tailLine );
mTailLine.SetParentOrigin( ParentOrigin::CENTER );
mTailLine.SetAnchorPoint( AnchorPoint::CENTER );
mTailLine = ImageActor::New( tailLine );
mTailLine.SetParentOrigin( ParentOrigin::CENTER );
mTailLine.SetAnchorPoint( AnchorPoint::CENTER );
- mTailLine.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mTailLine.SetSizeMode( SIZE_EQUAL_TO_PARENT );
mTailLine.SetName( "text-input-popup-tail-line" );
mTailLine.SetColor( mLineColor );
mTailLine.SetZ( 0.1f );
mTailLine.SetName( "text-input-popup-tail-line" );
mTailLine.SetColor( mLineColor );
mTailLine.SetZ( 0.1f );
focusIndicator.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
// Apply size constraint to the focus indicator
focusIndicator.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
// Apply size constraint to the focus indicator
- Constraint constraint = Constraint::New<Vector3>(Actor::SIZE,
- ParentSource(Actor::SIZE),
- EqualToConstraint());
- focusIndicator.ApplyConstraint(constraint);
+ focusIndicator.SetSizeMode( SIZE_EQUAL_TO_PARENT );
SetFocusIndicatorActor(focusIndicator);
}
SetFocusIndicatorActor(focusIndicator);
}
focusIndicator.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
// Apply size constraint to the focus indicator
focusIndicator.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
// Apply size constraint to the focus indicator
- Constraint constraint = Constraint::New<Vector3>(Actor::SIZE,
- ParentSource(Actor::SIZE),
- EqualToConstraint());
- focusIndicator.ApplyConstraint(constraint);
+ focusIndicator.SetSizeMode( SIZE_EQUAL_TO_PARENT );
SetFocusIndicatorActor(focusIndicator);
}
SetFocusIndicatorActor(focusIndicator);
}