OnSelectAllEvent();
break;
}
+ case Event::SELECT_NONE:
+ {
+ OnSelectNoneEvent();
+ break;
+ }
}
}
}
mEventData->mPreEditFlag &&
( 0u != mModel->mVisualModel->mCharactersToGlyph.Count() ) )
{
- Vector< Dali::InputMethodContext::PreeditAttributeData > attrs;
+ Dali::InputMethodContext::PreEditAttributeDataContainer attrs;
mEventData->mInputMethodContext.GetPreeditStyle( attrs );
Dali::InputMethodContext::PreeditStyle type = Dali::InputMethodContext::PreeditStyle::NONE;
// Check the type of preedit and run it.
- for( Vector<Dali::InputMethodContext::PreeditAttributeData>::Iterator it = attrs.Begin(), endIt = attrs.End(); it != endIt; it++ )
+ for( Dali::InputMethodContext::PreEditAttributeDataContainer::Iterator it = attrs.Begin(), endIt = attrs.End(); it != endIt; it++ )
{
Dali::InputMethodContext::PreeditAttributeData attrData = *it;
DALI_LOG_INFO( gLogFilter, Debug::General, "Controller::UpdateModel PreeditStyle type : %d start %d end %d \n", attrData.preeditType, attrData.startIndex, attrData.endIndex );
- type = attrData.preeditType;
+ type = attrData.preeditType;
// Check the number of commit characters for the start position.
unsigned int numberOfCommit = mEventData->mPrimaryCursorPosition - mEventData->mPreEditLength;
// Add the underline for the pre-edit text.
GlyphRun underlineRun;
underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
- underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ underlineRun.numberOfGlyphs = numberOfIndices;
mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
break;
}
GlyphRun underlineRun;
underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
- underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ underlineRun.numberOfGlyphs = numberOfIndices;
mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
break;
}
GlyphRun underlineRun;
underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
- underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ underlineRun.numberOfGlyphs = numberOfIndices;
mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
break;
}
GlyphRun underlineRun;
underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
- underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ underlineRun.numberOfGlyphs = numberOfIndices;
mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
break;
}
GlyphRun underlineRun;
underlineRun.glyphIndex = attrData.startIndex + numberOfCommit;
- underlineRun.numberOfGlyphs = attrData.endIndex - attrData.startIndex;
+ underlineRun.numberOfGlyphs = numberOfIndices;
mModel->mVisualModel->mUnderlineRuns.PushBack( underlineRun );
break;
}
}
}
+void Controller::Impl::OnSelectNoneEvent()
+{
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "OnSelectNoneEvent mEventData->mSelectionEnabled%s \n", mEventData->mSelectionEnabled?"true":"false");
+
+ if( NULL == mEventData )
+ {
+ // Nothing to do if there is no text.
+ return;
+ }
+
+ if( mEventData->mSelectionEnabled && mEventData->mState == EventData::SELECTING)
+ {
+ mEventData->mPrimaryCursorPosition = 0u;
+ mEventData->mLeftSelectionPosition = mEventData->mRightSelectionPosition = mEventData->mPrimaryCursorPosition;
+ ChangeState( EventData::INACTIVE );
+ mEventData->mUpdateCursorPosition = true;
+ mEventData->mUpdateInputStyle = true;
+ mEventData->mScrollAfterUpdatePosition = true;
+ }
+}
+
void Controller::Impl::RetrieveSelection( std::string& selectedText, bool deleteAfterRetrieval )
{
if( mEventData->mLeftSelectionPosition == mEventData->mRightSelectionPosition )
renderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, DepthIndex::CONTENT );
actor = Actor::New();
- actor.SetName( "TextBackgroundColorActor" );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actor.SetSize( textSize );
- actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
+ actor.SetProperty( Dali::Actor::Property::NAME, "TextBackgroundColorActor" );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::SIZE, textSize );
+ actor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR );
actor.AddRenderer( renderer );
}
}