123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- #ifndef __CC_IME_DISPATCHER_H__
- #define __CC_IME_DISPATCHER_H__
- #include "base/CCIMEDelegate.h"
- NS_CC_BEGIN
- class CC_DLL IMEDispatcher
- {
- public:
-
- ~IMEDispatcher();
-
- static IMEDispatcher* sharedDispatcher();
-
- void dispatchInsertText(const char * text, size_t len);
-
- void dispatchDeleteBackward();
-
- void dispatchControlKey(EventKeyboard::KeyCode keyCode);
-
- const std::string& getContentText();
-
-
-
-
- void dispatchKeyboardWillShow(IMEKeyboardNotificationInfo& info);
-
- void dispatchKeyboardDidShow(IMEKeyboardNotificationInfo& info);
-
- void dispatchKeyboardWillHide(IMEKeyboardNotificationInfo& info);
-
- void dispatchKeyboardDidHide(IMEKeyboardNotificationInfo& info);
- protected:
- friend class IMEDelegate;
-
- void addDelegate(IMEDelegate * delegate);
-
- bool attachDelegateWithIME(IMEDelegate * delegate);
-
- bool detachDelegateWithIME(IMEDelegate * delegate);
-
- void removeDelegate(IMEDelegate * delegate);
- private:
- IMEDispatcher();
-
- class Impl;
- Impl * _impl;
- };
- NS_CC_END
- #endif
|