Class Index | File Index

Classes


Class cc.IMEDispatcher


Extends cc.Class.

Defined in: CCIMEDispatcher.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Input Method Edit Message Dispatcher.
Field Summary
Field Attributes Field Name and Description
<static>  
cc.IMEDispatcher.instance
Method Summary
Method Attributes Method Name and Description
 
addDelegate(delegate)
Add delegate to concern ime msg
 
Attach the pDeleate with ime.
 
ctor()
Constructor
 
Detach the pDeleate with ime.
 
Dispatch the delete backward operation
 
dispatchInsertText(text, len)
Dispatch the input text from ime
 
Dispatch keyboard notification
 
Dispatch keyboard notification
 
Dispatch keyboard notification
 
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
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}

<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

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 09 2013 07:51:51 GMT-0800 (PST)