X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftooltip%2Ftooltip.cpp;h=e7f8b9f1a4de42c43b8d84ab6232eee80c1caba1;hp=012db24705876fc864d7a9204f181e1ae71d1767;hb=091d04794a201f1171294e54ab0cb8e69ac2c807;hpb=078278a2ea58db1f07114513bf21783eb689f63a diff --git a/dali-toolkit/internal/controls/tooltip/tooltip.cpp b/dali-toolkit/internal/controls/tooltip/tooltip.cpp index 012db24..e7f8b9f 100644 --- a/dali-toolkit/internal/controls/tooltip/tooltip.cpp +++ b/dali-toolkit/internal/controls/tooltip/tooltip.cpp @@ -85,7 +85,7 @@ void Tooltip::SetProperties( const Property::Value& value ) Toolkit::Control control = mControl.GetHandle(); if( control ) { - Property::Map* properties = value.GetMap(); + const Property::Map* properties = value.GetMap(); if( properties ) { const Property::Map::SizeType count = properties->Count(); @@ -229,7 +229,7 @@ void Tooltip::SetContent( Toolkit::Control& control, const Property::Value& valu Property::Type type = value.GetType(); if( type == Property::MAP ) { - Property::Map* map = value.GetMap(); + const Property::Map* map = value.GetMap(); if( map ) { mContentTextVisual.Merge( *map ); @@ -302,7 +302,7 @@ void Tooltip::SetBackground( const Property::Value& value ) } else if( type == Property::MAP ) { - Property::Map* map = value.GetMap(); + const Property::Map* map = value.GetMap(); if( map ) { const Property::Map::SizeType count = map->Count(); @@ -385,30 +385,30 @@ void Tooltip::SetTail( const Property::Value& value ) bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover ) { - const TouchPoint::State state = hover.points[0].state; + const PointState::Type state = hover.GetState( 0 ); switch( state ) { - case TouchPoint::Started: - case TouchPoint::Motion: + case PointState::STARTED: + case PointState::MOTION: { if( ! mPopup ) { if( ! mTooltipTimer ) { - mHoverPoint = hover.points[ 0 ].screen; + mHoverPoint = hover.GetScreenPosition( 0 ); mTooltipTimer = Timer::New( mWaitTime ); mTooltipTimer.TickSignal().Connect( this, &Tooltip::OnTimeout ); mTooltipTimer.Start(); } else { - Vector2 movement = mHoverPoint - hover.points[ 0 ].screen; + Vector2 movement = mHoverPoint - hover.GetScreenPosition( 0 ); if( std::abs( movement.Length() ) > mMovementThreshold ) { mTooltipTimer.Stop(); mTooltipTimer.Reset(); - mHoverPoint = hover.points[ 0 ].screen; + mHoverPoint = hover.GetScreenPosition( 0 ); mTooltipTimer = Timer::New( mWaitTime ); mTooltipTimer.TickSignal().Connect( this, &Tooltip::OnTimeout ); mTooltipTimer.Start(); @@ -419,7 +419,7 @@ bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover ) { // Popup is showing, and we're set to disappear on excessive movement so make sure we're still within the threshold. - Vector2 movement = mHoverPoint - hover.points[ 0 ].screen; + Vector2 movement = mHoverPoint - hover.GetScreenPosition( 0 ); if( std::abs( movement.Length() ) > mMovementThreshold ) { // Exceeding the threshold, hide the popup. @@ -438,9 +438,9 @@ bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover ) } break; } - case TouchPoint::Finished: - case TouchPoint::Leave: - case TouchPoint::Interrupted: + case PointState::FINISHED: + case PointState::LEAVE: + case PointState::INTERRUPTED: { if( mTooltipTimer ) { @@ -455,8 +455,7 @@ bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover ) break; } - case TouchPoint::Stationary: - case TouchPoint::Last: + case PointState::STATIONARY: { break; }