docs
Loading...
Searching...
No Matches
EditableState

#include <Ultralight/Editor.h>

Overview

The conditions that decide whether an input method should be active.

Reported through EditorListener::OnChangeEditableState(). An input method or on-screen keyboard should be active when both view_has_focus and is_mutable are true.

Note
This is reported when focus moves, not when the focused element moves or resizes. To follow the caret, use Editor::GetCaretBounds().
See also
EditorListener::OnChangeEditableState()

Public Attributes

EditableType type = EditableType::None
 The kind of element that holds keyboard focus.
bool is_mutable = false
 Whether or not the focused element accepts typed text (false for a read-only or disabled text control, and always false when type is None or Other).
bool view_has_focus = false
 Whether or not the View itself has input focus (see View::Focus() and View::Unfocus()).
InputMode input_mode = InputMode::Unspecified
 The focused element's inputmode hint.
EnterKeyHint enter_key_hint = EnterKeyHint::Unspecified
 The focused element's enterkeyhint.
Rect bounds = { 0.0f, 0.0f, 0.0f, 0.0f }
 The focused element's bounds in viewport CSS pixels (the same space as View::FireMouseEvent()).

Member Data Documentation

◆ bounds

Rect bounds = { 0.0f, 0.0f, 0.0f, 0.0f }

The focused element's bounds in viewport CSS pixels (the same space as View::FireMouseEvent()).

All-zero when no element has focus.

◆ enter_key_hint

The focused element's enterkeyhint.

◆ input_mode

The focused element's inputmode hint.

◆ is_mutable

bool is_mutable = false

Whether or not the focused element accepts typed text (false for a read-only or disabled text control, and always false when type is None or Other).

◆ type

The kind of element that holds keyboard focus.

◆ view_has_focus

bool view_has_focus = false

Whether or not the View itself has input focus (see View::Focus() and View::Unfocus()).


The documentation for this struct was generated from the following file: