-
addDelegate(delegate)
Add delegate to concern ime msg
//example
cc.imeDispatcher.addDelegate(this);
- Parameters:
-
{cc.IMEDelegate} delegate
-
{Boolean}
attachDelegateWithIME(delegate)
Attach the pDeleate with ime.
//example
var ret = cc.imeDispatcher.attachDelegateWithIME(this);
- Parameters:
-
{cc.IMEDelegate} delegate
- Returns:
- {Boolean} If the old delegate can detattach with ime and the new delegate can attach with ime, return true, otherwise return false.
-
ctor()
Constructor
-
{Boolean}
detachDelegateWithIME(delegate)
Detach the pDeleate with ime.
//example
var ret = cc.imeDispatcher.detachDelegateWithIME(this);
- Parameters:
-
{cc.IMEDelegate} delegate
- Returns:
- {Boolean} If the old delegate can detattach with ime and the new delegate can attach with ime, return true, otherwise return false.
-
dispatchDeleteBackward()
Dispatch the delete backward operation
-
dispatchInsertText(text, len)
Dispatch the input text from ime
- Parameters:
-
{String} text
-
{Number} len
-
dispatchKeyboardDidHide(info)
Dispatch keyboard notification
- Parameters:
-
{cc.IMEKeyboardNotificationInfo} info
-
dispatchKeyboardDidShow(info)
Dispatch keyboard notification
- Parameters:
-
{cc.IMEKeyboardNotificationInfo} info
-
dispatchKeyboardWillHide(info)
Dispatch keyboard notification
- Parameters:
-
{cc.IMEKeyboardNotificationInfo} info
-
dispatchKeyboardWillShow(info)
Dispatch keyboard notification
- Parameters:
-
{cc.IMEKeyboardNotificationInfo} info
-
{String}
getContentText()
Get the content text, which current CCIMEDelegate which attached with IME has.
- Returns:
- {String}
-
processKeycode(keyCode)
Process keydown's keycode
//example
document.addEventListener("keydown", function (e) {
cc.imeDispatcher.processKeycode(e.keyCode);
});
- Parameters:
-
{Number} keyCode
-
removeDelegate(delegate)
Remove the delegate from the delegates who concern ime msg
//example
cc.imeDispatcher.removeDelegate(this);
- Parameters:
-
{cc.IMEDelegate} delegate