OnTapEvent( *iter );
break;
}
+ case Event::LONG_PRESS_EVENT:
+ {
+ OnLongPressEvent( *iter );
+ break;
+ }
case Event::PAN_EVENT:
{
OnPanEvent( *iter );
}
}
+void Controller::Impl::OnLongPressEvent( const Event& event )
+{
+ if ( EventData::EDITING == mEventData->mState )
+ {
+ ChangeState ( EventData::EDITING_WITH_POPUP );
+ mEventData->mDecoratorUpdated = true;
+ }
+}
+
void Controller::Impl::OnHandleEvent( const Event& event )
{
if( NULL == mEventData )
}
else if ( EventData::EDITING_WITH_POPUP == mEventData->mState )
{
- buttonsToShow = TextSelectionPopup::Buttons( TextSelectionPopup::SELECT | TextSelectionPopup::SELECT_ALL );
+ if ( mLogicalModel->mText.Count() && !IsShowingPlaceholderText())
+ {
+ buttonsToShow = TextSelectionPopup::Buttons( TextSelectionPopup::SELECT | TextSelectionPopup::SELECT_ALL );
+ }
if ( !IsClipboardEmpty() )
{
if( cursorInfo.isSecondaryCursor )
{
- mEventData->mDecorator->SetActiveCursor( ACTIVE_CURSOR_BOTH );
mEventData->mDecorator->SetPosition( SECONDARY_CURSOR,
cursorInfo.secondaryPosition.x + offset.x,
cursorInfo.secondaryPosition.y + offset.y,
cursorInfo.lineHeight );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Secondary cursor position: %f,%f\n", cursorInfo.secondaryPosition.x + offset.x, cursorInfo.secondaryPosition.y + offset.y );
}
+
+ // Set which cursors are active according the state.
+ if( ( EventData::EDITING == mEventData->mState ) ||
+ ( EventData::EDITING_WITH_POPUP == mEventData->mState ) ||
+ ( EventData::GRAB_HANDLE_PANNING == mEventData->mState ) )
+ {
+ if( cursorInfo.isSecondaryCursor )
+ {
+ mEventData->mDecorator->SetActiveCursor( ACTIVE_CURSOR_BOTH );
+ }
+ else
+ {
+ mEventData->mDecorator->SetActiveCursor( ACTIVE_CURSOR_PRIMARY );
+ }
+ }
else
{
- mEventData->mDecorator->SetActiveCursor( ACTIVE_CURSOR_PRIMARY );
+ mEventData->mDecorator->SetActiveCursor( ACTIVE_CURSOR_NONE );
}
}