|
80 | 80 | <return type="bool" /> |
81 | 81 | <param index="0" name="line" type="int" /> |
82 | 82 | <description> |
83 | | - Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. |
| 83 | + Returns [code]true[/code] if the given line is foldable. A line is foldable if it is the start of a valid code region (see [method get_code_region_start_tag]), if it is the start of a comment or string block, or if the next non-empty line is more indented (see [method TextEdit.get_indent_level]). |
84 | 84 | </description> |
85 | 85 | </method> |
86 | 86 | <method name="cancel_code_completion"> |
|
153 | 153 | <method name="do_indent"> |
154 | 154 | <return type="void" /> |
155 | 155 | <description> |
156 | | - Perform an indent as if the user activated the "ui_text_indent" action. |
| 156 | + If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like [method indent_lines]. Equivalent to the [member ProjectSettings.input/ui_text_indent] action. The indentation characters used depend on [member indent_use_spaces] and [member indent_size]. |
157 | 157 | </description> |
158 | 158 | </method> |
159 | 159 | <method name="duplicate_lines"> |
|
276 | 276 | <method name="get_folded_lines" qualifiers="const"> |
277 | 277 | <return type="int[]" /> |
278 | 278 | <description> |
279 | | - Returns all lines that are current folded. |
| 279 | + Returns all lines that are currently folded. |
280 | 280 | </description> |
281 | 281 | </method> |
282 | 282 | <method name="get_text_for_code_completion" qualifiers="const"> |
|
330 | 330 | <method name="indent_lines"> |
331 | 331 | <return type="void" /> |
332 | 332 | <description> |
333 | | - Indents selected lines, or in the case of no selection the caret line by one. |
| 333 | + Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on [member indent_use_spaces]. See [method unindent_lines]. |
334 | 334 | </description> |
335 | 335 | </method> |
336 | 336 | <method name="is_in_comment" qualifiers="const"> |
|
353 | 353 | <return type="bool" /> |
354 | 354 | <param index="0" name="line" type="int" /> |
355 | 355 | <description> |
356 | | - Returns whether the line at the specified index is bookmarked or not. |
| 356 | + Returns [code]true[/code] if the given line is bookmarked. See [method set_line_as_bookmarked]. |
357 | 357 | </description> |
358 | 358 | </method> |
359 | 359 | <method name="is_line_breakpointed" qualifiers="const"> |
360 | 360 | <return type="bool" /> |
361 | 361 | <param index="0" name="line" type="int" /> |
362 | 362 | <description> |
363 | | - Returns whether the line at the specified index is breakpointed or not. |
| 363 | + Returns [code]true[/code] if the given line is breakpointed. See [method set_line_as_breakpoint]. |
364 | 364 | </description> |
365 | 365 | </method> |
366 | 366 | <method name="is_line_code_region_end" qualifiers="const"> |
367 | 367 | <return type="bool" /> |
368 | 368 | <param index="0" name="line" type="int" /> |
369 | 369 | <description> |
370 | | - Returns whether the line at the specified index is a code region end. |
| 370 | + Returns [code]true[/code] if the given line is a code region end. See [method set_code_region_tags]. |
371 | 371 | </description> |
372 | 372 | </method> |
373 | 373 | <method name="is_line_code_region_start" qualifiers="const"> |
374 | 374 | <return type="bool" /> |
375 | 375 | <param index="0" name="line" type="int" /> |
376 | 376 | <description> |
377 | | - Returns whether the line at the specified index is a code region start. |
| 377 | + Returns [code]true[/code] if the given line is a code region start. See [method set_code_region_tags]. |
378 | 378 | </description> |
379 | 379 | </method> |
380 | 380 | <method name="is_line_executing" qualifiers="const"> |
381 | 381 | <return type="bool" /> |
382 | 382 | <param index="0" name="line" type="int" /> |
383 | 383 | <description> |
384 | | - Returns whether the line at the specified index is marked as executing or not. |
| 384 | + Returns [code]true[/code] if the given line is marked as executing. See [method set_line_as_executing]. |
385 | 385 | </description> |
386 | 386 | </method> |
387 | 387 | <method name="is_line_folded" qualifiers="const"> |
388 | 388 | <return type="bool" /> |
389 | 389 | <param index="0" name="line" type="int" /> |
390 | 390 | <description> |
391 | | - Returns whether the line at the specified index is folded or not. |
| 391 | + Returns [code]true[/code] if the given line is folded. See [method fold_line]. |
392 | 392 | </description> |
393 | 393 | </method> |
394 | 394 | <method name="move_lines_down"> |
|
442 | 442 | <return type="void" /> |
443 | 443 | <param index="0" name="draw_below" type="bool" /> |
444 | 444 | <description> |
445 | | - Sets if the code hint should draw below the text. |
| 445 | + If [code]true[/code], the code hint will draw below the main caret. If [code]false[/code], the code hint will draw above the main caret. See [method set_code_hint]. |
446 | 446 | </description> |
447 | 447 | </method> |
448 | 448 | <method name="set_code_region_tags"> |
|
458 | 458 | <param index="0" name="line" type="int" /> |
459 | 459 | <param index="1" name="bookmarked" type="bool" /> |
460 | 460 | <description> |
461 | | - Sets the line as bookmarked. |
| 461 | + Sets the given line as bookmarked. If [code]true[/code] and [member gutters_draw_bookmarks] is [code]true[/code], draws the [theme_item bookmark] icon in the gutter for this line. See [method get_bookmarked_lines] and [method is_line_bookmarked]. |
462 | 462 | </description> |
463 | 463 | </method> |
464 | 464 | <method name="set_line_as_breakpoint"> |
465 | 465 | <return type="void" /> |
466 | 466 | <param index="0" name="line" type="int" /> |
467 | 467 | <param index="1" name="breakpointed" type="bool" /> |
468 | 468 | <description> |
469 | | - Sets the line as breakpointed. |
| 469 | + Sets the given line as a breakpoint. If [code]true[/code] and [member gutters_draw_breakpoints_gutter] is [code]true[/code], draws the [theme_item breakpoint] icon in the gutter for this line. See [method get_breakpointed_lines] and [method is_line_breakpointed]. |
470 | 470 | </description> |
471 | 471 | </method> |
472 | 472 | <method name="set_line_as_executing"> |
473 | 473 | <return type="void" /> |
474 | 474 | <param index="0" name="line" type="int" /> |
475 | 475 | <param index="1" name="executing" type="bool" /> |
476 | 476 | <description> |
477 | | - Sets the line as executing. |
| 477 | + Sets the given line as executing. If [code]true[/code] and [member gutters_draw_executing_lines] is [code]true[/code], draws the [theme_item executing_line] icon in the gutter for this line. See [method get_executing_lines] and [method is_line_executing]. |
478 | 478 | </description> |
479 | 479 | </method> |
480 | 480 | <method name="set_symbol_lookup_word_as_valid"> |
|
500 | 500 | <method name="unfold_all_lines"> |
501 | 501 | <return type="void" /> |
502 | 502 | <description> |
503 | | - Unfolds all lines, folded or not. |
| 503 | + Unfolds all lines that are folded. |
504 | 504 | </description> |
505 | 505 | </method> |
506 | 506 | <method name="unfold_line"> |
507 | 507 | <return type="void" /> |
508 | 508 | <param index="0" name="line" type="int" /> |
509 | 509 | <description> |
510 | | - Unfolds all lines that were previously folded. |
| 510 | + Unfolds the given line if it is folded or if it is hidden under a folded line. |
511 | 511 | </description> |
512 | 512 | </method> |
513 | 513 | <method name="unindent_lines"> |
514 | 514 | <return type="void" /> |
515 | 515 | <description> |
516 | | - Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action. |
| 516 | + Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on [member indent_use_spaces]. Equivalent to the [member ProjectSettings.input/ui_text_dedent] action. See [method indent_lines]. |
517 | 517 | </description> |
518 | 518 | </method> |
519 | 519 | <method name="update_code_completion_options"> |
|
527 | 527 | </methods> |
528 | 528 | <members> |
529 | 529 | <member name="auto_brace_completion_enabled" type="bool" setter="set_auto_brace_completion_enabled" getter="is_auto_brace_completion_enabled" default="false"> |
530 | | - Sets whether brace pairs should be autocompleted. |
| 530 | + If [code]true[/code], uses [member auto_brace_completion_pairs] to automatically insert the closing brace when the opening brace is inserted by typing or autocompletion. Also automatically removes the closing brace when using backspace on the opening brace. |
531 | 531 | </member> |
532 | 532 | <member name="auto_brace_completion_highlight_matching" type="bool" setter="set_highlight_matching_braces_enabled" getter="is_highlight_matching_braces_enabled" default="false"> |
533 | | - Highlight mismatching brace pairs. |
| 533 | + If [code]true[/code], highlights brace pairs when the caret is on either one, using [member auto_brace_completion_pairs]. If matching, the pairs will be underlined. If a brace is unmatched, it is colored with [theme_item brace_mismatch_color]. |
534 | 534 | </member> |
535 | 535 | <member name="auto_brace_completion_pairs" type="Dictionary" setter="set_auto_brace_completion_pairs" getter="get_auto_brace_completion_pairs" default="{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }"> |
536 | | - Sets the brace pairs to be autocompleted. |
| 536 | + Sets the brace pairs to be autocompleted. For each entry in the dictionary, the key is the opening brace and the value is the closing brace that matches it. A brace is a [String] made of symbols. See [member auto_brace_completion_enabled] and [member auto_brace_completion_highlight_matching]. |
537 | 537 | </member> |
538 | 538 | <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false"> |
539 | | - Sets whether code completion is allowed. |
| 539 | + If [code]true[/code], the [member ProjectSettings.input/ui_text_completion_query] action requests code completion. To handle it, see [method _request_code_completion] or [signal code_completion_requested]. |
540 | 540 | </member> |
541 | 541 | <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_completion_prefixes" default="[]"> |
542 | 542 | Sets prefixes that will trigger code completion. |
|
548 | 548 | Sets the string delimiters. All existing string delimiters will be removed. |
549 | 549 | </member> |
550 | 550 | <member name="gutters_draw_bookmarks" type="bool" setter="set_draw_bookmarks_gutter" getter="is_drawing_bookmarks_gutter" default="false"> |
551 | | - Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. |
| 551 | + If [code]true[/code], bookmarks are drawn in the gutter. This gutter is shared with breakpoints and executing lines. See [method set_line_as_bookmarked]. |
552 | 552 | </member> |
553 | 553 | <member name="gutters_draw_breakpoints_gutter" type="bool" setter="set_draw_breakpoints_gutter" getter="is_drawing_breakpoints_gutter" default="false"> |
554 | | - Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. |
| 554 | + If [code]true[/code], breakpoints are drawn in the gutter. This gutter is shared with bookmarks and executing lines. Clicking the gutter will toggle the breakpoint for the line, see [method set_line_as_breakpoint]. |
555 | 555 | </member> |
556 | 556 | <member name="gutters_draw_executing_lines" type="bool" setter="set_draw_executing_lines_gutter" getter="is_drawing_executing_lines_gutter" default="false"> |
557 | | - Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines. |
| 557 | + If [code]true[/code], executing lines are marked in the gutter. This gutter is shared with breakpoints and bookmarks. See [method set_line_as_executing]. |
558 | 558 | </member> |
559 | 559 | <member name="gutters_draw_fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter" default="false"> |
560 | | - Sets if foldable lines icons should be drawn in the gutter. |
| 560 | + If [code]true[/code], the fold gutter is drawn. In this gutter, the [theme_item can_fold_code_region] icon is drawn for each foldable line (see [method can_fold_line]) and the [theme_item folded_code_region] icon is drawn for each folded line (see [method is_line_folded]). These icons can be clicked to toggle the fold state, see [method toggle_foldable_line]. [member line_folding] must be [code]true[/code] to show icons. |
561 | 561 | </member> |
562 | 562 | <member name="gutters_draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false"> |
563 | | - Sets if line numbers should be drawn in the gutter. |
| 563 | + If [code]true[/code], the line number gutter is drawn. Line numbers start at [code]1[/code] and are incremented for each line of text. Clicking and dragging in the line number gutter will select entire lines of text. |
564 | 564 | </member> |
565 | 565 | <member name="gutters_zero_pad_line_numbers" type="bool" setter="set_line_numbers_zero_padded" getter="is_line_numbers_zero_padded" default="false"> |
566 | | - Sets if line numbers drawn in the gutter are zero padded. |
| 566 | + If [code]true[/code], line numbers drawn in the gutter are zero padded based on the total line count. Requires [member gutters_draw_line_numbers] to be set to [code]true[/code]. |
567 | 567 | </member> |
568 | 568 | <member name="indent_automatic" type="bool" setter="set_auto_indent_enabled" getter="is_auto_indent_enabled" default="false"> |
569 | | - Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. |
| 569 | + If [code]true[/code], an extra indent is automatically inserted when a new line is added and a prefix in [member indent_automatic_prefixes] is found. If a brace pair opening key is found, the matching closing brace will be moved to another new line (see [member auto_brace_completion_pairs]). |
570 | 570 | </member> |
571 | 571 | <member name="indent_automatic_prefixes" type="String[]" setter="set_auto_indent_prefixes" getter="get_auto_indent_prefixes" default="[":", "{", "[", "("]"> |
572 | | - Prefixes to trigger an automatic indent. |
| 572 | + Prefixes to trigger an automatic indent. Used when [member indent_automatic] is set to [code]true[/code]. |
573 | 573 | </member> |
574 | 574 | <member name="indent_size" type="int" setter="set_indent_size" getter="get_indent_size" default="4"> |
575 | 575 | Size of the tabulation indent (one [kbd]Tab[/kbd] press) in characters. If [member indent_use_spaces] is enabled the number of spaces to use. |
|
579 | 579 | </member> |
580 | 580 | <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" overrides="Control" enum="Control.LayoutDirection" default="2" /> |
581 | 581 | <member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="false"> |
582 | | - Sets whether line folding is allowed. |
| 582 | + If [code]true[/code], lines can be folded. Otherwise, line folding methods like [method fold_line] will not work and [method can_fold_line] will always return [code]false[/code]. See [member gutters_draw_fold_gutter]. |
583 | 583 | </member> |
584 | 584 | <member name="line_length_guidelines" type="int[]" setter="set_line_length_guidelines" getter="get_line_length_guidelines" default="[]"> |
585 | 585 | Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently. |
|
598 | 598 | </signal> |
599 | 599 | <signal name="code_completion_requested"> |
600 | 600 | <description> |
601 | | - Emitted when the user requests code completion. |
| 601 | + Emitted when the user requests code completion. This signal will not be sent if [method _request_code_completion] is overridden or [member code_completion_enabled] is [code]false[/code]. |
602 | 602 | </description> |
603 | 603 | </signal> |
604 | 604 | <signal name="symbol_lookup"> |
|
0 commit comments