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.
Checking the stable version of the documentation...
CodeHighlighter
Hérite de : SyntaxHighlighter < Resource < RefCounted < Object
A syntax highlighter intended for code.
Description
By adjusting various properties of this resource, you can change the colors of strings, comments, numbers, and other text patterns inside a TextEdit control.
Propriétés
|
||
|
||
|
||
|
||
|
||
|
||
|
Méthodes
void |
add_color_region(start_key: String, end_key: String, color: Color, line_only: bool = false) |
void |
add_keyword_color(keyword: String, color: Color) |
void |
add_member_keyword_color(member_keyword: String, color: Color) |
void |
|
void |
|
void |
|
get_keyword_color(keyword: String) const |
|
get_member_keyword_color(member_keyword: String) const |
|
has_color_region(start_key: String) const |
|
has_keyword_color(keyword: String) const |
|
has_member_keyword_color(member_keyword: String) const |
|
void |
remove_color_region(start_key: String) |
void |
remove_keyword_color(keyword: String) |
void |
remove_member_keyword_color(member_keyword: String) |
Descriptions des propriétés
Dictionary color_regions = {} 🔗
void set_color_regions(value: Dictionary)
Dictionary get_color_regions()
Définit les régions de couleur. Toutes les régions existantes seront supprimées. La clé du Dictionary est la clé de départ et de fin de la région, séparés par un espace. La valeur est la couleur de région.
Color function_color = Color(0, 0, 0, 1) 🔗
Définit la couleur pour les fonctions. Une fonction est une chaîne de mots non-clé suivis d'un '('.
Dictionary keyword_colors = {} 🔗
void set_keyword_colors(value: Dictionary)
Dictionary get_keyword_colors()
Définit les couleurs des mot-clés. Tous les mots-clés existants seront supprimés. La clé du Dictionary est le mot-clé. La valeur est la couleur du mot-clé.
Dictionary member_keyword_colors = {} 🔗
void set_member_keyword_colors(value: Dictionary)
Dictionary get_member_keyword_colors()
Sets the member keyword colors. All existing member keyword will be removed. The Dictionary key is the member keyword. The value is the member keyword color.
Color member_variable_color = Color(0, 0, 0, 1) 🔗
Définit la couleur pour les variables membres. Une variable membre est une chaîne non-mot-clé, non-fonction précédée d'un '.'.
Color number_color = Color(0, 0, 0, 1) 🔗
Définit la couleur pour les nombres.
Color symbol_color = Color(0, 0, 0, 1) 🔗
Définit la couleur pour les symboles.
Descriptions des méthodes
void add_color_region(start_key: String, end_key: String, color: Color, line_only: bool = false) 🔗
Adds a color region (such as for comments or strings) 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_keyword_color(keyword: String, color: Color) 🔗
Définit la couleur pour un mot-clé.
Le mot-clé ne peut contenir aucun symbole sauf '_'.
void add_member_keyword_color(member_keyword: String, color: Color) 🔗
Sets the color for a member keyword.
The member keyword cannot contain any symbols except '_'.
It will not be highlighted if preceded by a '.'.
void clear_color_regions() 🔗
Supprime toutes les régions de couleur.
void clear_keyword_colors() 🔗
Supprime tout les mots-clés.
void clear_member_keyword_colors() 🔗
Removes all member keywords.
Color get_keyword_color(keyword: String) const 🔗
Renvoie la couleur d'un mot-clé.
Color get_member_keyword_color(member_keyword: String) const 🔗
Returns the color for a member keyword.
bool has_color_region(start_key: String) const 🔗
Renvoie true si la clé de départ start_key existe, sinon false.
bool has_keyword_color(keyword: String) const 🔗
Renvoie true si le mot-clé keyword existe, sinon false.
bool has_member_keyword_color(member_keyword: String) const 🔗
Returns true if the member keyword exists, else false.
void remove_color_region(start_key: String) 🔗
Retire la région de couleur qui utilise cette clé de départ.
void remove_keyword_color(keyword: String) 🔗
Supprime le mot-clé.
void remove_member_keyword_color(member_keyword: String) 🔗
Removes the member keyword.