Class ImfManager
Definition
- Assembly:
- Tizen.NUI.dll
Specifically manages the input method framework which enables the virtual or hardware keyboards.
C#Copypublic class ImfManager : BaseHandle, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic ImfManager()
Methods
Activate()
Activates the IMF.
It means that the text editing is started somewhere.
If the hardware keyboard isn't connected, then it will show the virtual keyboard.
Declaration
C#Copypublic void Activate()
Declaration
C#Copypublic void AutoEnableInputPanel(bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | enabled | If true, the input panel will be shown when focused. |
Declaration
C#Copypublic void Deactivate()
Declaration
C#Copypublic static ImfManager Get()
Returns
| Type | Description |
|---|---|
| ImfManager | A handle to the ImfManager. |
GetCursorPosition()
Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
Declaration
C#Copypublic uint GetCursorPosition()
Returns
| Type | Description |
|---|---|
| uint | The current position of the cursor. |
GetInputMethodArea()
Provides the size and the position of the keyboard.
The position is relative to whether the keyboard is visible or not.
If the keyboard is not visible, then the position will be off the screen.
If the keyboard is not being shown when this method is called, the keyboard is partially setup (IMFContext) to get/>
the values then taken down. So ideally, GetInputMethodArea() should be called after Show().
Declaration
C#Copypublic Rectangle GetInputMethodArea()
Returns
| Type | Description |
|---|---|
| Rectangle | Rectangle which is keyboard panel x, y, width, height. |
GetInputPanelLocale()
Gets the current language locale of the input panel.
For example, en_US, en_GB, en_PH, fr_FR, ...
Declaration
C#Copypublic string GetInputPanelLocale()
Returns
| Type | Description |
|---|---|
| string | The current language locale of the input panel. |
Declaration
C#Copypublic ImfManager.State GetInputPanelState()
Returns
| Type | Description |
|---|---|
| ImfManager.State | The state of the input panel. |
GetInputPanelUserData(out string)
Gets the specific data of the current active input panel.
Declaration
C#Copypublic void GetInputPanelUserData(out string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The specific data to be received from the input panel. |
GetKeyboardType()
Gets the keyboard type.
The default keyboard type is SoftwareKeyboard.
Declaration
C#Copypublic ImfManager.KeyboardType GetKeyboardType()
Returns
| Type | Description |
|---|---|
| ImfManager.KeyboardType | The keyboard type. |
GetSurroundingText()
Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.
Declaration
C#Copypublic string GetSurroundingText()
Returns
| Type | Description |
|---|---|
| string | The surrounding text. |
Declaration
C#Copypublic ImfManager.TextDirection GetTextDirection()
Returns
| Type | Description |
|---|---|
| ImfManager.TextDirection | The direction of the text. |
Declaration
C#Copypublic void HideInputPanel()
NotifyCursorPosition()
Notifies the IMF context that the cursor position has changed, required for features like auto-capitalization.
Declaration
C#Copypublic void NotifyCursorPosition()
NotifyTextInputMultiLine(bool)
Notifies the IMF context that text input is set to multiline or not.
Declaration
C#Copypublic void NotifyTextInputMultiLine(bool multiLine)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | multiLine | True if multiline text input is used. |
Declaration
C#Copypublic void Reset()
RestoreAfterFocusLost()
Gets the restoration status which controls if the keyboard is restored after the focus is lost and then regained.
If true, then the keyboard will be restored (activated) after focus is regained.
Declaration
C#Copypublic bool RestoreAfterFocusLost()
Returns
| Type | Description |
|---|---|
| bool | The restoration status. |
SetCursorPosition(uint)
Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.
Declaration
C#Copypublic void SetCursorPosition(uint cursorPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | cursorPosition | The position of the cursor. |
Declaration
C#Copypublic void SetInputPanelUserData(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The specific data to be set to the input panel. |
SetRestoreAfterFocusLost(bool)
Sets the status whether the IMF has to restore the keyboard after losing focus.
Declaration
C#Copypublic void SetRestoreAfterFocusLost(bool toggle)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | toggle | True means that keyboard should be restored after the focus is lost and regained. |
SetReturnKeyState(bool)
Sets the return key on the input panel to be visible or invisible.
The default is true.
Declaration
C#Copypublic void SetReturnKeyState(bool visible)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | visible | True if the return key is visible (enabled), false otherwise. |
SetSurroundingText(string)
A method to store the string required by the IMF, this is used to provide predictive word suggestions.
Declaration
C#Copypublic void SetSurroundingText(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text string surrounding the current cursor point. |
Declaration
C#Copypublic void ShowInputPanel()
Events
Declaration
C#Copypublic event EventHandler<ImfManager.ActivatedEventArgs> Activated
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><ImfManager.ActivatedEventArgs> |
Declaration
C#Copypublic event EventHandlerWithReturnType<object, ImfManager.EventReceivedEventArgs, ImfManager.ImfCallbackData> EventReceived
Event Type
| Type | Description |
|---|---|
| EventHandlerWithReturnType<object, ImfManager.EventReceivedEventArgs, ImfManager.ImfCallbackData> |
Declaration
C#Copypublic event EventHandler<ImfManager.KeyboardTypeChangedEventArgs> KeyboardTypeChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><ImfManager.KeyboardTypeChangedEventArgs> |
Declaration
C#Copypublic event EventHandler<ImfManager.LanguageChangedEventArgs> LanguageChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><ImfManager.LanguageChangedEventArgs> |
Declaration
C#Copypublic event EventHandler<ImfManager.ResizedEventArgs> Resized
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><ImfManager.ResizedEventArgs> |
Declaration
C#Copypublic event EventHandler<ImfManager.StatusChangedEventArgs> StatusChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><ImfManager.StatusChangedEventArgs> |