Provides an interface to interact with the system software keyboard.
Derive this class to interact with the system software keyboard. Use this class to specify the type of input you would like to receive as well as what to do with the input. Will also get notified when the keyboard has been hidden by the OS.
#include <platform/YiKeyboardInputBridge.h>

Classes | |
| struct | Description |
| Provides details to the system software keyboard. More... | |
Public Member Functions | |
| virtual | ~Receiver () |
| virtual bool | OnTextEntered (const CYIString &text, int32_t nCursor)=0 |
| virtual bool | OnTextDeleted (int32_t nBeforeCursor, int32_t nAfterCursor)=0 |
| virtual void | OnTextReplaced (const CYIString &text, int32_t nCursor)=0 |
| virtual void | OnCursorPositionChanged (int32_t nCursor)=0 |
| virtual bool | OnKeyboardHidden ()=0 |
| virtual void | OnSynchronizeKeyboard (Description &receiverKeyboardInfo) |
| virtual INPUT_TYPE | GetInputType () const |
| RETURN_KEY_TYPE | GetReturnKeyType () const |
| void | SetReturnKeyType (RETURN_KEY_TYPE eKeyType) |
| virtual bool | OnSetComposingText (const CYIString &text, int32_t nCursor)=0 |
| virtual bool | OnFinishComposingText ()=0 |
| virtual bool | OnSetComposingRegion (int32_t nStart, int32_t nEnd)=0 |
| virtual bool | OnTextPasted (const CYIString &text)=0 |
Public Attributes | |
| CYISignal< CYIKeyboardInputBridge::Receiver * > | ReturnKeyPressed |
Protected Member Functions | |
| Receiver () | |
Protected Attributes | |
| RETURN_KEY_TYPE | m_keyType |
|
inlinevirtual |
|
inlineprotected |
|
inlinevirtual |
Returns CYIKeyboardInputBridge::INPUT_TEXT by default.
Reimplemented in CYITextEditView.
|
inline |
Returns CYIKeyboardInputBridge::RETURN_KEY_DEFAULT by default.
|
pure virtual |
Called by the keyboard when the cursor position has changed. nCursor indicates the new cursor position in the existing text.
Implemented in CYITextEditView, and CYIPasswordTextEditView.
|
inlinepure virtual |
Called by the keyboard when text is finished composing. Any composing text will be removed.
Implemented in CYITextEditView.
|
pure virtual |
Called when the keyboard is hidden either by the user of the application, or programmatically.
Implemented in CYITextEditView.
|
inlinepure virtual |
Called by the keyboard to mark a certain region of text as the composing text.
Implemented in CYITextEditView.
|
inlinepure virtual |
Called by the keyboard when text is being composed. text contains the new composing text which replaces any previous composition text. nCursor is the new position of the cursor around the text. A value of 1 advances the cursor to the position after the new text. If >0 it is relative to the end of the text-1, if <= 0 it is relative to the start of the text.
Implemented in CYITextEditView.
|
virtual |
Called by the keyboard when the user opens the keyboard. Implementations must populate receiverKeyboardInfo.
|
pure virtual |
Called by the keyboard when text is deleted. The parameters indicate the number of characters before and after the current cursor position were deleted.
Implemented in CYITextEditView, and CYIPasswordTextEditView.
|
pure virtual |
Called by the keyboard when text is entered. text contains the new text, and nCursor is the new position of the cursor around the text. A value of 1 advances the cursor to the position after the new text. If >0 it is relative to the end of the text-1, if <= 0 it is relative to the start of the text.
Implemented in CYITextEditView.
|
pure virtual |
Called by the keyboard when text is pasted. text contains the new text which should be inserted where the cursor is, and the cursor should be moved to the end of the pasted text.
Implemented in CYITextEditView, and CYIPasswordTextEditView.
|
pure virtual |
Called by the keyboard when the text is replaced. text contains the new text which replaces any existing text, and nCursor indicates the cursor position in the new text.
Implemented in CYITextEditView, and CYIPasswordTextEditView.
|
inline |
Set the type of return key to be used when the keyboard is shown.
|
protected |
| CYISignal<CYIKeyboardInputBridge::Receiver *> CYIKeyboardInputBridge::Receiver::ReturnKeyPressed |