*/
enum EventType
{
- VOID, ///< No event
- PRE_EDIT, ///< Pre-Edit changed
- COMMIT, ///< Commit recieved
- DELETE_SURROUNDING, ///< Event to delete a range of characters from the string
- GET_SURROUNDING, ///< Event to query string and cursor position
- PRIVATE_COMMAND ///< Private command sent from the input panel
+ VOID, ///< No event
+ PRE_EDIT, ///< Pre-Edit changed
+ COMMIT, ///< Commit recieved
+ DELETE_SURROUNDING, ///< Event to delete a range of characters from the string
+ GET_SURROUNDING, ///< Event to query string and cursor position
+ PRIVATE_COMMAND, ///< Private command sent from the input panel
+ SELECTION_SET ///< input method needs to set the selection
};
/**
*/
enum class PreeditStyle
{
- NONE, ///< None style
- UNDERLINE, ///< Underline substring style
- REVERSE, ///< Reverse substring style
- HIGHLIGHT ///< Highlight substring style
+ NONE, ///< None style
+ UNDERLINE, ///< Underline substring style
+ REVERSE, ///< Reverse substring style
+ HIGHLIGHT, ///< Highlight substring style
+ CUSTOM_PLATFORM_STYLE_1, ///< Custom style for platform
+ CUSTOM_PLATFORM_STYLE_2, ///< Custom style for platform
+ CUSTOM_PLATFORM_STYLE_3, ///< Custom style for platform
+ CUSTOM_PLATFORM_STYLE_4 ///< Custom style for platform
+ };
+
+ /**
+ * @brief This structure is for the preedit style types and indices.
+ */
+ struct PreeditAttributeData
+ {
+ PreeditAttributeData()
+ : preeditType( PreeditStyle::NONE ),
+ startIndex( 0 ),
+ endIndex( 0 )
+ {
+ }
+
+ PreeditStyle preeditType; /// The preedit style type
+ unsigned int startIndex; /// The start index of preedit
+ unsigned int endIndex; /// The end index of preedit
};
/**
: predictiveString(),
eventName( VOID ),
cursorOffset( 0 ),
- numberOfChars ( 0 )
+ numberOfChars ( 0 ),
+ startIndex ( 0 ),
+ endIndex ( 0 )
{
};
: predictiveString( aPredictiveString ),
eventName( aEventName ),
cursorOffset( aCursorOffset ),
- numberOfChars( aNumberOfChars )
+ numberOfChars( aNumberOfChars ),
+ startIndex ( 0 ),
+ endIndex ( 0 )
+ {
+ }
+
+ /**
+ * @brief Constructor
+ *
+ * @param[in] aEventName The name of the event from the InputMethodContext.
+ * @param[in] aStartIndex The start index of selection.
+ * @param[in] aEndIndex The end index of selection.
+ */
+ EventData(EventType aEventName, int aStartIndex, int aEndIndex)
+ : predictiveString(),
+ eventName(aEventName),
+ cursorOffset(0),
+ numberOfChars(0),
+ startIndex(aStartIndex),
+ endIndex(aEndIndex)
{
}
// Data
std::string predictiveString; ///< The pre-edit or commit string.
- EventType eventName; ///< The name of the event from the input method context.
+ EventType eventName; ///< The name of the event from the input method context.
int cursorOffset; ///< Start position from the current cursor position to start deleting characters.
int numberOfChars; ///< number of characters to delete from the cursorOffset.
+ int startIndex; ///< The start index of selection.
+ int endIndex; ///< The end index of selection.
};
/**
typedef Signal< void () > VoidSignalType;
typedef Signal< void (bool) > StatusSignalType;
+ using PreEditAttributeDataContainer = Vector< Dali::InputMethodContext::PreeditAttributeData >;
+
public:
/**
void SetPreeditStyle( PreeditStyle type );
/**
- * @brief Gets the preedit type.
+ * @brief Gets the preedit attributes data.
*
- * @return The preedit style type
+ * @param[out] attrs The preedit attributes data.
*/
- PreeditStyle GetPreeditStyle() const;
+ void GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const;
public: