X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali-toolkit%2Finternal%2Fcontrols%2Fpopup%2Fpopup-impl.cpp;h=08fbe4ef12a4e87e8a1539b730facfd2bd9f99ab;hb=aa05fcf7ac4aef5d56a2a581c9103a160c4f052c;hp=4a260c55c4c0a83704fa51942597d6e632e4fddc;hpb=bfdf7a73a4d50dfb60d0f7fa5b214f61c920bf9c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/popup/popup-impl.cpp b/dali-toolkit/internal/controls/popup/popup-impl.cpp index 4a260c5..08fbe4e 100755 --- a/dali-toolkit/internal/controls/popup/popup-impl.cpp +++ b/dali-toolkit/internal/controls/popup/popup-impl.cpp @@ -21,13 +21,13 @@ // EXTERNAL INCLUDES #include // for strcmp #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -220,7 +220,7 @@ Dali::Toolkit::Popup Popup::New() } Popup::Popup() -: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ), +: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ), mTouchedOutsideSignal(), mShowingSignal(), mShownSignal(), @@ -318,7 +318,7 @@ void Popup::OnInitialize() mPopupLayout.SetFitHeight( 0 ); // Set row to fit. mPopupLayout.SetFitHeight( 1 ); // Set row to fit. - mPopupLayout.TouchedSignal().Connect( this, &Popup::OnDialogTouched ); + mPopupLayout.TouchSignal().Connect( this, &Popup::OnDialogTouched ); mPopupContainer.Add( mPopupLayout ); @@ -578,7 +578,7 @@ void Popup::SetPopupBackgroundImage( Actor image ) mPopupBackgroundImage.SetParentOrigin( ParentOrigin::CENTER ); // OnDialogTouched only consumes the event. It prevents the touch event to be caught by the backing. - mPopupBackgroundImage.TouchedSignal().Connect( this, &Popup::OnDialogTouched ); + mPopupBackgroundImage.TouchSignal().Connect( this, &Popup::OnDialogTouched ); // Set the popup border to be slightly larger than the layout contents. mPopupBackgroundImage.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS ); @@ -902,7 +902,7 @@ Toolkit::Control Popup::CreateBacking() // Default to being transparent. backing.SetProperty( Actor::Property::COLOR_ALPHA, 0.0f ); - backing.TouchedSignal().Connect( this, &Popup::OnBackingTouched ); + backing.TouchSignal().Connect( this, &Popup::OnBackingTouched ); backing.WheelEventSignal().Connect( this, &Popup::OnBackingWheelEvent ); return backing; } @@ -1454,7 +1454,7 @@ bool Popup::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra return connected; } -bool Popup::OnBackingTouched( Actor actor, const TouchEvent& event ) +bool Popup::OnBackingTouched( Actor actor, const TouchData& touch ) { // Allow events to pass through if touch transparency is enabled. if( mTouchTransparent ) @@ -1462,11 +1462,9 @@ bool Popup::OnBackingTouched( Actor actor, const TouchEvent& event ) return false; } - if( event.GetPointCount() > 0 ) + if( touch.GetPointCount() > 0 ) { - const TouchPoint& point = event.GetPoint( 0 ); - - if( point.state == TouchPoint::Down ) + if( touch.GetState( 0 ) == PointState::DOWN ) { // Guard against destruction during signal emission. Toolkit::Popup handle( GetOwner() ); @@ -1493,7 +1491,7 @@ bool Popup::OnBackingWheelEvent( Actor actor, const WheelEvent& event ) return true; } -bool Popup::OnDialogTouched(Actor actor, const TouchEvent& event) +bool Popup::OnDialogTouched( Actor actor, const TouchData& touch ) { // Allow events to pass through if touch transparency is enabled. if( mTouchTransparent ) @@ -1506,14 +1504,18 @@ bool Popup::OnDialogTouched(Actor actor, const TouchEvent& event) return true; } -void Popup::OnControlStageConnection() +void Popup::OnStageConnection( int depth ) { + Control::OnStageConnection( depth ); + mLayoutDirty = true; RelayoutRequest(); } -void Popup::OnControlChildAdd( Actor& child ) +void Popup::OnChildAdd( Actor& child ) { + Control::OnChildAdd( child ); + // Re-parent any children added by user to the body layer. if( mAlterAddedChild ) {