Files
godot-docs/classes/class_codeedit.rst
2023-01-27 15:10:25 +01:00

2081 lines
124 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CodeEdit.xml.
.. _class_CodeEdit:
CodeEdit
========
**Inherits:** :ref:`TextEdit<class_TextEdit>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Multiline text control intended for editing code.
.. rst-class:: classref-introduction-group
Description
-----------
CodeEdit is a specialized :ref:`TextEdit<class_TextEdit>` designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management.
\ **Note:** By default **CodeEdit** always use left-to-right text direction to correctly display source code.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`auto_brace_completion_enabled<class_CodeEdit_property_auto_brace_completion_enabled>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`auto_brace_completion_highlight_matching<class_CodeEdit_property_auto_brace_completion_highlight_matching>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`auto_brace_completion_pairs<class_CodeEdit_property_auto_brace_completion_pairs>` | ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`code_completion_enabled<class_CodeEdit_property_code_completion_enabled>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`String[]<class_String>` | :ref:`code_completion_prefixes<class_CodeEdit_property_code_completion_prefixes>` | ``[]`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`String[]<class_String>` | :ref:`delimiter_comments<class_CodeEdit_property_delimiter_comments>` | ``[]`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`String[]<class_String>` | :ref:`delimiter_strings<class_CodeEdit_property_delimiter_strings>` | ``["' '", "\" \""]`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`gutters_draw_bookmarks<class_CodeEdit_property_gutters_draw_bookmarks>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`gutters_draw_breakpoints_gutter<class_CodeEdit_property_gutters_draw_breakpoints_gutter>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`gutters_draw_executing_lines<class_CodeEdit_property_gutters_draw_executing_lines>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`gutters_draw_fold_gutter<class_CodeEdit_property_gutters_draw_fold_gutter>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`gutters_draw_line_numbers<class_CodeEdit_property_gutters_draw_line_numbers>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`gutters_zero_pad_line_numbers<class_CodeEdit_property_gutters_zero_pad_line_numbers>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`indent_automatic<class_CodeEdit_property_indent_automatic>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`String[]<class_String>` | :ref:`indent_automatic_prefixes<class_CodeEdit_property_indent_automatic_prefixes>` | ``[":", "{", "[", "("]`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`indent_size<class_CodeEdit_property_indent_size>` | ``4`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`indent_use_spaces<class_CodeEdit_property_indent_use_spaces>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`LayoutDirection<enum_Control_LayoutDirection>` | layout_direction | ``2`` (overrides :ref:`Control<class_Control_property_layout_direction>`) |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`line_folding<class_CodeEdit_property_line_folding>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`int[]<class_int>` | :ref:`line_length_guidelines<class_CodeEdit_property_line_length_guidelines>` | ``[]`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`symbol_lookup_on_click<class_CodeEdit_property_symbol_lookup_on_click>` | ``false`` |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
| :ref:`TextDirection<enum_Control_TextDirection>` | text_direction | ``1`` (overrides :ref:`TextEdit<class_TextEdit_property_text_direction>`) |
+------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_confirm_code_completion<class_CodeEdit_method__confirm_code_completion>` **(** :ref:`bool<class_bool>` replace **)** |virtual| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary[]<class_Dictionary>` | :ref:`_filter_code_completion_candidates<class_CodeEdit_method__filter_code_completion_candidates>` **(** :ref:`Dictionary[]<class_Dictionary>` candidates **)** |virtual| |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_request_code_completion<class_CodeEdit_method__request_code_completion>` **(** :ref:`bool<class_bool>` force **)** |virtual| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_auto_brace_completion_pair<class_CodeEdit_method_add_auto_brace_completion_pair>` **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_code_completion_option<class_CodeEdit_method_add_code_completion_option>` **(** :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` type, :ref:`String<class_String>` display_text, :ref:`String<class_String>` insert_text, :ref:`Color<class_Color>` text_color=Color(1, 1, 1, 1), :ref:`Resource<class_Resource>` icon=null, :ref:`Variant<class_Variant>` value=0 **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_comment_delimiter<class_CodeEdit_method_add_comment_delimiter>` **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key, :ref:`bool<class_bool>` line_only=false **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_string_delimiter<class_CodeEdit_method_add_string_delimiter>` **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key, :ref:`bool<class_bool>` line_only=false **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`can_fold_line<class_CodeEdit_method_can_fold_line>` **(** :ref:`int<class_int>` line **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`cancel_code_completion<class_CodeEdit_method_cancel_code_completion>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_bookmarked_lines<class_CodeEdit_method_clear_bookmarked_lines>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_breakpointed_lines<class_CodeEdit_method_clear_breakpointed_lines>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_comment_delimiters<class_CodeEdit_method_clear_comment_delimiters>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_executing_lines<class_CodeEdit_method_clear_executing_lines>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear_string_delimiters<class_CodeEdit_method_clear_string_delimiters>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`confirm_code_completion<class_CodeEdit_method_confirm_code_completion>` **(** :ref:`bool<class_bool>` replace=false **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`do_indent<class_CodeEdit_method_do_indent>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`fold_all_lines<class_CodeEdit_method_fold_all_lines>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`fold_line<class_CodeEdit_method_fold_line>` **(** :ref:`int<class_int>` line **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_auto_brace_completion_close_key<class_CodeEdit_method_get_auto_brace_completion_close_key>` **(** :ref:`String<class_String>` open_key **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_bookmarked_lines<class_CodeEdit_method_get_bookmarked_lines>` **(** **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_breakpointed_lines<class_CodeEdit_method_get_breakpointed_lines>` **(** **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`get_code_completion_option<class_CodeEdit_method_get_code_completion_option>` **(** :ref:`int<class_int>` index **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_code_completion_options<class_CodeEdit_method_get_code_completion_options>` **(** **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_code_completion_selected_index<class_CodeEdit_method_get_code_completion_selected_index>` **(** **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_delimiter_end_key<class_CodeEdit_method_get_delimiter_end_key>` **(** :ref:`int<class_int>` delimiter_index **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`get_delimiter_end_position<class_CodeEdit_method_get_delimiter_end_position>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_delimiter_start_key<class_CodeEdit_method_get_delimiter_start_key>` **(** :ref:`int<class_int>` delimiter_index **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`get_delimiter_start_position<class_CodeEdit_method_get_delimiter_start_position>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_executing_lines<class_CodeEdit_method_get_executing_lines>` **(** **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int[]<class_int>` | :ref:`get_folded_lines<class_CodeEdit_method_get_folded_lines>` **(** **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_text_for_code_completion<class_CodeEdit_method_get_text_for_code_completion>` **(** **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_text_for_symbol_lookup<class_CodeEdit_method_get_text_for_symbol_lookup>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_auto_brace_completion_close_key<class_CodeEdit_method_has_auto_brace_completion_close_key>` **(** :ref:`String<class_String>` close_key **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_auto_brace_completion_open_key<class_CodeEdit_method_has_auto_brace_completion_open_key>` **(** :ref:`String<class_String>` open_key **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_comment_delimiter<class_CodeEdit_method_has_comment_delimiter>` **(** :ref:`String<class_String>` start_key **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_string_delimiter<class_CodeEdit_method_has_string_delimiter>` **(** :ref:`String<class_String>` start_key **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`indent_lines<class_CodeEdit_method_indent_lines>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`is_in_comment<class_CodeEdit_method_is_in_comment>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column=-1 **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`is_in_string<class_CodeEdit_method_is_in_string>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column=-1 **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_line_bookmarked<class_CodeEdit_method_is_line_bookmarked>` **(** :ref:`int<class_int>` line **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_line_breakpointed<class_CodeEdit_method_is_line_breakpointed>` **(** :ref:`int<class_int>` line **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_line_executing<class_CodeEdit_method_is_line_executing>` **(** :ref:`int<class_int>` line **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_line_folded<class_CodeEdit_method_is_line_folded>` **(** :ref:`int<class_int>` line **)** |const| |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_comment_delimiter<class_CodeEdit_method_remove_comment_delimiter>` **(** :ref:`String<class_String>` start_key **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_string_delimiter<class_CodeEdit_method_remove_string_delimiter>` **(** :ref:`String<class_String>` start_key **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`request_code_completion<class_CodeEdit_method_request_code_completion>` **(** :ref:`bool<class_bool>` force=false **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_code_completion_selected_index<class_CodeEdit_method_set_code_completion_selected_index>` **(** :ref:`int<class_int>` index **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_code_hint<class_CodeEdit_method_set_code_hint>` **(** :ref:`String<class_String>` code_hint **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_code_hint_draw_below<class_CodeEdit_method_set_code_hint_draw_below>` **(** :ref:`bool<class_bool>` draw_below **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_line_as_bookmarked<class_CodeEdit_method_set_line_as_bookmarked>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` bookmarked **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_line_as_breakpoint<class_CodeEdit_method_set_line_as_breakpoint>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` breakpointed **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_line_as_executing<class_CodeEdit_method_set_line_as_executing>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` executing **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_symbol_lookup_word_as_valid<class_CodeEdit_method_set_symbol_lookup_word_as_valid>` **(** :ref:`bool<class_bool>` valid **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`toggle_foldable_line<class_CodeEdit_method_toggle_foldable_line>` **(** :ref:`int<class_int>` line **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`unfold_all_lines<class_CodeEdit_method_unfold_all_lines>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`unfold_line<class_CodeEdit_method_unfold_line>` **(** :ref:`int<class_int>` line **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`unindent_lines<class_CodeEdit_method_unindent_lines>` **(** **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`update_code_completion_options<class_CodeEdit_method_update_code_completion_options>` **(** :ref:`bool<class_bool>` force **)** |
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-reftable-group
Theme Properties
----------------
.. table::
:widths: auto
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`background_color<class_CodeEdit_theme_color_background_color>` | ``Color(0, 0, 0, 0)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`bookmark_color<class_CodeEdit_theme_color_bookmark_color>` | ``Color(0.5, 0.64, 1, 0.8)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`brace_mismatch_color<class_CodeEdit_theme_color_brace_mismatch_color>` | ``Color(1, 0.2, 0.2, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`breakpoint_color<class_CodeEdit_theme_color_breakpoint_color>` | ``Color(0.9, 0.29, 0.3, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`caret_background_color<class_CodeEdit_theme_color_caret_background_color>` | ``Color(0, 0, 0, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`caret_color<class_CodeEdit_theme_color_caret_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`code_folding_color<class_CodeEdit_theme_color_code_folding_color>` | ``Color(0.8, 0.8, 0.8, 0.8)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`completion_background_color<class_CodeEdit_theme_color_completion_background_color>` | ``Color(0.17, 0.16, 0.2, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`completion_existing_color<class_CodeEdit_theme_color_completion_existing_color>` | ``Color(0.87, 0.87, 0.87, 0.13)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`completion_font_color<class_CodeEdit_theme_color_completion_font_color>` | ``Color(0.67, 0.67, 0.67, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`completion_scroll_color<class_CodeEdit_theme_color_completion_scroll_color>` | ``Color(1, 1, 1, 0.29)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`completion_scroll_hovered_color<class_CodeEdit_theme_color_completion_scroll_hovered_color>` | ``Color(1, 1, 1, 0.4)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`completion_selected_color<class_CodeEdit_theme_color_completion_selected_color>` | ``Color(0.26, 0.26, 0.27, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`current_line_color<class_CodeEdit_theme_color_current_line_color>` | ``Color(0.25, 0.25, 0.26, 0.8)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`executing_line_color<class_CodeEdit_theme_color_executing_line_color>` | ``Color(0.98, 0.89, 0.27, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_color<class_CodeEdit_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_outline_color<class_CodeEdit_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_placeholder_color<class_CodeEdit_theme_color_font_placeholder_color>` | ``Color(0.875, 0.875, 0.875, 0.6)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_readonly_color<class_CodeEdit_theme_color_font_readonly_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`font_selected_color<class_CodeEdit_theme_color_font_selected_color>` | ``Color(0, 0, 0, 0)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`line_length_guideline_color<class_CodeEdit_theme_color_line_length_guideline_color>` | ``Color(0.3, 0.5, 0.8, 0.1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`line_number_color<class_CodeEdit_theme_color_line_number_color>` | ``Color(0.67, 0.67, 0.67, 0.4)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`search_result_border_color<class_CodeEdit_theme_color_search_result_border_color>` | ``Color(0.3, 0.3, 0.3, 0.4)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`search_result_color<class_CodeEdit_theme_color_search_result_color>` | ``Color(0.3, 0.3, 0.3, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`selection_color<class_CodeEdit_theme_color_selection_color>` | ``Color(0.5, 0.5, 0.5, 1)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Color<class_Color>` | :ref:`word_highlighted_color<class_CodeEdit_theme_color_word_highlighted_color>` | ``Color(0.8, 0.9, 0.9, 0.15)`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`completion_lines<class_CodeEdit_theme_constant_completion_lines>` | ``7`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`completion_max_width<class_CodeEdit_theme_constant_completion_max_width>` | ``50`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`completion_scroll_width<class_CodeEdit_theme_constant_completion_scroll_width>` | ``6`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`line_spacing<class_CodeEdit_theme_constant_line_spacing>` | ``4`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`outline_size<class_CodeEdit_theme_constant_outline_size>` | ``0`` |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Font<class_Font>` | :ref:`font<class_CodeEdit_theme_font_font>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`font_size<class_CodeEdit_theme_font_size_font_size>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`bookmark<class_CodeEdit_theme_icon_bookmark>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`breakpoint<class_CodeEdit_theme_icon_breakpoint>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`can_fold<class_CodeEdit_theme_icon_can_fold>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`executing_line<class_CodeEdit_theme_icon_executing_line>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`folded<class_CodeEdit_theme_icon_folded>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`folded_eol_icon<class_CodeEdit_theme_icon_folded_eol_icon>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`space<class_CodeEdit_theme_icon_space>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`tab<class_CodeEdit_theme_icon_tab>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`completion<class_CodeEdit_theme_style_completion>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_CodeEdit_theme_style_focus>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_CodeEdit_theme_style_normal>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`StyleBox<class_StyleBox>` | :ref:`read_only<class_CodeEdit_theme_style_read_only>` | |
+-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Signals
-------
.. _class_CodeEdit_signal_breakpoint_toggled:
.. rst-class:: classref-signal
**breakpoint_toggled** **(** :ref:`int<class_int>` line **)**
Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_signal_code_completion_requested:
.. rst-class:: classref-signal
**code_completion_requested** **(** **)**
Emitted when the user requests code completion.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_signal_symbol_lookup:
.. rst-class:: classref-signal
**symbol_lookup** **(** :ref:`String<class_String>` symbol, :ref:`int<class_int>` line, :ref:`int<class_int>` column **)**
Emitted when the user has clicked on a valid symbol.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_signal_symbol_validate:
.. rst-class:: classref-signal
**symbol_validate** **(** :ref:`String<class_String>` symbol **)**
Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid<class_CodeEdit_method_set_symbol_lookup_word_as_valid>`.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Enumerations
------------
.. _enum_CodeEdit_CodeCompletionKind:
.. rst-class:: classref-enumeration
enum **CodeCompletionKind**:
.. _class_CodeEdit_constant_KIND_CLASS:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_CLASS** = ``0``
Marks the option as a class.
.. _class_CodeEdit_constant_KIND_FUNCTION:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_FUNCTION** = ``1``
Marks the option as a function.
.. _class_CodeEdit_constant_KIND_SIGNAL:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_SIGNAL** = ``2``
Marks the option as a Godot signal.
.. _class_CodeEdit_constant_KIND_VARIABLE:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_VARIABLE** = ``3``
Marks the option as a variable.
.. _class_CodeEdit_constant_KIND_MEMBER:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_MEMBER** = ``4``
Marks the option as a member.
.. _class_CodeEdit_constant_KIND_ENUM:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_ENUM** = ``5``
Marks the option as a enum entry.
.. _class_CodeEdit_constant_KIND_CONSTANT:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_CONSTANT** = ``6``
Marks the option as a constant.
.. _class_CodeEdit_constant_KIND_NODE_PATH:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_NODE_PATH** = ``7``
Marks the option as a Godot node path.
.. _class_CodeEdit_constant_KIND_FILE_PATH:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_FILE_PATH** = ``8``
Marks the option as a file path.
.. _class_CodeEdit_constant_KIND_PLAIN_TEXT:
.. rst-class:: classref-enumeration-constant
:ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` **KIND_PLAIN_TEXT** = ``9``
Marks the option as unclassified or plain text.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_CodeEdit_property_auto_brace_completion_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **auto_brace_completion_enabled** = ``false``
.. rst-class:: classref-property-setget
- void **set_auto_brace_completion_enabled** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_auto_brace_completion_enabled** **(** **)**
Sets whether brace pairs should be autocompleted.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_auto_brace_completion_highlight_matching:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **auto_brace_completion_highlight_matching** = ``false``
.. rst-class:: classref-property-setget
- void **set_highlight_matching_braces_enabled** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_highlight_matching_braces_enabled** **(** **)**
Highlight mismatching brace pairs.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_auto_brace_completion_pairs:
.. rst-class:: classref-property
:ref:`Dictionary<class_Dictionary>` **auto_brace_completion_pairs** = ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }``
.. rst-class:: classref-property-setget
- void **set_auto_brace_completion_pairs** **(** :ref:`Dictionary<class_Dictionary>` value **)**
- :ref:`Dictionary<class_Dictionary>` **get_auto_brace_completion_pairs** **(** **)**
Sets the brace pairs to be autocompleted.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_code_completion_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **code_completion_enabled** = ``false``
.. rst-class:: classref-property-setget
- void **set_code_completion_enabled** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_code_completion_enabled** **(** **)**
Sets whether code completion is allowed.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_code_completion_prefixes:
.. rst-class:: classref-property
:ref:`String[]<class_String>` **code_completion_prefixes** = ``[]``
.. rst-class:: classref-property-setget
- void **set_code_completion_prefixes** **(** :ref:`String[]<class_String>` value **)**
- :ref:`String[]<class_String>` **get_code_completion_prefixes** **(** **)**
Sets prefixes that will trigger code completion.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_delimiter_comments:
.. rst-class:: classref-property
:ref:`String[]<class_String>` **delimiter_comments** = ``[]``
.. rst-class:: classref-property-setget
- void **set_comment_delimiters** **(** :ref:`String[]<class_String>` value **)**
- :ref:`String[]<class_String>` **get_comment_delimiters** **(** **)**
Sets the comment delimiters. All existing comment delimiters will be removed.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_delimiter_strings:
.. rst-class:: classref-property
:ref:`String[]<class_String>` **delimiter_strings** = ``["' '", "\" \""]``
.. rst-class:: classref-property-setget
- void **set_string_delimiters** **(** :ref:`String[]<class_String>` value **)**
- :ref:`String[]<class_String>` **get_string_delimiters** **(** **)**
Sets the string delimiters. All existing string delimiters will be removed.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_gutters_draw_bookmarks:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **gutters_draw_bookmarks** = ``false``
.. rst-class:: classref-property-setget
- void **set_draw_bookmarks_gutter** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_drawing_bookmarks_gutter** **(** **)**
Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_gutters_draw_breakpoints_gutter:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **gutters_draw_breakpoints_gutter** = ``false``
.. rst-class:: classref-property-setget
- void **set_draw_breakpoints_gutter** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_drawing_breakpoints_gutter** **(** **)**
Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_gutters_draw_executing_lines:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **gutters_draw_executing_lines** = ``false``
.. rst-class:: classref-property-setget
- void **set_draw_executing_lines_gutter** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_drawing_executing_lines_gutter** **(** **)**
Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_gutters_draw_fold_gutter:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **gutters_draw_fold_gutter** = ``false``
.. rst-class:: classref-property-setget
- void **set_draw_fold_gutter** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_drawing_fold_gutter** **(** **)**
Sets if foldable lines icons should be drawn in the gutter.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_gutters_draw_line_numbers:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **gutters_draw_line_numbers** = ``false``
.. rst-class:: classref-property-setget
- void **set_draw_line_numbers** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_draw_line_numbers_enabled** **(** **)**
Sets if line numbers should be drawn in the gutter.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_gutters_zero_pad_line_numbers:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **gutters_zero_pad_line_numbers** = ``false``
.. rst-class:: classref-property-setget
- void **set_line_numbers_zero_padded** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_line_numbers_zero_padded** **(** **)**
Sets if line numbers drawn in the gutter are zero padded.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_indent_automatic:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **indent_automatic** = ``false``
.. rst-class:: classref-property-setget
- void **set_auto_indent_enabled** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_auto_indent_enabled** **(** **)**
Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_indent_automatic_prefixes:
.. rst-class:: classref-property
:ref:`String[]<class_String>` **indent_automatic_prefixes** = ``[":", "{", "[", "("]``
.. rst-class:: classref-property-setget
- void **set_auto_indent_prefixes** **(** :ref:`String[]<class_String>` value **)**
- :ref:`String[]<class_String>` **get_auto_indent_prefixes** **(** **)**
Prefixes to trigger an automatic indent.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_indent_size:
.. rst-class:: classref-property
:ref:`int<class_int>` **indent_size** = ``4``
.. rst-class:: classref-property-setget
- void **set_indent_size** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_indent_size** **(** **)**
Size of tabs, if ``indent_use_spaces`` is enabled the number of spaces to use.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_indent_use_spaces:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **indent_use_spaces** = ``false``
.. rst-class:: classref-property-setget
- void **set_indent_using_spaces** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_indent_using_spaces** **(** **)**
Use spaces instead of tabs for indentation.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_line_folding:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **line_folding** = ``false``
.. rst-class:: classref-property-setget
- void **set_line_folding_enabled** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_line_folding_enabled** **(** **)**
Sets whether line folding is allowed.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_line_length_guidelines:
.. rst-class:: classref-property
:ref:`int[]<class_int>` **line_length_guidelines** = ``[]``
.. rst-class:: classref-property-setget
- void **set_line_length_guidelines** **(** :ref:`int[]<class_int>` value **)**
- :ref:`int[]<class_int>` **get_line_length_guidelines** **(** **)**
Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_property_symbol_lookup_on_click:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **symbol_lookup_on_click** = ``false``
.. rst-class:: classref-property-setget
- void **set_symbol_lookup_on_click_enabled** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_symbol_lookup_on_click_enabled** **(** **)**
Set when a validated word from :ref:`symbol_validate<class_CodeEdit_signal_symbol_validate>` is clicked, the :ref:`symbol_lookup<class_CodeEdit_signal_symbol_lookup>` should be emitted.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_CodeEdit_method__confirm_code_completion:
.. rst-class:: classref-method
void **_confirm_code_completion** **(** :ref:`bool<class_bool>` replace **)** |virtual|
Override this method to define how the selected entry should be inserted. If ``replace`` is true, any existing text should be replaced.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method__filter_code_completion_candidates:
.. rst-class:: classref-method
:ref:`Dictionary[]<class_Dictionary>` **_filter_code_completion_candidates** **(** :ref:`Dictionary[]<class_Dictionary>` candidates **)** |virtual| |const|
Override this method to define what items in ``candidates`` should be displayed.
Both ``candidates`` and the return is a :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>`, see :ref:`get_code_completion_option<class_CodeEdit_method_get_code_completion_option>` for :ref:`Dictionary<class_Dictionary>` content.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method__request_code_completion:
.. rst-class:: classref-method
void **_request_code_completion** **(** :ref:`bool<class_bool>` force **)** |virtual|
Override this method to define what happens when the user requests code completion. If ``force`` is true, any checks should be bypassed.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_add_auto_brace_completion_pair:
.. rst-class:: classref-method
void **add_auto_brace_completion_pair** **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key **)**
Adds a brace pair.
Both the start and end keys must be symbols. Only the start key has to be unique.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_add_code_completion_option:
.. rst-class:: classref-method
void **add_code_completion_option** **(** :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>` type, :ref:`String<class_String>` display_text, :ref:`String<class_String>` insert_text, :ref:`Color<class_Color>` text_color=Color(1, 1, 1, 1), :ref:`Resource<class_Resource>` icon=null, :ref:`Variant<class_Variant>` value=0 **)**
Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options<class_CodeEdit_method_update_code_completion_options>` to update the list.
\ **Note:** This list will replace all current candidates.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_add_comment_delimiter:
.. rst-class:: classref-method
void **add_comment_delimiter** **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key, :ref:`bool<class_bool>` line_only=false **)**
Adds a comment delimiter.
Both the start and end keys must be symbols. Only the start key has to be unique.
Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_add_string_delimiter:
.. rst-class:: classref-method
void **add_string_delimiter** **(** :ref:`String<class_String>` start_key, :ref:`String<class_String>` end_key, :ref:`bool<class_bool>` line_only=false **)**
Adds a string delimiter.
Both the start and end keys must be symbols. Only the start key has to be unique.
Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_can_fold_line:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **can_fold_line** **(** :ref:`int<class_int>` line **)** |const|
Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_cancel_code_completion:
.. rst-class:: classref-method
void **cancel_code_completion** **(** **)**
Cancels the autocomplete menu.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_clear_bookmarked_lines:
.. rst-class:: classref-method
void **clear_bookmarked_lines** **(** **)**
Clears all bookmarked lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_clear_breakpointed_lines:
.. rst-class:: classref-method
void **clear_breakpointed_lines** **(** **)**
Clears all breakpointed lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_clear_comment_delimiters:
.. rst-class:: classref-method
void **clear_comment_delimiters** **(** **)**
Removes all comment delimiters.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_clear_executing_lines:
.. rst-class:: classref-method
void **clear_executing_lines** **(** **)**
Clears all executed lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_clear_string_delimiters:
.. rst-class:: classref-method
void **clear_string_delimiters** **(** **)**
Removes all string delimiters.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_confirm_code_completion:
.. rst-class:: classref-method
void **confirm_code_completion** **(** :ref:`bool<class_bool>` replace=false **)**
Inserts the selected entry into the text. If ``replace`` is true, any existing text is replaced rather then merged.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_do_indent:
.. rst-class:: classref-method
void **do_indent** **(** **)**
Perform an indent as if the user activated the "ui_text_indent" action.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_fold_all_lines:
.. rst-class:: classref-method
void **fold_all_lines** **(** **)**
Folds all lines that are possible to be folded (see :ref:`can_fold_line<class_CodeEdit_method_can_fold_line>`).
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_fold_line:
.. rst-class:: classref-method
void **fold_line** **(** :ref:`int<class_int>` line **)**
Folds the given line, if possible (see :ref:`can_fold_line<class_CodeEdit_method_can_fold_line>`).
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_auto_brace_completion_close_key:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_auto_brace_completion_close_key** **(** :ref:`String<class_String>` open_key **)** |const|
Gets the matching auto brace close key for ``open_key``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_bookmarked_lines:
.. rst-class:: classref-method
:ref:`PackedInt32Array<class_PackedInt32Array>` **get_bookmarked_lines** **(** **)** |const|
Gets all bookmarked lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_breakpointed_lines:
.. rst-class:: classref-method
:ref:`PackedInt32Array<class_PackedInt32Array>` **get_breakpointed_lines** **(** **)** |const|
Gets all breakpointed lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_code_completion_option:
.. rst-class:: classref-method
:ref:`Dictionary<class_Dictionary>` **get_code_completion_option** **(** :ref:`int<class_int>` index **)** |const|
Gets the completion option at ``index``. The return :ref:`Dictionary<class_Dictionary>` has the following key-values:
\ ``kind``: :ref:`CodeCompletionKind<enum_CodeEdit_CodeCompletionKind>`\
\ ``display_text``: Text that is shown on the autocomplete menu.
\ ``insert_text``: Text that is to be inserted when this item is selected.
\ ``font_color``: Color of the text on the autocomplete menu.
\ ``icon``: Icon to draw on the autocomplete menu.
\ ``default_value``: Value of the symbol.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_code_completion_options:
.. rst-class:: classref-method
:ref:`Dictionary[]<class_Dictionary>` **get_code_completion_options** **(** **)** |const|
Gets all completion options, see :ref:`get_code_completion_option<class_CodeEdit_method_get_code_completion_option>` for return content.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_code_completion_selected_index:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_code_completion_selected_index** **(** **)** |const|
Gets the index of the current selected completion option.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_delimiter_end_key:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_delimiter_end_key** **(** :ref:`int<class_int>` delimiter_index **)** |const|
Gets the end key for a string or comment region index.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_delimiter_end_position:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **get_delimiter_end_position** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |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 :ref:`Vector2<class_Vector2>` values will be ``-1``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_delimiter_start_key:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_delimiter_start_key** **(** :ref:`int<class_int>` delimiter_index **)** |const|
Gets the start key for a string or comment region index.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_delimiter_start_position:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **get_delimiter_start_position** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const|
If ``line`` ``column`` is in a string or comment, returns the start position of the region. If not or no start could be found, both :ref:`Vector2<class_Vector2>` values will be ``-1``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_executing_lines:
.. rst-class:: classref-method
:ref:`PackedInt32Array<class_PackedInt32Array>` **get_executing_lines** **(** **)** |const|
Gets all executing lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_folded_lines:
.. rst-class:: classref-method
:ref:`int[]<class_int>` **get_folded_lines** **(** **)** |const|
Returns all lines that are current folded.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_text_for_code_completion:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_text_for_code_completion** **(** **)** |const|
Returns the full text with char ``0xFFFF`` at the caret location.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_get_text_for_symbol_lookup:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_text_for_symbol_lookup** **(** **)**
Returns the full text with char ``0xFFFF`` at the cursor location.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_has_auto_brace_completion_close_key:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_auto_brace_completion_close_key** **(** :ref:`String<class_String>` close_key **)** |const|
Returns ``true`` if close key ``close_key`` exists.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_has_auto_brace_completion_open_key:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_auto_brace_completion_open_key** **(** :ref:`String<class_String>` open_key **)** |const|
Returns ``true`` if open key ``open_key`` exists.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_has_comment_delimiter:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_comment_delimiter** **(** :ref:`String<class_String>` start_key **)** |const|
Returns ``true`` if comment ``start_key`` exists.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_has_string_delimiter:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_string_delimiter** **(** :ref:`String<class_String>` start_key **)** |const|
Returns ``true`` if string ``start_key`` exists.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_indent_lines:
.. rst-class:: classref-method
void **indent_lines** **(** **)**
Indents selected lines, or in the case of no selection the caret line by one.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_is_in_comment:
.. rst-class:: classref-method
:ref:`int<class_int>` **is_in_comment** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column=-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``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_is_in_string:
.. rst-class:: classref-method
:ref:`int<class_int>` **is_in_string** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column=-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``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_is_line_bookmarked:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_line_bookmarked** **(** :ref:`int<class_int>` line **)** |const|
Returns whether the line at the specified index is bookmarked or not.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_is_line_breakpointed:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_line_breakpointed** **(** :ref:`int<class_int>` line **)** |const|
Returns whether the line at the specified index is breakpointed or not.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_is_line_executing:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_line_executing** **(** :ref:`int<class_int>` line **)** |const|
Returns whether the line at the specified index is marked as executing or not.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_is_line_folded:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_line_folded** **(** :ref:`int<class_int>` line **)** |const|
Returns whether the line at the specified index is folded or not.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_remove_comment_delimiter:
.. rst-class:: classref-method
void **remove_comment_delimiter** **(** :ref:`String<class_String>` start_key **)**
Removes the comment delimiter with ``start_key``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_remove_string_delimiter:
.. rst-class:: classref-method
void **remove_string_delimiter** **(** :ref:`String<class_String>` start_key **)**
Removes the string delimiter with ``start_key``.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_request_code_completion:
.. rst-class:: classref-method
void **request_code_completion** **(** :ref:`bool<class_bool>` force=false **)**
Emits :ref:`code_completion_requested<class_CodeEdit_signal_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.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_set_code_completion_selected_index:
.. rst-class:: classref-method
void **set_code_completion_selected_index** **(** :ref:`int<class_int>` index **)**
Sets the current selected completion option.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_set_code_hint:
.. rst-class:: classref-method
void **set_code_hint** **(** :ref:`String<class_String>` code_hint **)**
Sets the code hint text. Pass an empty string to clear.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_set_code_hint_draw_below:
.. rst-class:: classref-method
void **set_code_hint_draw_below** **(** :ref:`bool<class_bool>` draw_below **)**
Sets if the code hint should draw below the text.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_set_line_as_bookmarked:
.. rst-class:: classref-method
void **set_line_as_bookmarked** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` bookmarked **)**
Sets the line as bookmarked.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_set_line_as_breakpoint:
.. rst-class:: classref-method
void **set_line_as_breakpoint** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` breakpointed **)**
Sets the line as breakpointed.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_set_line_as_executing:
.. rst-class:: classref-method
void **set_line_as_executing** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` executing **)**
Sets the line as executing.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_set_symbol_lookup_word_as_valid:
.. rst-class:: classref-method
void **set_symbol_lookup_word_as_valid** **(** :ref:`bool<class_bool>` valid **)**
Sets the symbol emitted by :ref:`symbol_validate<class_CodeEdit_signal_symbol_validate>` as a valid lookup.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_toggle_foldable_line:
.. rst-class:: classref-method
void **toggle_foldable_line** **(** :ref:`int<class_int>` line **)**
Toggle the folding of the code block at the given line.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_unfold_all_lines:
.. rst-class:: classref-method
void **unfold_all_lines** **(** **)**
Unfolds all lines, folded or not.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_unfold_line:
.. rst-class:: classref-method
void **unfold_line** **(** :ref:`int<class_int>` line **)**
Unfolds all lines that were previously folded.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_unindent_lines:
.. rst-class:: classref-method
void **unindent_lines** **(** **)**
Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_method_update_code_completion_options:
.. rst-class:: classref-method
void **update_code_completion_options** **(** :ref:`bool<class_bool>` force **)**
Submits all completion options added with :ref:`add_code_completion_option<class_CodeEdit_method_add_code_completion_option>`. Will try to force the autoccomplete menu to popup, if ``force`` is ``true``.
\ **Note:** This will replace all current candidates.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Theme Property Descriptions
---------------------------
.. _class_CodeEdit_theme_color_background_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 0)``
Sets the background :ref:`Color<class_Color>`.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_bookmark_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **bookmark_color** = ``Color(0.5, 0.64, 1, 0.8)``
:ref:`Color<class_Color>` of the bookmark icon for bookmarked lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_brace_mismatch_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **brace_mismatch_color** = ``Color(1, 0.2, 0.2, 1)``
:ref:`Color<class_Color>` of the text to highlight mismatched braces.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_breakpoint_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **breakpoint_color** = ``Color(0.9, 0.29, 0.3, 1)``
:ref:`Color<class_Color>` of the breakpoint icon for bookmarked lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_caret_background_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **caret_background_color** = ``Color(0, 0, 0, 1)``
:ref:`Color<class_Color>` of the text behind the caret when block caret is enabled.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_caret_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **caret_color** = ``Color(0.875, 0.875, 0.875, 1)``
:ref:`Color<class_Color>` of the caret.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_code_folding_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **code_folding_color** = ``Color(0.8, 0.8, 0.8, 0.8)``
:ref:`Color<class_Color>` for all icons related to line folding.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_completion_background_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **completion_background_color** = ``Color(0.17, 0.16, 0.2, 1)``
Sets the background :ref:`Color<class_Color>` for the code completion popup.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_completion_existing_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **completion_existing_color** = ``Color(0.87, 0.87, 0.87, 0.13)``
Background highlight :ref:`Color<class_Color>` for matching text in code completion options.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_completion_font_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **completion_font_color** = ``Color(0.67, 0.67, 0.67, 1)``
Font :ref:`Color<class_Color>` for the code completion popup.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_completion_scroll_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **completion_scroll_color** = ``Color(1, 1, 1, 0.29)``
:ref:`Color<class_Color>` of the scrollbar in the code completion popup.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_completion_scroll_hovered_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **completion_scroll_hovered_color** = ``Color(1, 1, 1, 0.4)``
:ref:`Color<class_Color>` of the scrollbar in the code completion popup when hovered.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_completion_selected_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **completion_selected_color** = ``Color(0.26, 0.26, 0.27, 1)``
Background highlight :ref:`Color<class_Color>` for the current selected option item in the code completion popup.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_current_line_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **current_line_color** = ``Color(0.25, 0.25, 0.26, 0.8)``
Background :ref:`Color<class_Color>` of the line containing the caret.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_executing_line_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **executing_line_color** = ``Color(0.98, 0.89, 0.27, 1)``
:ref:`Color<class_Color>` of the executing icon for executing lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_font_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)``
Sets the font :ref:`Color<class_Color>`.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_font_outline_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)``
The tint of text outline of the **CodeEdit**.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_font_placeholder_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)``
Font color for :ref:`TextEdit.placeholder_text<class_TextEdit_property_placeholder_text>`.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_font_readonly_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)``
Sets the font :ref:`Color<class_Color>` when :ref:`TextEdit.editable<class_TextEdit_property_editable>` is disabled.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_font_selected_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)``
Sets the :ref:`Color<class_Color>` of the selected text. If equal to ``Color(0, 0, 0, 0)``, it will be ignored.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_line_length_guideline_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **line_length_guideline_color** = ``Color(0.3, 0.5, 0.8, 0.1)``
:ref:`Color<class_Color>` of the main line length guideline, secondary guidelines will have 50% alpha applied.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_line_number_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **line_number_color** = ``Color(0.67, 0.67, 0.67, 0.4)``
Sets the :ref:`Color<class_Color>` of line numbers.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_search_result_border_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **search_result_border_color** = ``Color(0.3, 0.3, 0.3, 0.4)``
:ref:`Color<class_Color>` of the border around text that matches the search query.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_search_result_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **search_result_color** = ``Color(0.3, 0.3, 0.3, 1)``
:ref:`Color<class_Color>` behind the text that matches the search query.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_selection_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)``
Sets the highlight :ref:`Color<class_Color>` of text selections.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_color_word_highlighted_color:
.. rst-class:: classref-themeproperty
:ref:`Color<class_Color>` **word_highlighted_color** = ``Color(0.8, 0.9, 0.9, 0.15)``
Sets the highlight :ref:`Color<class_Color>` of multiple occurrences. :ref:`TextEdit.highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` has to be enabled.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_constant_completion_lines:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **completion_lines** = ``7``
Max number of options to display in the code completion popup at any one time.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_constant_completion_max_width:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **completion_max_width** = ``50``
Max width of options in the code completion popup. Options longer then this will be cut off.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_constant_completion_scroll_width:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **completion_scroll_width** = ``6``
Width of the scrollbar in the code completion popup.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_constant_line_spacing:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **line_spacing** = ``4``
Sets the spacing between the lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_constant_outline_size:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **outline_size** = ``0``
The size of the text outline.
\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_CodeEdit_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_font_font:
.. rst-class:: classref-themeproperty
:ref:`Font<class_Font>` **font**
Sets the default :ref:`Font<class_Font>`.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_font_size_font_size:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **font_size**
Sets default font size.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_icon_bookmark:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **bookmark**
Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the bookmark gutter for bookmarked lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_icon_breakpoint:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **breakpoint**
Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the breakpoint gutter for breakpointed lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_icon_can_fold:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **can_fold**
Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the line folding gutter when a line can be folded.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_icon_executing_line:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **executing_line**
Icon to draw in the executing gutter for executing lines.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_icon_folded:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **folded**
Sets a custom :ref:`Texture2D<class_Texture2D>` to draw in the line folding gutter when a line is folded and can be unfolded.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_icon_folded_eol_icon:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **folded_eol_icon**
Sets a custom :ref:`Texture2D<class_Texture2D>` to draw at the end of a folded line.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_icon_space:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **space**
Sets a custom :ref:`Texture2D<class_Texture2D>` for space text characters.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_icon_tab:
.. rst-class:: classref-themeproperty
:ref:`Texture2D<class_Texture2D>` **tab**
Sets a custom :ref:`Texture2D<class_Texture2D>` for tab text characters.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_style_completion:
.. rst-class:: classref-themeproperty
:ref:`StyleBox<class_StyleBox>` **completion**
:ref:`StyleBox<class_StyleBox>` for the code completion popup.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_style_focus:
.. rst-class:: classref-themeproperty
:ref:`StyleBox<class_StyleBox>` **focus**
Sets the :ref:`StyleBox<class_StyleBox>` when in focus. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_style_normal:
.. rst-class:: classref-themeproperty
:ref:`StyleBox<class_StyleBox>` **normal**
Sets the :ref:`StyleBox<class_StyleBox>`.
.. rst-class:: classref-item-separator
----
.. _class_CodeEdit_theme_style_read_only:
.. rst-class:: classref-themeproperty
:ref:`StyleBox<class_StyleBox>` **read_only**
Sets the :ref:`StyleBox<class_StyleBox>` when :ref:`TextEdit.editable<class_TextEdit_property_editable>` is disabled.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`