My Project
GUIIMEDelegate.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
5  class CIMEDelegateProxy;
6 
11  {
12  public:
13  virtual ~GUIIMEDelegate();
14  virtual bool attachWithIME();
15  virtual bool detachWithIME();
16 
17  protected:
22  virtual bool canAttachWithIME() { return false; }
23 
27  virtual void didAttachWithIME() {}
28 
32  virtual bool canDetachWithIME() { return false; }
33 
37  virtual void didDetachWithIME() {}
38 
42  virtual void insertText(const char * text, size_t len) { }
43 
47  virtual void deleteBackward() {}
48 
52  virtual const std::string& getContentText() { return CGlobals::GetString(); }
53 
54  protected:
56 
57  friend class CIMEDelegateProxy;
58  CIMEDelegateProxy* GetIMEDelegateProxy();
59 #ifdef PARAENGINE_MOBILE
60  std::unique_ptr<CIMEDelegateProxy> m_delegate;
61 #endif
62  };
63 
64 }
65 
66 
67 
virtual void didDetachWithIME()
When the delegate detaches from the IME, this method is called by IMEDispatcher.
Definition: GUIIMEDelegate.h:37
virtual void didAttachWithIME()
When the delegate detaches from the IME, this method is called by IMEDispatcher.
Definition: GUIIMEDelegate.h:27
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual bool canAttachWithIME()
Decide if the delegate instance is ready to receive an IME message.
Definition: GUIIMEDelegate.h:22
virtual bool canDetachWithIME()
Decide if the delegate instance can stop receiving IME messages.
Definition: GUIIMEDelegate.h:32
static const string & GetString(int nStringID=0)
get static string used in the game engine.
Definition: Globals.cpp:168
virtual void deleteBackward()
Called by IMEDispatcher after the user clicks the backward key.
Definition: GUIIMEDelegate.h:47
base interface for cross-platform IME and also null implementation under win32 client.
Definition: GUIIMEDelegate.h:10
virtual const std::string & getContentText()
Called by IMEDispatcher for text stored in delegate.
Definition: GUIIMEDelegate.h:52
virtual void insertText(const char *text, size_t len)
Called by IMEDispatcher when text input received from the IME.
Definition: GUIIMEDelegate.h:42