// Used to queue input events until DoRelayout()
enum Type
{
- KEYBOARD_FOCUS_GAIN_EVENT,
- KEYBOARD_FOCUS_LOST_EVENT,
CURSOR_KEY_EVENT,
TAP_EVENT,
PAN_EVENT,
{
enum Type
{
- PLACEHOLDER_TEXT, ///< Show the placeholder text if necessary
TEXT_REPLACED, ///< The entire text was replaced
- TEXT_INSERTED, ///< Insert characters at the current cursor position
+ TEXT_INSERTED, ///< Insert characters at the current cursor position
TEXT_DELETED ///< Characters were deleted
};
return ( mEventData && mEventData->mIsShowingPlaceholderText );
}
- void ShowPlaceholderText()
- {
- if( IsPlaceholderAvailable() )
- {
- mEventData->mIsShowingPlaceholderText = true;
-
- // Placeholder-text is dependent on focus state i.e. replace after event processing
- QueueModifyEvent( ModifyEvent::PLACEHOLDER_TEXT );
- }
- }
-
/**
* @brief Called when placeholder-text is hidden
*/
}
}
- void PreEditReset()
+ void ClearPreEditFlag()
+ {
+ if( mEventData )
+ {
+ mEventData->mPreEditFlag = false;
+ mEventData->mPreEditStartPosition = 0;
+ mEventData->mPreEditLength = 0;
+ }
+ }
+
+ void ResetImfManager()
{
// Reset incase we are in a pre-edit state.
ImfManager imfManager = ImfManager::Get();
{
imfManager.Reset(); // Will trigger a commit message
}
- }
- /**
- * @brief Called when placeholder-text is shown
- */
- void ReplaceTextWithPlaceholder();
+ ClearPreEditFlag();
+ }
void UpdateModel( OperationsMask operationsRequired );
*/
void GetDefaultFonts( Dali::Vector<FontRun>& fonts, Length numberOfCharacters );
- void OnKeyboardFocus( bool hasFocus );
-
void OnCursorKeyEvent( const Event& event );
void OnTapEvent( const Event& event );