// EXTERNAL INCLUDES
#include <dali/public-api/events/key-event.h>
+#include <dali/public-api/common/dali-vector.h>
// EXTERNAL INCLUDES
#include <dali/public-api/object/base-handle.h>
}
}
+class Actor;
+
/**
* @brief The InputMethodContext class
*
public:
/**
- * @brief The direction of text.
- */
+ * @brief The direction of text.
+ */
enum TextDirection
{
- LeftToRight,
- RightToLeft,
+ LEFT_TO_RIGHT,
+ RIGHT_TO_LEFT,
};
/**
HARDWARE_KEYBOARD ///< Hardware keyboard
};
+ /**
+ * @brief Enumeration for the language mode of the input panel.
+ */
enum class InputPanelLanguage
{
AUTOMATIC, ///< IME Language automatically set depending on the system display
};
/**
+ * @brief Enumeration for the preedit style types.
+ */
+ enum class PreeditStyle
+ {
+ 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
+ };
+
+ /**
* @brief This structure is used to pass on data from the InputMethodContext regarding predictive text.
*/
struct EventData
typedef Signal< void ( int ) > LanguageChangedSignalType; ///< Language changed signal
typedef Signal< void ( const std::string&, const std::string&, const std::string& ) > ContentReceivedSignalType; ///< Content received signal
+ using PreEditAttributeDataContainer = Vector< Dali::InputMethodContext::PreeditAttributeData >;
+
public:
/**
static InputMethodContext New();
/**
+ * @brief Create a new instance of an InputMethodContext.
+ *
+ * @param[in] actor The actor that uses the new InputMethodContext instance.
+ */
+ static InputMethodContext New( Actor actor );
+
+ /**
* @brief Copy constructor.
*
* @param[in] inputMethodContext InputMethodContext to copy. The copied inputMethodContext will point at the same implementation.
*/
InputPanelLanguage GetInputPanelLanguage() const;
+ /**
+ * @brief Sets the x,y coordinates of the input panel.
+ *
+ * @param[in] x The top-left x coordinate of the input panel
+ * @param[in] y The top-left y coordinate of the input panel
+ */
+ void SetInputPanelPosition( unsigned int x, unsigned int y );
+
+ /**
+ * @brief Gets the preedit attributes data.
+ *
+ * @param[out] attrs The preedit attributes data.
+ */
+ void GetPreeditStyle( PreEditAttributeDataContainer& attrs ) const;
+
public:
// Signals