Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

CodeEdit

Hérite de : TextEdit < Control < CanvasItem < Node < Object

Un éditeur de texte multi-ligne conçu pour l'édition de code.

Description

CodeEdit est un TextEdit spécialisé, conçu pour l'édition de fichiers de code bruts. Il a de nombreuses fonctionnalités communément trouvées dans les éditeurs de code tels que les numéros de ligne, le repliage de ligne, la complétion du code, la gestion de l'indentation et la gestion des chaînes/commentaires.

Note : Peu importe la langue, CodeEdit utilisera par défaut toujours une direction du texte de gauche à droite pour afficher correctement le code source.

Propriétés

bool

auto_brace_completion_enabled

false

bool

auto_brace_completion_highlight_matching

false

Dictionary

auto_brace_completion_pairs

{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }

bool

code_completion_enabled

false

Array[String]

code_completion_prefixes

[]

Array[String]

delimiter_comments

[]

Array[String]

delimiter_strings

["' '", "\" \""]

bool

gutters_draw_bookmarks

false

bool

gutters_draw_breakpoints_gutter

false

bool

gutters_draw_executing_lines

false

bool

gutters_draw_fold_gutter

false

bool

gutters_draw_line_numbers

false

int

gutters_line_numbers_min_digits

3

bool

gutters_zero_pad_line_numbers

false

bool

indent_automatic

false

Array[String]

indent_automatic_prefixes

[":", "{", "[", "("]

int

indent_size

4

bool

indent_use_spaces

false

LayoutDirection

layout_direction

2 (overrides Control)

bool

line_folding

false

Array[int]

line_length_guidelines

[]

bool

symbol_lookup_on_click

false

bool

symbol_tooltip_on_hover

false

TextDirection

text_direction

1 (overrides TextEdit)

Méthodes

void

_confirm_code_completion(replace: bool) virtual

Array[Dictionary]

_filter_code_completion_candidates(candidates: Array[Dictionary]) virtual const

void

_request_code_completion(force: bool) virtual

void

add_auto_brace_completion_pair(start_key: String, end_key: String)

void

add_code_completion_option(type: CodeCompletionKind, display_text: String, insert_text: String, text_color: Color = Color(1, 1, 1, 1), icon: Resource = null, value: Variant = null, location: int = 1024)

void

add_comment_delimiter(start_key: String, end_key: String, line_only: bool = false)

void

add_string_delimiter(start_key: String, end_key: String, line_only: bool = false)

bool

can_fold_line(line: int) const

void

cancel_code_completion()

void

clear_bookmarked_lines()

void

clear_breakpointed_lines()

void

clear_comment_delimiters()

void

clear_executing_lines()

void

clear_string_delimiters()

void

confirm_code_completion(replace: bool = false)

void

convert_indent(from_line: int = -1, to_line: int = -1)

void

create_code_region()

void

delete_lines()

void

do_indent()

void

duplicate_lines()

void

duplicate_selection()

void

fold_all_lines()

void

fold_line(line: int)

String

get_auto_brace_completion_close_key(open_key: String) const

PackedInt32Array

get_bookmarked_lines() const

PackedInt32Array

get_breakpointed_lines() const

Dictionary

get_code_completion_option(index: int) const

Array[Dictionary]

get_code_completion_options() const

int

get_code_completion_selected_index() const

String

get_code_region_end_tag() const

String

get_code_region_start_tag() const

String

get_delimiter_end_key(delimiter_index: int) const

Vector2

get_delimiter_end_position(line: int, column: int) const

String

get_delimiter_start_key(delimiter_index: int) const

Vector2

get_delimiter_start_position(line: int, column: int) const

PackedInt32Array

get_executing_lines() const

Array[int]

get_folded_lines() const

String

get_text_for_code_completion() const

String

get_text_for_symbol_lookup() const

String

get_text_with_cursor_char(line: int, column: int) const

bool

has_auto_brace_completion_close_key(close_key: String) const

bool

has_auto_brace_completion_open_key(open_key: String) const

bool

has_comment_delimiter(start_key: String) const

bool

has_string_delimiter(start_key: String) const

void

indent_lines()

int

is_in_comment(line: int, column: int = -1) const

int

is_in_string(line: int, column: int = -1) const

bool

is_line_bookmarked(line: int) const

bool

is_line_breakpointed(line: int) const

bool

is_line_code_region_end(line: int) const

bool

is_line_code_region_start(line: int) const

bool

is_line_executing(line: int) const

bool

is_line_folded(line: int) const

void

join_lines(line_ending: String = " ")

void

move_lines_down()

void

move_lines_up()

void

remove_comment_delimiter(start_key: String)

void

remove_string_delimiter(start_key: String)

void

request_code_completion(force: bool = false)

void

set_code_completion_selected_index(index: int)

void

set_code_hint(code_hint: String)

void

set_code_hint_draw_below(draw_below: bool)

void

set_code_region_tags(start: String = "region", end: String = "endregion")

void

set_line_as_bookmarked(line: int, bookmarked: bool)

void

set_line_as_breakpoint(line: int, breakpointed: bool)

void

set_line_as_executing(line: int, executing: bool)

void

set_symbol_lookup_word_as_valid(valid: bool)

void

toggle_foldable_line(line: int)

void

toggle_foldable_lines_at_carets()

void

unfold_all_lines()

void

unfold_line(line: int)

void

unindent_lines()

void

update_code_completion_options(force: bool)

Propriétés du thème

Color

bookmark_color

Color(0.5, 0.64, 1, 0.8)

Color

brace_mismatch_color

Color(1, 0.2, 0.2, 1)

Color

breakpoint_color

Color(0.9, 0.29, 0.3, 1)

Color

code_folding_color

Color(0.8, 0.8, 0.8, 0.8)

Color

completion_background_color

Color(0.17, 0.16, 0.2, 1)

Color

completion_existing_color

Color(0.87, 0.87, 0.87, 0.13)

Color

completion_scroll_color

Color(1, 1, 1, 0.29)

Color

completion_scroll_hovered_color

Color(1, 1, 1, 0.4)

Color

completion_selected_color

Color(0.26, 0.26, 0.27, 1)

Color

executing_line_color

Color(0.98, 0.89, 0.27, 1)

Color

folded_code_region_color

Color(0.68, 0.46, 0.77, 0.2)

Color

line_length_guideline_color

Color(0.3, 0.5, 0.8, 0.1)

Color

line_number_color

Color(0.67, 0.67, 0.67, 0.4)

int

completion_lines

7

int

completion_max_width

50

int

completion_scroll_width

6

Texture2D

bookmark

Texture2D

breakpoint

Texture2D

can_fold

Texture2D

can_fold_code_region

Texture2D

completion_color_bg

Texture2D

executing_line

Texture2D

folded

Texture2D

folded_code_region

Texture2D

folded_eol_icon

StyleBox

completion


Signaux

breakpoint_toggled(line: int) 🔗

Émis lorsqu'un point d'arrêt est ajouté ou retiré d'une ligne. Si la ligne est retirée via un retour arrière, un signal est émis à l'ancienne ligne.


code_completion_requested() 🔗

Émis lorsque l'utilisateur demande la complétion du code. Ce signal ne sera pas envoyé si _request_code_completion() est redéfini ou code_completion_enabled vaut false.


symbol_hovered(symbol: String, line: int, column: int) 🔗

Émis lorsque l'utilisateur survole un symbole. Contrairement à Control.mouse_entered, ce signal n'est pas émis immédiatement, mais lorsque le curseur est sur le symbole pendant ProjectSettings.gui/timers/tooltip_delay_sec secondes.

Note : symbol_tooltip_on_hover doit valoir true pour que ce signal soit émis.


symbol_lookup(symbol: String, line: int, column: int) 🔗

Émis lorsque l'utilisateur a cliqué sur un symbole valide.


symbol_validate(symbol: String) 🔗

Émis lorsque l'utilisateur survole un symbole. Le symbole doit être valide et avoir reçu une réponse, en appelant set_symbol_lookup_word_as_valid().

**Note : ** symbol_lookup_on_click doit valoir true pour que ce signal soit émis.


Énumérations

enum CodeCompletionKind: 🔗

CodeCompletionKind KIND_CLASS = 0

Marque l'option comme une classe.

CodeCompletionKind KIND_FUNCTION = 1

Marque l'option comme une fonction.

CodeCompletionKind KIND_SIGNAL = 2

Marque l'option comme un signal Godot.

CodeCompletionKind KIND_VARIABLE = 3

Marque l'option comme une variable.

CodeCompletionKind KIND_MEMBER = 4

Marque l'option comme un membre.

CodeCompletionKind KIND_ENUM = 5

Marque l'option comme entrée d'énum.

CodeCompletionKind KIND_CONSTANT = 6

Marque l'option comme une constante.

CodeCompletionKind KIND_NODE_PATH = 7

Marque l'option comme un chemin de nœud Godot.

CodeCompletionKind KIND_FILE_PATH = 8

Marque l'option comme un chemin de fichier.

CodeCompletionKind KIND_PLAIN_TEXT = 9

Marque l'option comme du texte brut ou non classifié.

CodeCompletionKind KIND_KEYWORD = 10

Marks the option as a keyword.


enum CodeCompletionLocation: 🔗

CodeCompletionLocation LOCATION_LOCAL = 0

L'option est locale à l'emplacement de la requête de complétion de code - p.ex. une variable locale. La valeur subséquente de l'emplacement représente les options de la classe externe, la valeur exacte représente la distance (en termes de classes intérieures).

CodeCompletionLocation LOCATION_PARENT_MASK = 256

L'option provient de la classe contenante ou d'une classe parente, par rapport à l'emplacement de la requête de complétion du code. Effectue un bitwise OU avec la profondeur de la classe (par exemple 0 pour la classe locale, 1 pour le parent, 2 pour le grand-parent, etc.) pour stocker la profondeur d'une option dans la classe ou dans la classe parente.

CodeCompletionLocation LOCATION_OTHER_USER_CODE = 512

L'option provient du code de l'utilisateur qui n'est pas local et pas dans une classe dérivée (p. ex., Singletons à chargement automatique).

CodeCompletionLocation LOCATION_OTHER = 1024

L'option provient d'un autre code du moteur, non couvert par les autres constantes d'énumération - par ex. de classes intégrées.


Descriptions des propriétés

bool auto_brace_completion_enabled = false 🔗

  • void set_auto_brace_completion_enabled(value: bool)

  • bool is_auto_brace_completion_enabled()

If true, uses 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.


bool auto_brace_completion_highlight_matching = false 🔗

  • void set_highlight_matching_braces_enabled(value: bool)

  • bool is_highlight_matching_braces_enabled()

If true, highlights brace pairs when the caret is on either one, using auto_brace_completion_pairs. If matching, the pairs will be underlined. If a brace is unmatched, it is colored with brace_mismatch_color.


Dictionary auto_brace_completion_pairs = { "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" } 🔗

  • void set_auto_brace_completion_pairs(value: Dictionary)

  • Dictionary get_auto_brace_completion_pairs()

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 auto_brace_completion_enabled and auto_brace_completion_highlight_matching.


bool code_completion_enabled = false 🔗

  • void set_code_completion_enabled(value: bool)

  • bool is_code_completion_enabled()

Si true, l'action ProjectSettings.input/ui_text_completion_query demande la complétion du code. Pour la gérer, voir _request_code_completion() ou code_completion_requested.


Array[String] code_completion_prefixes = [] 🔗

Définit les préfixes qui déclencheront la complétion du code.


Array[String] delimiter_comments = [] 🔗

Définit les délimiteurs de commentaire. Tous les délimiteurs de commentaire existants seront supprimés.


Array[String] delimiter_strings = ["' '", "\" \""] 🔗

Définit les délimiteurs de chaîne. Tous les délimiteurs de chaîne existants seront supprimés.


bool gutters_draw_bookmarks = false 🔗

  • void set_draw_bookmarks_gutter(value: bool)

  • bool is_drawing_bookmarks_gutter()

If true, bookmarks are drawn in the gutter. This gutter is shared with breakpoints and executing lines. See set_line_as_bookmarked().


bool gutters_draw_breakpoints_gutter = false 🔗

  • void set_draw_breakpoints_gutter(value: bool)

  • bool is_drawing_breakpoints_gutter()

If true, 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 set_line_as_breakpoint().


bool gutters_draw_executing_lines = false 🔗

  • void set_draw_executing_lines_gutter(value: bool)

  • bool is_drawing_executing_lines_gutter()

If true, executing lines are marked in the gutter. This gutter is shared with breakpoints and bookmarks. See set_line_as_executing().


bool gutters_draw_fold_gutter = false 🔗

  • void set_draw_fold_gutter(value: bool)

  • bool is_drawing_fold_gutter()

If true, the fold gutter is drawn. In this gutter, the can_fold_code_region icon is drawn for each foldable line (see can_fold_line()) and the folded_code_region icon is drawn for each folded line (see is_line_folded()). These icons can be clicked to toggle the fold state, see toggle_foldable_line(). line_folding must be true to show icons.


bool gutters_draw_line_numbers = false 🔗

  • void set_draw_line_numbers(value: bool)

  • bool is_draw_line_numbers_enabled()

If true, the line number gutter is drawn. Line numbers start at 1 and are incremented for each line of text. Clicking and dragging in the line number gutter will select entire lines of text.


int gutters_line_numbers_min_digits = 3 🔗

  • void set_line_numbers_min_digits(value: int)

  • int get_line_numbers_min_digits()

The minimum width in digits reserved for the line number gutter.


bool gutters_zero_pad_line_numbers = false 🔗

  • void set_line_numbers_zero_padded(value: bool)

  • bool is_line_numbers_zero_padded()

Si true, les numéros de ligne tirés dans la gouttière sont complété avec des zéro en fonction du nombre total de lignes. Exige que gutters_draw_line_numbers soit défini à true.


bool indent_automatic = false 🔗

  • void set_auto_indent_enabled(value: bool)

  • bool is_auto_indent_enabled()

If true, an extra indent is automatically inserted when a new line is added and a prefix in 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 auto_brace_completion_pairs).


Array[String] indent_automatic_prefixes = [":", "{", "[", "("] 🔗

Prefixes to trigger an automatic indent. Used when indent_automatic is set to true.


int indent_size = 4 🔗

  • void set_indent_size(value: int)

  • int get_indent_size()

Size of the tabulation indent (one Tab press) in characters. If indent_use_spaces is enabled the number of spaces to use.


bool indent_use_spaces = false 🔗

  • void set_indent_using_spaces(value: bool)

  • bool is_indent_using_spaces()

Utiliser des espaces au lieu des tabulations pour l'indentation.


bool line_folding = false 🔗

  • void set_line_folding_enabled(value: bool)

  • bool is_line_folding_enabled()

Si true, les lignes peuvent être repliées. Sinon, les méthodes de repli de ligne comme fold_line() ne fonctionneront pas et can_fold_line() renverra toujours false. Voir gutters_draw_fold_gutter.


Array[int] line_length_guidelines = [] 🔗

  • void set_line_length_guidelines(value: Array[int])

  • Array[int] get_line_length_guidelines()

Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is drawn more prominently.


bool symbol_lookup_on_click = false 🔗

  • void set_symbol_lookup_on_click_enabled(value: bool)

  • bool is_symbol_lookup_on_click_enabled()

Set when a validated word from symbol_validate is clicked, the symbol_lookup should be emitted.


bool symbol_tooltip_on_hover = false 🔗

  • void set_symbol_tooltip_on_hover_enabled(value: bool)

  • bool is_symbol_tooltip_on_hover_enabled()

Si true, le signal symbol_hovered est émis lors du sur-volage d'un mot.


Descriptions des méthodes

void _confirm_code_completion(replace: bool) virtual 🔗

Redéfinissez cette méthode pour définir comment l'entrée sélectionnée devrait être insérée. Si replace vaut true, tout texte existant devrait être remplacé.


Array[Dictionary] _filter_code_completion_candidates(candidates: Array[Dictionary]) virtual const 🔗

Redéfinissez cette méthode pour définir quels éléments dans candidates devraient être affichés.

candidates et le valeur renvoyée sont un Array de Dictionary, voir get_code_completion_option() pour le contenu du Dictionary.


void _request_code_completion(force: bool) virtual 🔗

Redéfinissez cette méthode pour définir ce qui se passe lorsque l'utilisateur demande la complétion du code. Si force vaut true, toute vérification devrait être contournée.


void add_auto_brace_completion_pair(start_key: String, end_key: String) 🔗

Ajoute une paire d'accolades.

Les clés de démarrage et de fin doivent être des symboles. Seule la clé de départ doit être unique.


void add_code_completion_option(type: CodeCompletionKind, display_text: String, insert_text: String, text_color: Color = Color(1, 1, 1, 1), icon: Resource = null, value: Variant = null, location: int = 1024) 🔗

Soumet un élément à la liste des potentiels candidats pour le menu d'autocomplétion. Appelez update_code_completion_options() pour mettre à jour cette liste.

location indique la position de l'option par rapport à la position de la requête de complétion du code. Voir CodeCompletionLocation pour des informations sur comment définir cette valeur.

Remarque : Cette liste remplacera tous les candidats actuels.


void add_comment_delimiter(start_key: String, end_key: String, line_only: bool = false) 🔗

Adds a comment delimiter from start_key to end_key. Both keys should be symbols, and start_key must not be shared with other delimiters.

If line_only is true or end_key is an empty String, the region does not carry over to the next line.


void add_string_delimiter(start_key: String, end_key: String, line_only: bool = false) 🔗

Defines a string delimiter from start_key to end_key. Both keys should be symbols, and start_key must not be shared with other delimiters.

If line_only is true or end_key is an empty String, the region does not carry over to the next line.


bool can_fold_line(line: int) const 🔗

Renvoie true si la ligne donnée est repliable. Une ligne est repliable si elle est le début d'une région de code valide (voir get_code_region_start_tag()), si elle est le début d'un bloc de commentaire ou de chaîne, ou si la prochaine ligne non-vide est plus indentée (voir TextEdit.get_indent_level()).


void cancel_code_completion() 🔗

Annule le menu d'autocomplétion.


void clear_bookmarked_lines() 🔗

Efface toutes les lignes marquées.


void clear_breakpointed_lines() 🔗

Efface toute les lignes avec un point d'arrêt.


void clear_comment_delimiters() 🔗

Supprime tous les délimiteurs de commentaires.


void clear_executing_lines() 🔗

Efface toutes les lignes exécutées.


void clear_string_delimiters() 🔗

Supprime tous les délimiteurs de chaîne.


void confirm_code_completion(replace: bool = false) 🔗

Insère l'entrée sélectionnée dans le texte. Si replace vaut true, tout texte existant est remplacé plutôt que fusionné.


void convert_indent(from_line: int = -1, to_line: int = -1) 🔗

Convertit les indentations des lignes entre la ligne from_line et la ligne to_line en tabulations ou espaces tels que définis par indent_use_spaces.

Des valeurs de -1 convertissent le texte entier.


void create_code_region() 🔗

Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see add_comment_delimiter()).

A code region is a part of code that is highlighted when folded and can help organize your script.

Code region start and end tags can be customized (see set_code_region_tags()).

Code regions are delimited using start and end tags (respectively region and endregion by default) preceded by one line comment delimiter. (eg. #region and #endregion)


void delete_lines() 🔗

Supprime toutes les lignes qui sont sélectionnées ou qui ont un curseur sur elles.


void do_indent() 🔗

S'il n'y a pas de sélection, de l'indentation est insérée au curseur. Sinon, les lignes sélectionnées sont indentées comme avec indent_lines(). Équivalent à l'action ProjectSettings.input/ui_text_indent. Les caractères d'indentation utilisés dépendent de indent_use_spaces et indent_size.


void duplicate_lines() 🔗

Duplique toutes les lignes actuellement sélectionnées avec n'importe quel curseur. Duplique la ligne entière sous le curseur actuel, peu importe où le curseur se trouve dans la ligne.


void duplicate_selection() 🔗

Duplique tous le texte sélectionné et duplique toutes les lignes avec un curseur sur elles.


void fold_all_lines() 🔗

Réduit toutes les lignes qui peuvent être réduites (voir can_fold_line()).


void fold_line(line: int) 🔗

Réduit la ligne donnée, si possible (voir can_fold_line()).


String get_auto_brace_completion_close_key(open_key: String) const 🔗

Gets the matching auto brace close key for open_key.


PackedInt32Array get_bookmarked_lines() const 🔗

Gets all bookmarked lines.


PackedInt32Array get_breakpointed_lines() const 🔗

Obtient toutes les lignes avec un point d'arrêt.


Dictionary get_code_completion_option(index: int) const 🔗

Obtient l'option de complétion à l'index index. Le Dictionary renvoyé a les clés-valeurs suivantes :

kind : CodeCompletionKind

display_text : Texte qui est affiché dans le menu d'autocomplétion.

insert_text : Texte à insérer lors de la sélection de cet élément.

font_color : Couleur du texte dans le menu d'autocomplétion.

icon : Icône à dessiner dans le menu d'autocomplétion.

default_value : Valeur du symbole.


Array[Dictionary] get_code_completion_options() const 🔗

Obtient toutes les options de complétion, voir get_code_completion_option() pour le contenu du résultat.


int get_code_completion_selected_index() const 🔗

Obtient l'index de l'option de complétion sélectionnée actuelle.


String get_code_region_end_tag() const 🔗

Renvoie la balise de fin de région de code (sans délimiteur de commentaire).


String get_code_region_start_tag() const 🔗

Renvoie la balise de début de région de code (sans délimiteur de commentaire).


String get_delimiter_end_key(delimiter_index: int) const 🔗

Obtient la clé de fin pour un index de chaîne ou région de commentaire.


Vector2 get_delimiter_end_position(line: int, column: int) const 🔗

If line column is in a string or comment, returns the end position of the region. If not or no end could be found, both Vector2 values will be -1.


String get_delimiter_start_key(delimiter_index: int) const 🔗

Obtient la clé de départ pour un index de chaîne ou de région de commentaire.


Vector2 get_delimiter_start_position(line: int, column: int) const 🔗

Si line column est dans une chaîne ou un commentaire, renvoie la position de départ de la région. Sinon ou si aucun départ n'a été trouvé, les deux valeurs du Vector2 vaudront -1.


PackedInt32Array get_executing_lines() const 🔗

Reprends toutes les lignes d'exécution.


Array[int] get_folded_lines() const 🔗

Renvoie toutes les lignes qui sont actuellement repliées.


String get_text_for_code_completion() const 🔗

Renvoie le texte complet avec le caractère 0xFFFF à l'emplacement du caret.


String get_text_for_symbol_lookup() const 🔗

Renvoie le texte complet avec le caractère 0xFFFF à l'emplacement du curseur.


String get_text_with_cursor_char(line: int, column: int) const 🔗

Renvoie le texte complet avec le caractère 0xFFFF à l'emplacement spécifié.


bool has_auto_brace_completion_close_key(close_key: String) const 🔗

Renvoie true si la clé de fermeture close_key existe.


bool has_auto_brace_completion_open_key(open_key: String) const 🔗

Renvoie true si la clé d'ouverture open_key existe.


bool has_comment_delimiter(start_key: String) const 🔗

Renvoie true si le commentaire start_key existe.


bool has_string_delimiter(start_key: String) const 🔗

Renvoie true si la chaîne de caractères start_key existe.


void indent_lines() 🔗

Indente toutes les lignes qui sont sélectionnées ou qui ont un curseur sur elles. Utilise des espaces ou une tabulation en fonction de indent_use_spaces. Voir unindent_lines().


int is_in_comment(line: int, column: int = -1) const 🔗

Returns delimiter index if line column is in a comment. If column is not provided, will return delimiter index if the entire line is a comment. Otherwise -1.


int is_in_string(line: int, column: int = -1) const 🔗

Returns the delimiter index if line column is in a string. If column is not provided, will return the delimiter index if the entire line is a string. Otherwise -1.


bool is_line_bookmarked(line: int) const 🔗

Renvoie true si la ligne donnée est marquée. Voir set_line_as_bookmarked().


bool is_line_breakpointed(line: int) const 🔗

Renvoie true si la ligne donnée a un point d'arrêt. Voir set_line_as_breakpoint().


bool is_line_code_region_end(line: int) const 🔗

Renvoie true si la ligne donnée est une fin de région de code. Voir set_code_region_tags().


bool is_line_code_region_start(line: int) const 🔗

Renvoie true si la ligne donnée est un début de région de code. Voir set_code_region_tags().


bool is_line_executing(line: int) const 🔗

Renvoie true si la ligne donnée est marquée comme en cours d'exécution. Voir set_line_as_executing().


bool is_line_folded(line: int) const 🔗

Renvoie true si la ligne donnée est repliée. Voir fold_line().


void join_lines(line_ending: String = " ") 🔗

Joins all selected lines or lines containing a caret with their next line. Whitespace in between will be removed. If the next line has content, the line_ending will be inserted in between.


void move_lines_down() 🔗

Moves all lines down that are selected or have a caret on them.


void move_lines_up() 🔗

Moves all lines up that are selected or have a caret on them.


void remove_comment_delimiter(start_key: String) 🔗

Retire le délimiteur de commentaire avec la clé start_key.


void remove_string_delimiter(start_key: String) 🔗

Retire le délimiteur de chaîne avec la clé start_key.


void request_code_completion(force: bool = false) 🔗

Emits code_completion_requested, if force is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal.


void set_code_completion_selected_index(index: int) 🔗

Définit l'option d'achèvement sélectionnée actuelle.


void set_code_hint(code_hint: String) 🔗

Sets the code hint text. Pass an empty string to clear.


void set_code_hint_draw_below(draw_below: bool) 🔗

If true, the code hint will draw below the main caret. If false, the code hint will draw above the main caret. See set_code_hint().


void set_code_region_tags(start: String = "region", end: String = "endregion") 🔗

Sets the code region start and end tags (without comment delimiter).


void set_line_as_bookmarked(line: int, bookmarked: bool) 🔗

Sets the given line as bookmarked. If true and gutters_draw_bookmarks is true, draws the bookmark icon in the gutter for this line. See get_bookmarked_lines() and is_line_bookmarked().


void set_line_as_breakpoint(line: int, breakpointed: bool) 🔗

Sets the given line as a breakpoint. If true and gutters_draw_breakpoints_gutter is true, draws the breakpoint icon in the gutter for this line. See get_breakpointed_lines() and is_line_breakpointed().


void set_line_as_executing(line: int, executing: bool) 🔗

Sets the given line as executing. If true and gutters_draw_executing_lines is true, draws the executing_line icon in the gutter for this line. See get_executing_lines() and is_line_executing().


void set_symbol_lookup_word_as_valid(valid: bool) 🔗

Définit le symbole émis par symbol_validate comme un symbole de recherche valide.


void toggle_foldable_line(line: int) 🔗

Réduit le bloc de code à la ligne donnée.


void toggle_foldable_lines_at_carets() 🔗

Toggle the folding of the code block on all lines with a caret on them.


void unfold_all_lines() 🔗

Déplie toutes les lignes qui sont repliées.


void unfold_line(line: int) 🔗

Déplie la ligne donnée si elle est repliée ou si elle est cachée sous une ligne repliée.


void unindent_lines() 🔗

Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on indent_use_spaces. Equivalent to the ProjectSettings.input/ui_text_dedent action. See indent_lines().


void update_code_completion_options(force: bool) 🔗

Submits all completion options added with add_code_completion_option(). Will try to force the autocomplete menu to popup, if force is true.

Note: This will replace all current candidates.


Descriptions des propriétés du thème

Color bookmark_color = Color(0.5, 0.64, 1, 0.8) 🔗

Color de l'icône de marquage pour les lignes marquées.


Color brace_mismatch_color = Color(1, 0.2, 0.2, 1) 🔗

Color of the text to highlight mismatched braces.


Color breakpoint_color = Color(0.9, 0.29, 0.3, 1) 🔗

Color de l'icône de point d'arrêt pour les lignes marquées.


Color code_folding_color = Color(0.8, 0.8, 0.8, 0.8) 🔗

Color for all icons related to line folding.


Color completion_background_color = Color(0.17, 0.16, 0.2, 1) 🔗

Définit la Color d'arrière-plan pour la popup de complétion du code.


Color completion_existing_color = Color(0.87, 0.87, 0.87, 0.13) 🔗

Background highlight Color for matching text in code completion options.


Color completion_scroll_color = Color(1, 1, 1, 0.29) 🔗

Color of the scrollbar in the code completion popup.


Color completion_scroll_hovered_color = Color(1, 1, 1, 0.4) 🔗

Color of the scrollbar in the code completion popup when hovered.


Color completion_selected_color = Color(0.26, 0.26, 0.27, 1) 🔗

Background highlight Color for the current selected option item in the code completion popup.


Color executing_line_color = Color(0.98, 0.89, 0.27, 1) 🔗

Color de l'icône d'exécution pour exécuter des lignes.


Color folded_code_region_color = Color(0.68, 0.46, 0.77, 0.2) 🔗

Color of background line highlight for folded code region.


Color line_length_guideline_color = Color(0.3, 0.5, 0.8, 0.1) 🔗

Color of the main line length guideline, secondary guidelines will have 50% alpha applied.


Color line_number_color = Color(0.67, 0.67, 0.67, 0.4) 🔗

Définit la Color des numéros de ligne.


int completion_lines = 7 🔗

Le nombre maximum d'otption à afficher pour la complétion du code.


int completion_max_width = 50 🔗

Largeur maximale des options dans le popup de complétion de code. Les options plus longues que cela seront coupées.


int completion_scroll_width = 6 🔗

Largeur de la barre de défilement dans le popup de complétion de code.


Texture2D bookmark 🔗

Définit une Texture2D personnalisée pour dessiner le bandeau de marquage pour les lignes marquées.


Texture2D breakpoint 🔗

Définit la Texture2D personnalisée pour le point d'arrêt dans le bandeau.


Texture2D can_fold 🔗

Sets a custom Texture2D to draw in the line folding gutter when a line can be folded.


Texture2D can_fold_code_region 🔗

Définit une Texture2D personnalisée pour dessiner dans le bandeau de ligne quand une région de code peut être pliée.


Texture2D completion_color_bg 🔗

Background panel for the color preview box in autocompletion (visible when the color is translucent).


Texture2D executing_line 🔗

Icon to draw in the executing gutter for executing lines.


Texture2D folded 🔗

Sets a custom Texture2D to draw in the line folding gutter when a line is folded and can be unfolded.


Texture2D folded_code_region 🔗

Définit une Texture2D personnalisée pour dessiner dans le bandeau de ligne quand une région de code est pliée et peut être dépliée.


Texture2D folded_eol_icon 🔗

Définit une Texture2D personnalisée pour dessiner la fin d'une région de code pliée.


StyleBox completion 🔗

StyleBox pour la popup de complétion de code.