if( UPDATE_INPUT_STYLE == type )
{
- // Keep a copy of the current input style.
- InputStyle currentInputStyle;
- currentInputStyle.Copy( mImpl->mEventData->mInputStyle );
-
// Set first the default input style.
mImpl->RetrieveDefaultInputStyle( mImpl->mEventData->mInputStyle );
// Update the input style.
mImpl->mLogicalModel->RetrieveStyle( cursorIndex, mImpl->mEventData->mInputStyle );
-
- // Compare if the input style has changed.
- const bool hasInputStyleChanged = !currentInputStyle.Equal( mImpl->mEventData->mInputStyle );
-
- if( hasInputStyleChanged )
- {
- const InputStyle::Mask styleChangedMask = currentInputStyle.GetInputStyleChangeMask( mImpl->mEventData->mInputStyle );
- // Queue the input style changed signal.
- mImpl->mEventData->mInputStyleChangedQueue.PushBack( styleChangedMask );
- }
}
// Updates the text style runs by removing characters. Runs with no characters are removed.
if( NULL != mImpl->mEventData )
{
mImpl->mEventData->mInputStyle.familyName = fontFamily;
- mImpl->mEventData->mInputStyle.isFamilyDefined = true;
+ mImpl->mEventData->mInputStyle.familyDefined = true;
if( EventData::SELECTING == mImpl->mEventData->mState )
{
if( NULL != mImpl->mEventData )
{
mImpl->mEventData->mInputStyle.weight = weight;
- mImpl->mEventData->mInputStyle.isWeightDefined = true;
+ mImpl->mEventData->mInputStyle.weightDefined = true;
if( EventData::SELECTING == mImpl->mEventData->mState )
{
if( NULL != mImpl->mEventData )
{
- defined = mImpl->mEventData->mInputStyle.isWeightDefined;
+ defined = mImpl->mEventData->mInputStyle.weightDefined;
}
return defined;
if( NULL != mImpl->mEventData )
{
mImpl->mEventData->mInputStyle.width = width;
- mImpl->mEventData->mInputStyle.isWidthDefined = true;
+ mImpl->mEventData->mInputStyle.widthDefined = true;
if( EventData::SELECTING == mImpl->mEventData->mState )
{
if( NULL != mImpl->mEventData )
{
- defined = mImpl->mEventData->mInputStyle.isWidthDefined;
+ defined = mImpl->mEventData->mInputStyle.widthDefined;
}
return defined;
if( NULL != mImpl->mEventData )
{
mImpl->mEventData->mInputStyle.slant = slant;
- mImpl->mEventData->mInputStyle.isSlantDefined = true;
+ mImpl->mEventData->mInputStyle.slantDefined = true;
if( EventData::SELECTING == mImpl->mEventData->mState )
{
if( NULL != mImpl->mEventData )
{
- defined = mImpl->mEventData->mInputStyle.isSlantDefined;
+ defined = mImpl->mEventData->mInputStyle.slantDefined;
}
return defined;
if( NULL != mImpl->mEventData )
{
mImpl->mEventData->mInputStyle.size = size;
- mImpl->mEventData->mInputStyle.isSizeDefined = true;
if( EventData::SELECTING == mImpl->mEventData->mState )
{
if( NULL != mImpl->mEventData )
{
mImpl->mEventData->mInputStyle.lineSpacing = lineSpacing;
- mImpl->mEventData->mInputStyle.isLineSpacingDefined = true;
}
}
events.Clear();
}
-bool Controller::IsInputStyleChangedSignalsQueueEmpty()
-{
- return ( NULL == mImpl->mEventData ) || ( 0u == mImpl->mEventData->mInputStyleChangedQueue.Count() );
-}
-
-void Controller::ProcessInputStyleChangedSignals()
-{
- if( NULL == mImpl->mEventData )
- {
- // Nothing to do.
- return;
- }
-
- for( Vector<InputStyle::Mask>::ConstIterator it = mImpl->mEventData->mInputStyleChangedQueue.Begin(),
- endIt = mImpl->mEventData->mInputStyleChangedQueue.End();
- it != endIt;
- ++it )
- {
- const InputStyle::Mask mask = *it;
-
- // Emit the input style changed signal.
- mImpl->mControlInterface.InputStyleChanged( mask );
- }
-
- mImpl->mEventData->mInputStyleChangedQueue.Clear();
-}
-
void Controller::ResetText()
{
// Reset buffers.
{
mImpl->mOperationsPending = ALL_OPERATIONS;
mImpl->RequestRelayout();
+
+ // Do this last since it provides callbacks into application code
+ mImpl->mControlInterface.TextChanged();
}
std::string text;
ImfManager::ImfCallbackData callbackData( ( retrieveText || retrieveCursor ), cursorPosition, text, false );
- if( requestRelayout )
- {
- // Do this last since it provides callbacks into application code
- mImpl->mControlInterface.TextChanged();
- }
-
return callbackData;
}