MCPcopy Create free account
hub / github.com/HumbleUI/JWM / TextInputClient

Interface TextInputClient

shared/java/TextInputClient.java:5–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import io.github.humbleui.types.*;
4
5public interface TextInputClient {
6 /**
7 * <p>Get UI rect in screen space for currently edited text region.</p>
8 *
9 * <p>This method is called if user currently in complex text input and IME mode types complex characters.</p>
10 * <p>Returned rect is used to correctly position IME and system pop-up windows and elements nearly the edited text region.</p>
11 *
12 * @param selectionStart edited text region string start
13 * @param selectionEnd edited text region string end
14 * @return ui screen rect
15 *
16 * @see <a href="https://github.com/HumbleUI/JWM/blob/main/examples/java/io/github/humbleui/jwm/examples/PanelTextInput.java">Text input example</a>
17 */
18 IRect getRectForMarkedRange(int selectionStart, int selectionEnd);
19
20 /**
21 * Returns the range of selected text
22 */
23 IRange getSelectedRange();
24
25 /**
26 * Returns the range of marked text
27 */
28 IRange getMarkedRange();
29
30 /**
31 * Returns part of the edited string
32 */
33 String getSubstring(int start, int end);
34}

Callers

nothing calls this directly

Implementers 1

PanelTextInputexamples/dashboard/java/PanelTextInput

Calls

no outgoing calls

Tested by

no test coverage detected