blob: e6c26e324807399ef9130a1961c49f14dfa44de6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LineEdit" inherits="Control" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Control that provides single line string editing.
</brief_description>
<description>
LineEdit provides a single line string editor, used for text fields.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="append_at_cursor">
<return type="void">
</return>
<argument index="0" name="text" type="String">
</argument>
<description>
Append text at cursor, scrolling the [LineEdit] when needed.
</description>
</method>
<method name="clear">
<return type="void">
</return>
<description>
Clear the [LineEdit] text.
</description>
</method>
<method name="cursor_get_blink_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
Gets whether the line edit caret is blinking.
</description>
</method>
<method name="cursor_get_blink_speed" qualifiers="const">
<return type="float">
</return>
<description>
Gets the line edit caret blink speed.
</description>
</method>
<method name="cursor_set_blink_enabled">
<return type="void">
</return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
Set the line edit caret to blink.
</description>
</method>
<method name="cursor_set_blink_speed">
<return type="void">
</return>
<argument index="0" name="blink_speed" type="float">
</argument>
<description>
Set the line edit caret blink speed. Cannot be less then or equal to 0.
</description>
</method>
<method name="get_align" qualifiers="const">
<return type="int" enum="LineEdit.Align">
</return>
<description>
Return the align mode of the [LineEdit].
</description>
</method>
<method name="get_cursor_position" qualifiers="const">
<return type="int">
</return>
<description>
Return the cursor position inside the [LineEdit].
</description>
</method>
<method name="get_expand_to_text_length" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
<method name="get_max_length" qualifiers="const">
<return type="int">
</return>
<description>
Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists.
</description>
</method>
<method name="get_menu" qualifiers="const">
<return type="PopupMenu">
</return>
<description>
Return the [PopupMenu] of this [LineEdit].
</description>
</method>
<method name="get_placeholder" qualifiers="const">
<return type="String">
</return>
<description>
Return the placeholder text.
</description>
</method>
<method name="get_placeholder_alpha" qualifiers="const">
<return type="float">
</return>
<description>
Return transparency of the placeholder text.
</description>
</method>
<method name="get_text" qualifiers="const">
<return type="String">
</return>
<description>
Return the text in the [LineEdit].
</description>
</method>
<method name="is_editable" qualifiers="const">
<return type="bool">
</return>
<description>
Return the [i]editable[/i] status of the [LineEdit] (see [method set_editable]).
</description>
</method>
<method name="is_secret" qualifiers="const">
<return type="bool">
</return>
<description>
Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]).
</description>
</method>
<method name="menu_option">
<return type="void">
</return>
<argument index="0" name="option" type="int">
</argument>
<description>
Execute a given action as defined in the MENU_* enum.
</description>
</method>
<method name="select">
<return type="void">
</return>
<argument index="0" name="from" type="int" default="0">
</argument>
<argument index="1" name="to" type="int" default="-1">
</argument>
<description>
Select the text inside [LineEdit] by the given character positions. [code]from[/code] is default to the beginning. [code]to[/code] is default to the end.
[codeblock]
select() # select all
select(5) # select from the fifth character to the end.
select(2, 5) # select from the second to the fifth character.
[/codeblock]
</description>
</method>
<method name="select_all">
<return type="void">
</return>
<description>
Select the whole string.
</description>
</method>
<method name="set_align">
<return type="void">
</return>
<argument index="0" name="align" type="int" enum="LineEdit.Align">
</argument>
<description>
Set text alignment of the [LineEdit].
</description>
</method>
<method name="set_cursor_position">
<return type="void">
</return>
<argument index="0" name="position" type="int">
</argument>
<description>
Set the cursor position inside the [LineEdit], causing it to scroll if needed.
</description>
</method>
<method name="set_editable">
<return type="void">
</return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
Set the [i]editable[/i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added.
</description>
</method>
<method name="set_expand_to_text_length">
<return type="void">
</return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_max_length">
<return type="void">
</return>
<argument index="0" name="chars" type="int">
</argument>
<description>
Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit.
</description>
</method>
<method name="set_placeholder">
<return type="void">
</return>
<argument index="0" name="text" type="String">
</argument>
<description>
Set the placeholder text.
</description>
</method>
<method name="set_placeholder_alpha">
<return type="void">
</return>
<argument index="0" name="alpha" type="float">
</argument>
<description>
Set transparency of the placeholder text.
</description>
</method>
<method name="set_secret">
<return type="void">
</return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
Set the [i]secret[/i] status of the [LineEdit]. When enabled, every character is displayed as "*".
</description>
</method>
<method name="set_text">
<return type="void">
</return>
<argument index="0" name="text" type="String">
</argument>
<description>
Set the text in the [LineEdit], clearing the existing one and the selection.
</description>
</method>
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align">
</member>
<member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled">
</member>
<member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed">
</member>
<member name="editable" type="bool" setter="set_editable" getter="is_editable">
</member>
<member name="expand_to_len" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length">
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode">
</member>
<member name="max_length" type="int" setter="set_max_length" getter="get_max_length">
</member>
<member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha">
</member>
<member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder">
</member>
<member name="secret" type="bool" setter="set_secret" getter="is_secret">
</member>
<member name="text" type="String" setter="set_text" getter="get_text">
</member>
</members>
<signals>
<signal name="text_changed">
<argument index="0" name="text" type="String">
</argument>
<description>
When the text changes, this signal is emitted.
</description>
</signal>
<signal name="text_entered">
<argument index="0" name="text" type="String">
</argument>
<description>
This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs.
</description>
</signal>
</signals>
<constants>
<constant name="ALIGN_LEFT" value="0">
Align left.
</constant>
<constant name="ALIGN_CENTER" value="1">
Align center.
</constant>
<constant name="ALIGN_RIGHT" value="2">
Align right.
</constant>
<constant name="ALIGN_FILL" value="3">
Align fill.
</constant>
<constant name="MENU_CUT" value="0">
Cut (Copy and clear).
</constant>
<constant name="MENU_COPY" value="1">
Copy the selected text.
</constant>
<constant name="MENU_PASTE" value="2">
Paste the clipboard text over the selected text.
</constant>
<constant name="MENU_CLEAR" value="3">
Clear the text.
</constant>
<constant name="MENU_SELECT_ALL" value="4">
Select all text.
</constant>
<constant name="MENU_UNDO" value="5">
Undo an action.
</constant>
<constant name="MENU_MAX" value="6">
</constant>
</constants>
<theme_items>
<theme_item name="cursor_color" type="Color">
</theme_item>
<theme_item name="focus" type="StyleBox">
</theme_item>
<theme_item name="font" type="Font">
</theme_item>
<theme_item name="font_color" type="Color">
</theme_item>
<theme_item name="font_color_selected" type="Color">
</theme_item>
<theme_item name="minimum_spaces" type="int">
</theme_item>
<theme_item name="normal" type="StyleBox">
</theme_item>
<theme_item name="read_only" type="StyleBox">
</theme_item>
<theme_item name="selection_color" type="Color">
</theme_item>
</theme_items>
</class>
|