Class cc.IMEDispatcher
Extends
cc.Class.
Defined in: CCIMEDispatcher.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Input Method Edit Message Dispatcher.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
cc.IMEDispatcher.instance
|
Method Attributes | Method Name and Description |
---|---|
addDelegate(delegate)
Add delegate to concern ime msg
|
|
attachDelegateWithIME(delegate)
Attach the pDeleate with ime.
|
|
ctor()
Constructor
|
|
detachDelegateWithIME(delegate)
Detach the pDeleate with ime.
|
|
Dispatch the delete backward operation
|
|
dispatchInsertText(text, len)
Dispatch the input text from ime
|
|
dispatchKeyboardDidHide(info)
Dispatch keyboard notification
|
|
dispatchKeyboardDidShow(info)
Dispatch keyboard notification
|
|
dispatchKeyboardWillHide(info)
Dispatch keyboard notification
|
|
dispatchKeyboardWillShow(info)
Dispatch keyboard notification
|
|
Get the content text, which current CCIMEDelegate which attached with IME has.
|
|
<static> |
cc.IMEDispatcher.getInstance()
Returns the shared CCIMEDispatcher object for the system.
|
init()
|
|
processKeycode(keyCode)
Process keydown's keycode
|
|
removeDelegate(delegate)
Remove the delegate from the delegates who concern ime msg
|
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}
<static>
{cc.IMEDispatcher}
cc.IMEDispatcher.getInstance()
Returns the shared CCIMEDispatcher object for the system.
- Returns:
- {cc.IMEDispatcher}
init()
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