Debian Codegraph @

doc/classes/LineEdit.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="LineEdit" inherits="Control" keywords="text, input" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 An input field for single-line text.
5 </brief_description>
6 <description>
7 [LineEdit] provides an input field for editing a single line of text.
8 - When the [LineEdit] control is focused using the keyboard arrow keys, it will only gain focus and not enter edit mode.
9 - To enter edit mode, click on the control with the mouse, see also [member keep_editing_on_text_submit].
10 - To exit edit mode, press [code]ui_text_submit[/code] or [code]ui_cancel[/code] (by default [kbd]Escape[/kbd]) actions.
11 - Check [method edit], [method unedit], [method is_editing], and [signal editing_toggled] for more information.
12 While entering text, it is possible to insert special characters using Unicode, OEM or Windows alt codes:
13 - To enter Unicode codepoints, hold [kbd]Alt[/kbd] and type the codepoint on the numpad. For example, to enter the character [code]á[/code] (U+00E1), hold [kbd]Alt[/kbd] and type [kbd]+E1[/kbd] on the numpad (the leading zeroes can be omitted).
14 - To enter OEM codepoints, hold [kbd]Alt[/kbd] and type the code on the numpad. For example, to enter the character [code]á[/code] (OEM 160), hold [kbd]Alt[/kbd] and type [code]160[/code] on the numpad.
15 - To enter Windows codepoints, hold [kbd]Alt[/kbd] and type the code on the numpad. For example, to enter the character [code]á[/code] (Windows 0225), hold [kbd]Alt[/kbd] and type [kbd]0[/kbd], [kbd]2[/kbd], [kbd]2[/kbd], [kbd]5[/kbd] on the numpad. The leading zero here must [b]not[/b] be omitted, as this is how Windows codepoints are distinguished from OEM codepoints.
16 [b]Important:[/b]
17 - Focusing the [LineEdit] with [code]ui_focus_next[/code] (by default [kbd]Tab[/kbd]) or [code]ui_focus_prev[/code] (by default [kbd]Shift + Tab[/kbd]) or [method Control.grab_focus] still enters edit mode (for compatibility).
18 [LineEdit] features many built-in shortcuts that are always available ([kbd]Ctrl[/kbd] here maps to [kbd]Cmd[/kbd] on macOS):
19 - [kbd]Ctrl + C[/kbd]: Copy
20 - [kbd]Ctrl + X[/kbd]: Cut
21 - [kbd]Ctrl + V[/kbd] or [kbd]Ctrl + Y[/kbd]: Paste/"yank"
22 - [kbd]Ctrl + Z[/kbd]: Undo
23 - [kbd]Ctrl + ~[/kbd]: Swap input direction.
24 - [kbd]Ctrl + Shift + Z[/kbd]: Redo
25 - [kbd]Ctrl + U[/kbd]: Delete text from the caret position to the beginning of the line
26 - [kbd]Ctrl + K[/kbd]: Delete text from the caret position to the end of the line
27 - [kbd]Ctrl + A[/kbd]: Select all text
28 - [kbd]Up Arrow[/kbd]/[kbd]Down Arrow[/kbd]: Move the caret to the beginning/end of the line
29 On macOS, some extra keyboard shortcuts are available:
30 - [kbd]Cmd + F[/kbd]: Same as [kbd]Right Arrow[/kbd], move the caret one character right
31 - [kbd]Cmd + B[/kbd]: Same as [kbd]Left Arrow[/kbd], move the caret one character left
32 - [kbd]Cmd + P[/kbd]: Same as [kbd]Up Arrow[/kbd], move the caret to the previous line
33 - [kbd]Cmd + N[/kbd]: Same as [kbd]Down Arrow[/kbd], move the caret to the next line
34 - [kbd]Cmd + D[/kbd]: Same as [kbd]Delete[/kbd], delete the character on the right side of caret
35 - [kbd]Cmd + H[/kbd]: Same as [kbd]Backspace[/kbd], delete the character on the left side of the caret
36 - [kbd]Cmd + A[/kbd]: Same as [kbd]Home[/kbd], move the caret to the beginning of the line
37 - [kbd]Cmd + E[/kbd]: Same as [kbd]End[/kbd], move the caret to the end of the line
38 - [kbd]Cmd + Left Arrow[/kbd]: Same as [kbd]Home[/kbd], move the caret to the beginning of the line
39 - [kbd]Cmd + Right Arrow[/kbd]: Same as [kbd]End[/kbd], move the caret to the end of the line
40 [b]Note:[/b] Caret movement shortcuts listed above are not affected by [member shortcut_keys_enabled].
41 </description>
42 <tutorials>
43 </tutorials>
44 <methods>
45 <method name="apply_ime">
46 <return type="void" />
47 <description>
48 Applies text from the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME) and closes the IME if it is open.
49 </description>
50 </method>
51 <method name="cancel_ime">
52 <return type="void" />
53 <description>
54 Closes the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME) if it is open. Any text in the IME will be lost.
55 </description>
56 </method>
57 <method name="clear">
58 <return type="void" />
59 <description>
60 Erases the [LineEdit]'s [member text].
61 </description>
62 </method>
63 <method name="delete_char_at_caret">
64 <return type="void" />
65 <description>
66 Deletes one character at the caret's current position (equivalent to pressing [kbd]Delete[/kbd]).
67 </description>
68 </method>
69 <method name="delete_text">
70 <return type="void" />
71 <param index="0" name="from_column" type="int" />
72 <param index="1" name="to_column" type="int" />
73 <description>
74 Deletes a section of the [member text] going from position [param from_column] to [param to_column]. Both parameters should be within the text's length.
75 </description>
76 </method>
77 <method name="deselect">
78 <return type="void" />
79 <description>
80 Clears the current selection.
81 </description>
82 </method>
83 <method name="edit">
84 <return type="void" />
85 <param index="0" name="hide_focus" type="bool" default="false" />
86 <description>
87 Allows entering edit mode whether the [LineEdit] is focused or not. If [param hide_focus] is [code]true[/code], the focused state will not be shown (see [method Control.grab_focus]).
88 See also [member keep_editing_on_text_submit].
89 </description>
90 </method>
91 <method name="get_menu" qualifiers="const">
92 <return type="PopupMenu" />
93 <description>
94 Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit].
95 You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see [enum MenuItems]). For example:
96 [codeblocks]
97 [gdscript]
98 func _ready():
99 var menu = get_menu()
100 # Remove all items after "Redo".
101 menu.item_count = menu.get_item_index(MENU_REDO) + 1
102 # Add custom items.
103 menu.add_separator()
104 menu.add_item("Insert Date", MENU_MAX + 1)
105 # Connect callback.
106 menu.id_pressed.connect(_on_item_pressed)
107
108 func _on_item_pressed(id):
109 if id == MENU_MAX + 1:
110 insert_text_at_caret(Time.get_date_string_from_system())
111 [/gdscript]
112 [csharp]
113 public override void _Ready()
114 {
115 var menu = GetMenu();
116 // Remove all items after "Redo".
117 menu.ItemCount = menu.GetItemIndex(LineEdit.MenuItems.Redo) + 1;
118 // Add custom items.
119 menu.AddSeparator();
120 menu.AddItem("Insert Date", LineEdit.MenuItems.Max + 1);
121 // Add event handler.
122 menu.IdPressed += OnItemPressed;
123 }
124
125 public void OnItemPressed(int id)
126 {
127 if (id == LineEdit.MenuItems.Max + 1)
128 {
129 InsertTextAtCaret(Time.GetDateStringFromSystem());
130 }
131 }
132 [/csharp]
133 [/codeblocks]
134 [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
135 </description>
136 </method>
137 <method name="get_next_composite_character_column" qualifiers="const">
138 <return type="int" />
139 <param index="0" name="column" type="int" />
140 <description>
141 Returns the correct column at the end of a composite character like ❤️‍🩹 (mending heart; Unicode: [code]U+2764 U+FE0F U+200D U+1FA79[/code]) which is comprised of more than one Unicode code point, if the caret is at the start of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters.
142 [b]Note:[/b] To check at caret location use [code]get_next_composite_character_column(get_caret_column())[/code]
143 </description>
144 </method>
145 <method name="get_previous_composite_character_column" qualifiers="const">
146 <return type="int" />
147 <param index="0" name="column" type="int" />
148 <description>
149 Returns the correct column at the start of a composite character like ❤️‍🩹 (mending heart; Unicode: [code]U+2764 U+FE0F U+200D U+1FA79[/code]) which is comprised of more than one Unicode code point, if the caret is at the end of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters.
150 [b]Note:[/b] To check at caret location use [code]get_previous_composite_character_column(get_caret_column())[/code]
151 </description>
152 </method>
153 <method name="get_scroll_offset" qualifiers="const">
154 <return type="float" />
155 <description>
156 Returns the scroll offset due to [member caret_column], as a number of characters.
157 </description>
158 </method>
159 <method name="get_selected_text">
160 <return type="String" />
161 <description>
162 Returns the text inside the selection.
163 </description>
164 </method>
165 <method name="get_selection_from_column" qualifiers="const">
166 <return type="int" />
167 <description>
168 Returns the selection begin column.
169 </description>
170 </method>
171 <method name="get_selection_to_column" qualifiers="const">
172 <return type="int" />
173 <description>
174 Returns the selection end column.
175 </description>
176 </method>
177 <method name="has_ime_text" qualifiers="const">
178 <return type="bool" />
179 <description>
180 Returns [code]true[/code] if the user has text in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME).
181 </description>
182 </method>
183 <method name="has_redo" qualifiers="const">
184 <return type="bool" />
185 <description>
186 Returns [code]true[/code] if a "redo" action is available.
187 </description>
188 </method>
189 <method name="has_selection" qualifiers="const">
190 <return type="bool" />
191 <description>
192 Returns [code]true[/code] if the user has selected text.
193 </description>
194 </method>
195 <method name="has_undo" qualifiers="const">
196 <return type="bool" />
197 <description>
198 Returns [code]true[/code] if an "undo" action is available.
199 </description>
200 </method>
201 <method name="insert_text_at_caret">
202 <return type="void" />
203 <param index="0" name="text" type="String" />
204 <description>
205 Inserts [param text] at the caret. If the resulting value is longer than [member max_length], nothing happens.
206 </description>
207 </method>
208 <method name="is_editing" qualifiers="const">
209 <return type="bool" />
210 <description>
211 Returns whether the [LineEdit] is being edited.
212 </description>
213 </method>
214 <method name="is_menu_visible" qualifiers="const">
215 <return type="bool" />
216 <description>
217 Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided).
218 </description>
219 </method>
220 <method name="menu_option">
221 <return type="void" />
222 <param index="0" name="option" type="int" />
223 <description>
224 Executes a given action as defined in the [enum MenuItems] enum.
225 </description>
226 </method>
227 <method name="select">
228 <return type="void" />
229 <param index="0" name="from" type="int" default="0" />
230 <param index="1" name="to" type="int" default="-1" />
231 <description>
232 Selects characters inside [LineEdit] between [param from] and [param to]. By default, [param from] is at the beginning and [param to] at the end.
233 [codeblocks]
234 [gdscript]
235 text = "Welcome"
236 select() # Will select "Welcome".
237 select(4) # Will select "ome".
238 select(2, 5) # Will select "lco".
239 [/gdscript]
240 [csharp]
241 Text = "Welcome";
242 Select(); // Will select "Welcome".
243 Select(4); // Will select "ome".
244 Select(2, 5); // Will select "lco".
245 [/csharp]
246 [/codeblocks]
247 </description>
248 </method>
249 <method name="select_all">
250 <return type="void" />
251 <description>
252 Selects the whole [String].
253 </description>
254 </method>
255 <method name="unedit">
256 <return type="void" />
257 <description>
258 Allows exiting edit mode while preserving focus.
259 </description>
260 </method>
261 </methods>
262 <members>
263 <member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
264 The text's horizontal alignment.
265 </member>
266 <member name="backspace_deletes_composite_character_enabled" type="bool" setter="set_backspace_deletes_composite_character_enabled" getter="is_backspace_deletes_composite_character_enabled" default="false">
267 If [code]true[/code] and [member caret_mid_grapheme] is [code]false[/code], backspace deletes an entire composite character such as ❤️‍🩹, instead of deleting part of the composite character.
268 </member>
269 <member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false">
270 If [code]true[/code], makes the caret blink.
271 </member>
272 <member name="caret_blink_interval" type="float" setter="set_caret_blink_interval" getter="get_caret_blink_interval" default="0.65">
273 The interval at which the caret blinks (in seconds).
274 </member>
275 <member name="caret_column" type="int" setter="set_caret_column" getter="get_caret_column" default="0">
276 The caret's column position inside the [LineEdit]. When set, the text may scroll to accommodate it.
277 </member>
278 <member name="caret_force_displayed" type="bool" setter="set_caret_force_displayed" getter="is_caret_force_displayed" default="false">
279 If [code]true[/code], the [LineEdit] will always show the caret, even if not editing or focus is lost.
280 </member>
281 <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false">
282 Allow moving caret, selecting and removing the individual composite character components.
283 [b]Note:[/b] [kbd]Backspace[/kbd] is always removing individual composite character components.
284 </member>
285 <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false">
286 If [code]true[/code], the [LineEdit] will show a clear button if [member text] is not empty, which can be used to clear the text quickly.
287 </member>
288 <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true">
289 If [code]true[/code], the context menu will appear when right-clicked.
290 </member>
291 <member name="deselect_on_focus_loss_enabled" type="bool" setter="set_deselect_on_focus_loss_enabled" getter="is_deselect_on_focus_loss_enabled" default="true">
292 If [code]true[/code], the selected text will be deselected when focus is lost.
293 </member>
294 <member name="drag_and_drop_selection_enabled" type="bool" setter="set_drag_and_drop_selection_enabled" getter="is_drag_and_drop_selection_enabled" default="true">
295 If [code]true[/code], allow drag and drop of selected text.
296 </member>
297 <member name="draw_control_chars" type="bool" setter="set_draw_control_chars" getter="get_draw_control_chars" default="false">
298 If [code]true[/code], control characters are displayed.
299 </member>
300 <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true" keywords="readonly, disabled, enabled">
301 If [code]false[/code], existing text cannot be modified and new text cannot be added.
302 </member>
303 <member name="emoji_menu_enabled" type="bool" setter="set_emoji_menu_enabled" getter="is_emoji_menu_enabled" default="true">
304 If [code]true[/code], "Emoji and Symbols" menu is enabled.
305 </member>
306 <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length_enabled" getter="is_expand_to_text_length_enabled" default="false">
307 If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened.
308 </member>
309 <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
310 If [code]true[/code], the [LineEdit] doesn't display decoration.
311 </member>
312 <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
313 <member name="icon_expand_mode" type="int" setter="set_icon_expand_mode" getter="get_icon_expand_mode" enum="LineEdit.ExpandMode" default="0">
314 Define the scaling behavior of the [member right_icon].
315 </member>
316 <member name="keep_editing_on_text_submit" type="bool" setter="set_keep_editing_on_text_submit" getter="is_editing_kept_on_text_submit" default="false">
317 If [code]true[/code], the [LineEdit] will not exit edit mode when text is submitted by pressing [code]ui_text_submit[/code] action (by default: [kbd]Enter[/kbd] or [kbd]Kp Enter[/kbd]).
318 </member>
319 <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
320 Language code used for line-breaking and text shaping algorithms. If left empty, the current locale is used instead.
321 </member>
322 <member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0">
323 Maximum number of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit.
324 When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting.
325 If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as a parameter:
326 [codeblocks]
327 [gdscript]
328 text = "Hello world"
329 max_length = 5
330 # `text` becomes "Hello".
331 max_length = 10
332 text += " goodbye"
333 # `text` becomes "Hello good".
334 # `text_change_rejected` is emitted with "bye" as a parameter.
335 [/gdscript]
336 [csharp]
337 Text = "Hello world";
338 MaxLength = 5;
339 // `Text` becomes "Hello".
340 MaxLength = 10;
341 Text += " goodbye";
342 // `Text` becomes "Hello good".
343 // `text_change_rejected` is emitted with "bye" as a parameter.
344 [/csharp]
345 [/codeblocks]
346 </member>
347 <member name="middle_mouse_paste_enabled" type="bool" setter="set_middle_mouse_paste_enabled" getter="is_middle_mouse_paste_enabled" default="true">
348 If [code]false[/code], using middle mouse button to paste clipboard will be disabled.
349 [b]Note:[/b] This method is only implemented on Linux.
350 </member>
351 <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" />
352 <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default="&quot;&quot;">
353 Text shown when the [LineEdit] is empty. It is [b]not[/b] the [LineEdit]'s default value (see [member text]).
354 </member>
355 <member name="right_icon" type="Texture2D" setter="set_right_icon" getter="get_right_icon">
356 Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to [code]false[/code].
357 </member>
358 <member name="right_icon_scale" type="float" setter="set_right_icon_scale" getter="get_right_icon_scale" default="1.0">
359 Scale ratio of the icon when [member icon_expand_mode] is set to [constant EXPAND_MODE_FIT_TO_LINE_EDIT].
360 </member>
361 <member name="secret" type="bool" setter="set_secret" getter="is_secret" default="false">
362 If [code]true[/code], every character is replaced with the secret character (see [member secret_character]).
363 </member>
364 <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default="&quot;•&quot;">
365 The character to use to mask secret input. Only a single character can be used as the secret character. If it is longer than one character, only the first one will be used. If it is empty, a space will be used instead.
366 </member>
367 <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false">
368 If [code]true[/code], the [LineEdit] will select the whole text when it gains focus.
369 </member>
370 <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true">
371 If [code]false[/code], it's impossible to select the text using mouse nor keyboard.
372 </member>
373 <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
374 If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled.
375 </member>
376 <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
377 Set BiDi algorithm override for the structured text.
378 </member>
379 <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
380 Set additional options for BiDi override.
381 </member>
382 <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
383 String value of the [LineEdit].
384 [b]Note:[/b] Changing text using this property won't emit the [signal text_changed] signal.
385 </member>
386 <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
387 Base text writing direction.
388 </member>
389 <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true">
390 If [code]true[/code], the native virtual keyboard is enabled on platforms that support it.
391 </member>
392 <member name="virtual_keyboard_show_on_focus" type="bool" setter="set_virtual_keyboard_show_on_focus" getter="get_virtual_keyboard_show_on_focus" default="true">
393 If [code]true[/code], the native virtual keyboard is shown on focus events on platforms that support it.
394 </member>
395 <member name="virtual_keyboard_type" type="int" setter="set_virtual_keyboard_type" getter="get_virtual_keyboard_type" enum="LineEdit.VirtualKeyboardType" default="0">
396 Specifies the type of virtual keyboard to show.
397 </member>
398 </members>
399 <signals>
400 <signal name="editing_toggled">
401 <param index="0" name="toggled_on" type="bool" />
402 <description>
403 Emitted when the [LineEdit] switches in or out of edit mode.
404 </description>
405 </signal>
406 <signal name="text_change_rejected">
407 <param index="0" name="rejected_substring" type="String" />
408 <description>
409 Emitted when appending text that overflows the [member max_length]. The appended text is truncated to fit [member max_length], and the part that couldn't fit is passed as the [param rejected_substring] argument.
410 </description>
411 </signal>
412 <signal name="text_changed">
413 <param index="0" name="new_text" type="String" />
414 <description>
415 Emitted when the text changes.
416 </description>
417 </signal>
418 <signal name="text_submitted">
419 <param index="0" name="new_text" type="String" />
420 <description>
421 Emitted when the user presses the [code]ui_text_submit[/code] action (by default: [kbd]Enter[/kbd] or [kbd]Kp Enter[/kbd]) while the [LineEdit] has focus.
422 </description>
423 </signal>
424 </signals>
425 <constants>
426 <constant name="MENU_CUT" value="0" enum="MenuItems">
427 Cuts (copies and clears) the selected text.
428 </constant>
429 <constant name="MENU_COPY" value="1" enum="MenuItems">
430 Copies the selected text.
431 </constant>
432 <constant name="MENU_PASTE" value="2" enum="MenuItems">
433 Pastes the clipboard text over the selected text (or at the caret's position).
434 Non-printable escape characters are automatically stripped from the OS clipboard via [method String.strip_escapes].
435 </constant>
436 <constant name="MENU_CLEAR" value="3" enum="MenuItems">
437 Erases the whole [LineEdit] text.
438 </constant>
439 <constant name="MENU_SELECT_ALL" value="4" enum="MenuItems">
440 Selects the whole [LineEdit] text.
441 </constant>
442 <constant name="MENU_UNDO" value="5" enum="MenuItems">
443 Undoes the previous action.
444 </constant>
445 <constant name="MENU_REDO" value="6" enum="MenuItems">
446 Reverse the last undo action.
447 </constant>
448 <constant name="MENU_SUBMENU_TEXT_DIR" value="7" enum="MenuItems">
449 ID of "Text Writing Direction" submenu.
450 </constant>
451 <constant name="MENU_DIR_INHERITED" value="8" enum="MenuItems">
452 Sets text direction to inherited.
453 </constant>
454 <constant name="MENU_DIR_AUTO" value="9" enum="MenuItems">
455 Sets text direction to automatic.
456 </constant>
457 <constant name="MENU_DIR_LTR" value="10" enum="MenuItems">
458 Sets text direction to left-to-right.
459 </constant>
460 <constant name="MENU_DIR_RTL" value="11" enum="MenuItems">
461 Sets text direction to right-to-left.
462 </constant>
463 <constant name="MENU_DISPLAY_UCC" value="12" enum="MenuItems">
464 Toggles control character display.
465 </constant>
466 <constant name="MENU_SUBMENU_INSERT_UCC" value="13" enum="MenuItems">
467 ID of "Insert Control Character" submenu.
468 </constant>
469 <constant name="MENU_INSERT_LRM" value="14" enum="MenuItems">
470 Inserts left-to-right mark (LRM) character.
471 </constant>
472 <constant name="MENU_INSERT_RLM" value="15" enum="MenuItems">
473 Inserts right-to-left mark (RLM) character.
474 </constant>
475 <constant name="MENU_INSERT_LRE" value="16" enum="MenuItems">
476 Inserts start of left-to-right embedding (LRE) character.
477 </constant>
478 <constant name="MENU_INSERT_RLE" value="17" enum="MenuItems">
479 Inserts start of right-to-left embedding (RLE) character.
480 </constant>
481 <constant name="MENU_INSERT_LRO" value="18" enum="MenuItems">
482 Inserts start of left-to-right override (LRO) character.
483 </constant>
484 <constant name="MENU_INSERT_RLO" value="19" enum="MenuItems">
485 Inserts start of right-to-left override (RLO) character.
486 </constant>
487 <constant name="MENU_INSERT_PDF" value="20" enum="MenuItems">
488 Inserts pop direction formatting (PDF) character.
489 </constant>
490 <constant name="MENU_INSERT_ALM" value="21" enum="MenuItems">
491 Inserts Arabic letter mark (ALM) character.
492 </constant>
493 <constant name="MENU_INSERT_LRI" value="22" enum="MenuItems">
494 Inserts left-to-right isolate (LRI) character.
495 </constant>
496 <constant name="MENU_INSERT_RLI" value="23" enum="MenuItems">
497 Inserts right-to-left isolate (RLI) character.
498 </constant>
499 <constant name="MENU_INSERT_FSI" value="24" enum="MenuItems">
500 Inserts first strong isolate (FSI) character.
501 </constant>
502 <constant name="MENU_INSERT_PDI" value="25" enum="MenuItems">
503 Inserts pop direction isolate (PDI) character.
504 </constant>
505 <constant name="MENU_INSERT_ZWJ" value="26" enum="MenuItems">
506 Inserts zero width joiner (ZWJ) character.
507 </constant>
508 <constant name="MENU_INSERT_ZWNJ" value="27" enum="MenuItems">
509 Inserts zero width non-joiner (ZWNJ) character.
510 </constant>
511 <constant name="MENU_INSERT_WJ" value="28" enum="MenuItems">
512 Inserts word joiner (WJ) character.
513 </constant>
514 <constant name="MENU_INSERT_SHY" value="29" enum="MenuItems">
515 Inserts soft hyphen (SHY) character.
516 </constant>
517 <constant name="MENU_EMOJI_AND_SYMBOL" value="30" enum="MenuItems">
518 Opens system emoji and symbol picker.
519 </constant>
520 <constant name="MENU_MAX" value="31" enum="MenuItems">
521 Represents the size of the [enum MenuItems] enum.
522 </constant>
523 <constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType">
524 Default text virtual keyboard.
525 </constant>
526 <constant name="KEYBOARD_TYPE_MULTILINE" value="1" enum="VirtualKeyboardType">
527 Multiline virtual keyboard.
528 </constant>
529 <constant name="KEYBOARD_TYPE_NUMBER" value="2" enum="VirtualKeyboardType">
530 Virtual number keypad, useful for PIN entry.
531 </constant>
532 <constant name="KEYBOARD_TYPE_NUMBER_DECIMAL" value="3" enum="VirtualKeyboardType">
533 Virtual number keypad, useful for entering fractional numbers.
534 </constant>
535 <constant name="KEYBOARD_TYPE_PHONE" value="4" enum="VirtualKeyboardType">
536 Virtual phone number keypad.
537 </constant>
538 <constant name="KEYBOARD_TYPE_EMAIL_ADDRESS" value="5" enum="VirtualKeyboardType">
539 Virtual keyboard with additional keys to assist with typing email addresses.
540 </constant>
541 <constant name="KEYBOARD_TYPE_PASSWORD" value="6" enum="VirtualKeyboardType">
542 Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
543 [b]Note:[/b] This is not supported on Web. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT].
544 </constant>
545 <constant name="KEYBOARD_TYPE_URL" value="7" enum="VirtualKeyboardType">
546 Virtual keyboard with additional keys to assist with typing URLs.
547 </constant>
548 <constant name="EXPAND_MODE_ORIGINAL_SIZE" value="0" enum="ExpandMode">
549 Use the original size for the right icon.
550 </constant>
551 <constant name="EXPAND_MODE_FIT_TO_TEXT" value="1" enum="ExpandMode">
552 Scale the right icon's size to match the size of the text.
553 </constant>
554 <constant name="EXPAND_MODE_FIT_TO_LINE_EDIT" value="2" enum="ExpandMode">
555 Scale the right icon to fit the LineEdit.
556 </constant>
557 </constants>
558 <theme_items>
559 <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
560 Color of the [LineEdit]'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely.
561 </theme_item>
562 <theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
563 Color used as default tint for the clear button.
564 </theme_item>
565 <theme_item name="clear_button_color_pressed" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
566 Color used for the clear button when it's pressed.
567 </theme_item>
568 <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
569 Default font color.
570 </theme_item>
571 <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
572 The tint of text outline of the [LineEdit].
573 </theme_item>
574 <theme_item name="font_placeholder_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.6)">
575 Font color for [member placeholder_text].
576 </theme_item>
577 <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
578 Font color for selected text (inside the selection rectangle).
579 </theme_item>
580 <theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
581 Font color when editing is disabled.
582 </theme_item>
583 <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.5, 0.5, 0.5, 1)">
584 Color of the selection rectangle.
585 </theme_item>
586 <theme_item name="caret_width" data_type="constant" type="int" default="1">
587 The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size.
588 </theme_item>
589 <theme_item name="minimum_character_width" data_type="constant" type="int" default="4">
590 Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this number of 'M' characters can be displayed without scrolling).
591 </theme_item>
592 <theme_item name="outline_size" data_type="constant" type="int" default="0">
593 The size of the text outline.
594 [b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
595 </theme_item>
596 <theme_item name="font" data_type="font" type="Font">
597 Font used for the text.
598 </theme_item>
599 <theme_item name="font_size" data_type="font_size" type="int">
600 Font size of the [LineEdit]'s text.
601 </theme_item>
602 <theme_item name="clear" data_type="icon" type="Texture2D">
603 Texture for the clear button. See [member clear_button_enabled].
604 </theme_item>
605 <theme_item name="focus" data_type="style" type="StyleBox">
606 Background used when [LineEdit] has GUI focus. The [theme_item focus] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
607 </theme_item>
608 <theme_item name="normal" data_type="style" type="StyleBox">
609 Default background for the [LineEdit].
610 </theme_item>
611 <theme_item name="read_only" data_type="style" type="StyleBox" keywords="enabled, disabled, editable">
612 Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]).
613 </theme_item>
614 </theme_items>
615 </class>