Class InputMethodContext

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    Specifically manages the input method framework (IMF) that enables the virtual or hardware keyboards.

    public class InputMethodContext : BaseHandle, INotifyPropertyChanged, IDisposable
    Inheritance
    object
    BindableObject
    Tizen.NUI.Binding.Element
    BaseHandle
    InputMethodContext
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Constructors

    View Source

    InputMethodContext()

    Constructor.

    Declaration
    [Obsolete("Deprecated in API8; Will be removed in API10")]
    public InputMethodContext()

    Properties

    View Source

    TextPrediction

    Gets or sets whether the IM context allows to use the text prediction.

    Declaration
    public bool TextPrediction { get; set; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    Activate()

    Activates the IMF.
    It means that the text editing has started.
    If the hardware keyboard is not connected, then it shows the virtual keyboard.

    Declaration
    public void Activate()
    View Source

    AutoEnableInputPanel(bool)

    Enables to show the input panel automatically when focused.

    Declaration
    public void AutoEnableInputPanel(bool enabled)
    Parameters
    Type Name Description
    bool enabled

    If true, the input panel will be shown when focused.

    View Source

    Deactivate()

    Deactivates the IMF.
    It means that the text editing is complete.

    Declaration
    public void Deactivate()
    View Source

    DestroyContext()

    Destroys the context of the IMF.

    Declaration
    public void DestroyContext()
    View Source

    GetCursorPosition()

    Gets the cursor position stored in VirtualKeyboard, this is required by the IMF context.

    Declaration
    public uint GetCursorPosition()
    Returns
    Type Description
    uint

    The current position of the cursor.

    View Source

    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() must be called after Show().

    Declaration
    public Rectangle GetInputMethodArea()
    Returns
    Type Description
    Rectangle

    Rectangle which is keyboard panel x, y, width, and height.

    View Source

    GetInputPanelLanguage()

    Gets the language of the input panel.

    Declaration
    public InputMethodContext.InputPanelLanguage GetInputPanelLanguage()
    Returns
    Type Description
    InputMethodContext.InputPanelLanguage

    The language of the input panel

    View Source

    GetInputPanelLocale()

    Gets the current language locale of the input panel.
    For example, en_US, en_GB, en_PH, fr_FR, and so on.

    Declaration
    public string GetInputPanelLocale()
    Returns
    Type Description
    string

    The current language locale of the input panel.

    View Source

    GetInputPanelState()

    Gets the state of the current active input panel.

    Declaration
    public InputMethodContext.State GetInputPanelState()
    Returns
    Type Description
    InputMethodContext.State

    The state of the input panel.

    View Source

    GetInputPanelUserData(out string)

    Gets the specific data of the current active input panel.

    Declaration
    public void GetInputPanelUserData(out string text)
    Parameters
    Type Name Description
    string text

    The specific data to be received from the input panel.

    View Source

    GetKeyboardType()

    Gets the keyboard type.
    The default keyboard type is SoftwareKeyboard.

    Declaration
    public InputMethodContext.KeyboardType GetKeyboardType()
    Returns
    Type Description
    InputMethodContext.KeyboardType

    The keyboard type.

    View Source

    GetSurroundingText()

    Gets the current text string set within the IMF manager, this is used to offer predictive suggestions.

    Declaration
    public string GetSurroundingText()
    Returns
    Type Description
    string

    The surrounding text.

    View Source

    GetTextDirection()

    Returns the text direction of the current input language of the keyboard.

    Declaration
    public InputMethodContext.TextDirection GetTextDirection()
    Returns
    Type Description
    InputMethodContext.TextDirection

    The direction of the text.

    View Source

    HideInputPanel()

    Hides the input panel. This method hides the on-screen keyboard or input panel associated with the current InputMethodContext instance.

    Declaration
    public void HideInputPanel()
    View Source

    NotifyCursorPosition()

    Notifies the IMF context that the cursor position has changed, required for features such as auto-capitalization.

    Declaration
    public void NotifyCursorPosition()
    View Source

    NotifyTextInputMultiLine(bool)

    Notifies the IMF context that text input is set to multiline or not.

    Declaration
    public void NotifyTextInputMultiLine(bool multiLine)
    Parameters
    Type Name Description
    bool multiLine

    True if multiline text input is used.

    View Source

    Reset()

    Sends a message reset to the pre-edit state or the IMF module.

    Declaration
    public void Reset()
    View Source

    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 the focus is regained.

    Declaration
    public bool RestoreAfterFocusLost()
    Returns
    Type Description
    bool

    The restoration status.

    View Source

    SetCursorPosition(uint)

    Sets the cursor position stored in VirtualKeyboard, this is required by the IMF context.

    Declaration
    public void SetCursorPosition(uint cursorPosition)
    Parameters
    Type Name Description
    uint cursorPosition

    The position of the cursor.

    View Source

    SetInputPanelLanguage(InputPanelLanguage)

    Sets the language of the input panel.

    Declaration
    public void SetInputPanelLanguage(InputMethodContext.InputPanelLanguage language)
    Parameters
    Type Name Description
    InputMethodContext.InputPanelLanguage language

    The language to be set to the input panel

    View Source

    SetInputPanelPosition(uint, uint)

    Sets the x,y coordinates of the input panel.

    Declaration
    public void SetInputPanelPosition(uint x, uint y)
    Parameters
    Type Name Description
    uint x

    The top-left x coordinate of the input panel.

    uint y

    The top-left y coordinate of the input panel.

    View Source

    SetInputPanelUserData(string)

    Sets up the input panel specific data.

    Declaration
    public void SetInputPanelUserData(string text)
    Parameters
    Type Name Description
    string text

    The specific data to be set to the input panel.

    View Source

    SetMIMEType(string)

    Sets the allowed MIME Type to deliver to the input panel.
    For example, string mimeType = "text/plain,image/png,image/gif,application/pdf";

    Declaration
    public void SetMIMEType(string mimeType)
    Parameters
    Type Name Description
    string mimeType

    The allowed MIME type.

    View Source

    SetRestoreAfterFocusLost(bool)

    Sets the status whether the IMF has to restore the keyboard after losing focus.

    Declaration
    public void SetRestoreAfterFocusLost(bool toggle)
    Parameters
    Type Name Description
    bool toggle

    True means that keyboard must be restored after the focus is lost and regained.

    View Source

    SetReturnKeyState(bool)

    Sets the return key on the input panel to be visible or invisible.
    The default value is true.

    Declaration
    public void SetReturnKeyState(bool visible)
    Parameters
    Type Name Description
    bool visible

    True if the return key is visible (enabled), false otherwise.

    View Source

    SetSurroundingText(string)

    A method to store the string required by the IMF, this is used to provide predictive word suggestions.

    Declaration
    public void SetSurroundingText(string text)
    Parameters
    Type Name Description
    string text

    The text string surrounding the current cursor point.

    View Source

    ShowInputPanel()

    Shows the input panel.

    Declaration
    public void ShowInputPanel()

    Events

    View Source

    Activated

    Event handler for the activation of the InputMethodContext.

    Declaration
    public event EventHandler<InputMethodContext.ActivatedEventArgs> Activated
    Event Type
    Type Description
    System.EventHandler<TEventArgs><InputMethodContext.ActivatedEventArgs>
    View Source

    EventReceived

    This event handler is used to receive events related to the InputMethodContext.

    Declaration
    public event EventHandlerWithReturnType<object, InputMethodContext.EventReceivedEventArgs, InputMethodContext.CallbackData> EventReceived
    Event Type
    Type Description
    EventHandlerWithReturnType<object, InputMethodContext.EventReceivedEventArgs, InputMethodContext.CallbackData>
    View Source

    KeyboardTypeChanged

    Event handler for InputMethodContext keyboard type changed.

    Declaration
    public event EventHandler<InputMethodContext.KeyboardTypeChangedEventArgs> KeyboardTypeChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><InputMethodContext.KeyboardTypeChangedEventArgs>
    View Source

    LanguageChanged

    This event is triggered when the language of the InputMethodContext changes.

    Declaration
    public event EventHandler<InputMethodContext.LanguageChangedEventArgs> LanguageChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><InputMethodContext.LanguageChangedEventArgs>
    View Source

    Resized

    Event handler for the InputMethodContext resized event.

    Declaration
    public event EventHandler<InputMethodContext.ResizedEventArgs> Resized
    Event Type
    Type Description
    System.EventHandler<TEventArgs><InputMethodContext.ResizedEventArgs>
    View Source

    StatusChanged

    The StatusChanged event is triggered when the input method context status changes.

    Declaration
    public event EventHandler<InputMethodContext.StatusChangedEventArgs> StatusChanged
    Event Type
    Type Description
    System.EventHandler<TEventArgs><InputMethodContext.StatusChangedEventArgs>

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX