Class cc.IMEDispatcher
- Defined in: CCIMEDispatcher.js
- Extends cc.Class
Constructor Attributes | Constructor Name and Description |
---|---|
Input Method Edit Message Dispatcher.
|
Method Summary
Class Detail
cc.IMEDispatcher()
Input Method Edit Message Dispatcher.
Field Detail
<static>
{object}
cc.IMEDispatcher.instance
Method Detail
-
addDelegate(delegate)Add delegate to concern ime msg
//example cc.IMEDispatcher.getInstance().addDelegate(this);
- Parameters:
- {cc.IMEDelegate} delegate
-
{Boolean} attachDelegateWithIME(delegate)Attach the pDeleate with ime.
//example var ret = cc.IMEDispatcher.getInstance().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.getInstance().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}
-
Returns the shared CCIMEDispatcher object for the system.
- Returns:
- {cc.IMEDispatcher}
-
processKeycode(keyCode)Process keydown's keycode
//example document.addEventListener("keydown", function (e) { cc.IMEDispatcher.getInstance().processKeycode(e.keyCode); });
- Parameters:
- {Number} keyCode
-
removeDelegate(delegate)Remove the delegate from the delegates who concern ime msg
//example cc.IMEDispatcher.getInstance().removeDelegate(this);
- Parameters:
- {cc.IMEDelegate} delegate