Vixen
02b45cc4
csharp
public interface ITextInput

Text entry, including composition through an input method.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Off by default, and that is not an optimisation. While text input is active the platform hands keystrokes to the IME first, so W may produce a composition instead of a key the game can bind — which is correct in a chat box and wrong everywhere else. So a text field turns it on when it takes focus and off when it loses it, and the rest of the time the keyboard is a set of keys.

SetCandidateArea is the part that is easy to skip and immediately visible to anyone typing Japanese, Chinese or Korean: without it the candidate window is drawn at the corner of the screen, covering something, instead of under the caret.

Fields and properties (4)

  • bool IsActive

    Whether text input is running.

  • bool HasOnScreenKeyboard

    Whether this platform shows an on-screen keyboard when text input starts.

  • bool IsOnScreenKeyboardVisible

    Whether an on-screen keyboard is showing now.

  • Rectangle OnScreenKeyboardArea

    The area the on-screen keyboard is covering, in logical points relative to the window — Empty when nothing is covered.

Methods (3)

  • void Activate(IWindow window)

    Starts text input for a window.

  • void Deactivate()

    Stops text input, abandoning any composition in progress.

  • void SetCandidateArea(IWindow window, Rectangle area)

    Tells the IME where the caret is, so the candidate window can be put near it.

Used by (6)

  • DesktopPlatformVixen.Platform.Desktop
  • DesktopTextInputVixen.Platform.Desktop
  • HeadlessLifecycleTestsVixen.Platform.Headless.Tests
  • HeadlessPlatformVixen.Platform.Headless
  • HeadlessTextInputVixen.Platform.Headless
  • IPlatformVixen.Platform