godot/scene/gui/text_edit.cpp

/**************************************************************************/
/*  text_edit.cpp                                                         */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "text_edit.h"
#include "text_edit.compat.inc"

#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/input/input_map.h"
#include "core/object/script_language.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/string/string_builder.h"
#include "core/string/translation_server.h"
#include "scene/gui/label.h"
#include "scene/main/window.h"
#include "scene/theme/theme_db.h"

///////////////////////////////////////////////////////////////////////////////
///                            TEXT                                         ///
///////////////////////////////////////////////////////////////////////////////

void TextEdit::Text::set_font(const Ref<Font> &p_font) {}

void TextEdit::Text::set_font_size(int p_font_size) {}

void TextEdit::Text::set_tab_size(int p_tab_size) {}

int TextEdit::Text::get_tab_size() const {}

void TextEdit::Text::set_indent_wrapped_lines(bool p_enabled) {}

bool TextEdit::Text::is_indent_wrapped_lines() const {}

void TextEdit::Text::set_direction_and_language(TextServer::Direction p_direction, const String &p_language) {}

void TextEdit::Text::set_draw_control_chars(bool p_enabled) {}

int TextEdit::Text::get_line_width(int p_line, int p_wrap_index) const {}

int TextEdit::Text::get_line_height() const {}

void TextEdit::Text::set_width(float p_width) {}

float TextEdit::Text::get_width() const {}

void TextEdit::Text::set_brk_flags(BitField<TextServer::LineBreakFlag> p_flags) {}

BitField<TextServer::LineBreakFlag> TextEdit::Text::get_brk_flags() const {}

int TextEdit::Text::get_line_wrap_amount(int p_line) const {}

Vector<Vector2i> TextEdit::Text::get_line_wrap_ranges(int p_line) const {}

const Ref<TextParagraph> TextEdit::Text::get_line_data(int p_line) const {}

_FORCE_INLINE_ const String &TextEdit::Text::operator[](int p_line) const {}

void TextEdit::Text::_calculate_line_height() {}

void TextEdit::Text::_calculate_max_line_width() {}

void TextEdit::Text::invalidate_cache(int p_line, int p_column, bool p_text_changed, const String &p_ime_text, const Array &p_bidi_override) {}

void TextEdit::Text::invalidate_all_lines() {}

void TextEdit::Text::invalidate_font() {}

void TextEdit::Text::invalidate_all() {}

void TextEdit::Text::clear() {}

int TextEdit::Text::get_max_width() const {}

void TextEdit::Text::set(int p_line, const String &p_text, const Array &p_bidi_override) {}

void TextEdit::Text::insert(int p_at, const Vector<String> &p_text, const Vector<Array> &p_bidi_override) {}

void TextEdit::Text::remove_range(int p_from_line, int p_to_line) {}

void TextEdit::Text::add_gutter(int p_at) {}

void TextEdit::Text::remove_gutter(int p_gutter) {}

void TextEdit::Text::move_gutters(int p_from_line, int p_to_line) {}

void TextEdit::Text::set_use_default_word_separators(bool p_enabled) {}

void TextEdit::Text::set_use_custom_word_separators(bool p_enabled) {}

bool TextEdit::Text::is_default_word_separators_enabled() const {}

bool TextEdit::Text::is_custom_word_separators_enabled() const {}

String TextEdit::Text::get_custom_word_separators() const {}

String TextEdit::Text::get_default_word_separators() const {}

// Get default and/or custom word separators depending on the option enabled.
String TextEdit::Text::get_enabled_word_separators() const {}

///////////////////////////////////////////////////////////////////////////////
///                            TEXT EDIT                                    ///
///////////////////////////////////////////////////////////////////////////////

void TextEdit::_notification(int p_what) {}

void TextEdit::unhandled_key_input(const Ref<InputEvent> &p_event) {}

bool TextEdit::alt_input(const Ref<InputEvent> &p_gui_input) {}

void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) {}

/* Input actions. */
void TextEdit::_swap_current_input_direction() {}

void TextEdit::_new_line(bool p_split_current_line, bool p_above) {}

void TextEdit::_move_caret_left(bool p_select, bool p_move_by_word) {}

void TextEdit::_move_caret_right(bool p_select, bool p_move_by_word) {}

void TextEdit::_move_caret_up(bool p_select) {}

void TextEdit::_move_caret_down(bool p_select) {}

void TextEdit::_move_caret_to_line_start(bool p_select) {}

void TextEdit::_move_caret_to_line_end(bool p_select) {}

void TextEdit::_move_caret_page_up(bool p_select) {}

void TextEdit::_move_caret_page_down(bool p_select) {}

void TextEdit::_do_backspace(bool p_word, bool p_all_to_left) {}

void TextEdit::_delete(bool p_word, bool p_all_to_right) {}

void TextEdit::_move_caret_document_start(bool p_select) {}

void TextEdit::_move_caret_document_end(bool p_select) {}

bool TextEdit::_clear_carets_and_selection() {}

void TextEdit::_update_placeholder() {}

bool TextEdit::_using_placeholder() const {}

void TextEdit::_update_theme_item_cache() {}

void TextEdit::_update_caches() {}

void TextEdit::_close_ime_window() {}

void TextEdit::_update_ime_window_position() {}

void TextEdit::_update_ime_text() {}

/* General overrides. */
Size2 TextEdit::get_minimum_size() const {}

bool TextEdit::is_text_field() const {}

Variant TextEdit::get_drag_data(const Point2 &p_point) {}

bool TextEdit::can_drop_data(const Point2 &p_point, const Variant &p_data) const {}

void TextEdit::drop_data(const Point2 &p_point, const Variant &p_data) {}

Control::CursorShape TextEdit::get_cursor_shape(const Point2 &p_pos) const {}

String TextEdit::get_tooltip(const Point2 &p_pos) const {}

void TextEdit::set_tooltip_request_func(const Callable &p_tooltip_callback) {}

/* Text */
// Text properties.
bool TextEdit::has_ime_text() const {}

void TextEdit::cancel_ime() {}

void TextEdit::apply_ime() {}

void TextEdit::set_editable(bool p_editable) {}

bool TextEdit::is_editable() const {}

void TextEdit::set_text_direction(Control::TextDirection p_text_direction) {}

Control::TextDirection TextEdit::get_text_direction() const {}

void TextEdit::set_language(const String &p_language) {}

String TextEdit::get_language() const {}

void TextEdit::set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser) {}

TextServer::StructuredTextParser TextEdit::get_structured_text_bidi_override() const {}

void TextEdit::set_structured_text_bidi_override_options(Array p_args) {}

Array TextEdit::get_structured_text_bidi_override_options() const {}

void TextEdit::set_tab_size(const int p_size) {}

int TextEdit::get_tab_size() const {}

void TextEdit::set_indent_wrapped_lines(bool p_enabled) {}

bool TextEdit::is_indent_wrapped_lines() const {}

// User controls
void TextEdit::set_overtype_mode_enabled(bool p_enabled) {}

bool TextEdit::is_overtype_mode_enabled() const {}

void TextEdit::set_context_menu_enabled(bool p_enabled) {}

bool TextEdit::is_context_menu_enabled() const {}

void TextEdit::set_shortcut_keys_enabled(bool p_enabled) {}

bool TextEdit::is_shortcut_keys_enabled() const {}

void TextEdit::set_virtual_keyboard_enabled(bool p_enabled) {}

bool TextEdit::is_virtual_keyboard_enabled() const {}

void TextEdit::set_middle_mouse_paste_enabled(bool p_enabled) {}

bool TextEdit::is_middle_mouse_paste_enabled() const {}

// Text manipulation
void TextEdit::clear() {}

void TextEdit::_clear() {}

void TextEdit::set_text(const String &p_text) {}

String TextEdit::get_text() const {}

int TextEdit::get_line_count() const {}

void TextEdit::set_placeholder(const String &p_text) {}

String TextEdit::get_placeholder() const {}

void TextEdit::set_line(int p_line, const String &p_new_text) {}

String TextEdit::get_line(int p_line) const {}

int TextEdit::get_line_width(int p_line, int p_wrap_index) const {}

int TextEdit::get_line_height() const {}

int TextEdit::get_indent_level(int p_line) const {}

int TextEdit::get_first_non_whitespace_column(int p_line) const {}

void TextEdit::swap_lines(int p_from_line, int p_to_line) {}

void TextEdit::insert_line_at(int p_line, const String &p_text) {}

void TextEdit::remove_line_at(int p_line, bool p_move_carets_down) {}

void TextEdit::insert_text_at_caret(const String &p_text, int p_caret) {}

void TextEdit::insert_text(const String &p_text, int p_line, int p_column, bool p_before_selection_begin, bool p_before_selection_end) {}

void TextEdit::remove_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column) {}

int TextEdit::get_last_unhidden_line() const {}

int TextEdit::get_next_visible_line_offset_from(int p_line_from, int p_visible_amount) const {}

Point2i TextEdit::get_next_visible_line_index_offset_from(int p_line_from, int p_wrap_index_from, int p_visible_amount) const {}

// Overridable actions
void TextEdit::handle_unicode_input(const uint32_t p_unicode, int p_caret) {}

void TextEdit::backspace(int p_caret) {}

void TextEdit::cut(int p_caret) {}

void TextEdit::copy(int p_caret) {}

void TextEdit::paste(int p_caret) {}

void TextEdit::paste_primary_clipboard(int p_caret) {}

// Context menu.
PopupMenu *TextEdit::get_menu() const {}

bool TextEdit::is_menu_visible() const {}

void TextEdit::menu_option(int p_option) {}

/* Versioning */
void TextEdit::start_action(EditAction p_action) {}

void TextEdit::end_action() {}

TextEdit::EditAction TextEdit::get_current_action() const {}

void TextEdit::begin_complex_operation() {}

void TextEdit::end_complex_operation() {}

bool TextEdit::has_undo() const {}

bool TextEdit::has_redo() const {}

void TextEdit::undo() {}

void TextEdit::redo() {}

void TextEdit::clear_undo_history() {}

bool TextEdit::is_insert_text_operation() const {}

void TextEdit::tag_saved_version() {}

uint32_t TextEdit::get_version() const {}

uint32_t TextEdit::get_saved_version() const {}

/* Search */
void TextEdit::set_search_text(const String &p_search_text) {}

void TextEdit::set_search_flags(uint32_t p_flags) {}

Point2i TextEdit::search(const String &p_key, uint32_t p_search_flags, int p_from_line, int p_from_column) const {}

/* Mouse */
Point2 TextEdit::get_local_mouse_pos() const {}

String TextEdit::get_word_at_pos(const Vector2 &p_pos) const {}

Point2i TextEdit::get_line_column_at_pos(const Point2i &p_pos, bool p_allow_out_of_bounds) const {}

Point2i TextEdit::get_pos_at_line_column(int p_line, int p_column) const {}

Rect2i TextEdit::get_rect_at_line_column(int p_line, int p_column) const {}

int TextEdit::get_minimap_line_at_pos(const Point2i &p_pos) const {}

bool TextEdit::is_dragging_cursor() const {}

bool TextEdit::is_mouse_over_selection(bool p_edges, int p_caret) const {}

/* Caret */
void TextEdit::set_caret_type(CaretType p_type) {}

TextEdit::CaretType TextEdit::get_caret_type() const {}

void TextEdit::set_caret_blink_enabled(bool p_enabled) {}

bool TextEdit::is_caret_blink_enabled() const {}

float TextEdit::get_caret_blink_interval() const {}

void TextEdit::set_caret_blink_interval(const float p_interval) {}

void TextEdit::set_draw_caret_when_editable_disabled(bool p_enable) {}

bool TextEdit::is_drawing_caret_when_editable_disabled() const {}

void TextEdit::set_move_caret_on_right_click_enabled(bool p_enabled) {}

bool TextEdit::is_move_caret_on_right_click_enabled() const {}

void TextEdit::set_caret_mid_grapheme_enabled(bool p_enabled) {}

bool TextEdit::is_caret_mid_grapheme_enabled() const {}

void TextEdit::set_multiple_carets_enabled(bool p_enabled) {}

bool TextEdit::is_multiple_carets_enabled() const {}

int TextEdit::add_caret(int p_line, int p_column) {}

void TextEdit::remove_caret(int p_caret) {}

void TextEdit::remove_drag_caret() {}

void TextEdit::remove_secondary_carets() {}

int TextEdit::get_caret_count() const {}

void TextEdit::add_caret_at_carets(bool p_below) {}

struct _CaretSortComparator {};

Vector<int> TextEdit::get_sorted_carets(bool p_include_ignored_carets) const {}

void TextEdit::collapse_carets(int p_from_line, int p_from_column, int p_to_line, int p_to_column, bool p_inclusive) {}

void TextEdit::merge_overlapping_carets() {}

// Starts a multicaret edit operation. Call this before iterating over the carets and call [end_multicaret_edit] afterwards.
void TextEdit::begin_multicaret_edit() {}

void TextEdit::end_multicaret_edit() {}

bool TextEdit::is_in_mulitcaret_edit() const {}

bool TextEdit::multicaret_edit_ignore_caret(int p_caret) const {}

bool TextEdit::is_caret_visible(int p_caret) const {}

Point2 TextEdit::get_caret_draw_pos(int p_caret) const {}

void TextEdit::set_caret_line(int p_line, bool p_adjust_viewport, bool p_can_be_hidden, int p_wrap_index, int p_caret) {}

int TextEdit::get_caret_line(int p_caret) const {}

void TextEdit::set_caret_column(int p_column, bool p_adjust_viewport, int p_caret) {}

int TextEdit::get_caret_column(int p_caret) const {}

int TextEdit::get_caret_wrap_index(int p_caret) const {}

String TextEdit::get_word_under_caret(int p_caret) const {}

/* Selection. */
void TextEdit::set_selecting_enabled(bool p_enabled) {}

bool TextEdit::is_selecting_enabled() const {}

void TextEdit::set_deselect_on_focus_loss_enabled(bool p_enabled) {}

bool TextEdit::is_deselect_on_focus_loss_enabled() const {}

void TextEdit::set_drag_and_drop_selection_enabled(bool p_enabled) {}

bool TextEdit::is_drag_and_drop_selection_enabled() const {}

void TextEdit::set_selection_mode(SelectionMode p_mode) {}

TextEdit::SelectionMode TextEdit::get_selection_mode() const {}

void TextEdit::select_all() {}

void TextEdit::select_word_under_caret(int p_caret) {}

void TextEdit::add_selection_for_next_occurrence() {}

void TextEdit::skip_selection_for_next_occurrence() {}

void TextEdit::select(int p_origin_line, int p_origin_column, int p_caret_line, int p_caret_column, int p_caret) {}

bool TextEdit::has_selection(int p_caret) const {}

String TextEdit::get_selected_text(int p_caret) {}

int TextEdit::get_selection_at_line_column(int p_line, int p_column, bool p_include_edges, bool p_only_selections) const {}

Vector<Point2i> TextEdit::get_line_ranges_from_carets(bool p_only_selections, bool p_merge_adjacent) const {}

TypedArray<Vector2i> TextEdit::get_line_ranges_from_carets_typed_array(bool p_only_selections, bool p_merge_adjacent) const {}

void TextEdit::set_selection_origin_line(int p_line, bool p_can_be_hidden, int p_wrap_index, int p_caret) {}

void TextEdit::set_selection_origin_column(int p_column, int p_caret) {}

int TextEdit::get_selection_origin_line(int p_caret) const {}

int TextEdit::get_selection_origin_column(int p_caret) const {}

int TextEdit::get_selection_from_line(int p_caret) const {}

int TextEdit::get_selection_from_column(int p_caret) const {}

int TextEdit::get_selection_to_line(int p_caret) const {}

int TextEdit::get_selection_to_column(int p_caret) const {}

bool TextEdit::is_caret_after_selection_origin(int p_caret) const {}

void TextEdit::deselect(int p_caret) {}

void TextEdit::delete_selection(int p_caret) {}

/* Line wrapping. */
void TextEdit::set_line_wrapping_mode(LineWrappingMode p_wrapping_mode) {}

TextEdit::LineWrappingMode TextEdit::get_line_wrapping_mode() const {}

void TextEdit::set_autowrap_mode(TextServer::AutowrapMode p_mode) {}

TextServer::AutowrapMode TextEdit::get_autowrap_mode() const {}

bool TextEdit::is_line_wrapped(int p_line) const {}

int TextEdit::get_line_wrap_count(int p_line) const {}

int TextEdit::get_line_wrap_index_at_column(int p_line, int p_column) const {}

Vector<String> TextEdit::get_line_wrapped_text(int p_line) const {}

/* Viewport */
// Scrolling.
void TextEdit::set_smooth_scroll_enabled(bool p_enabled) {}

bool TextEdit::is_smooth_scroll_enabled() const {}

void TextEdit::set_scroll_past_end_of_file_enabled(bool p_enabled) {}

bool TextEdit::is_scroll_past_end_of_file_enabled() const {}

VScrollBar *TextEdit::get_v_scroll_bar() const {}

HScrollBar *TextEdit::get_h_scroll_bar() const {}

void TextEdit::set_v_scroll(double p_scroll) {}

double TextEdit::get_v_scroll() const {}

void TextEdit::set_h_scroll(int p_scroll) {}

int TextEdit::get_h_scroll() const {}

void TextEdit::set_v_scroll_speed(float p_speed) {}

float TextEdit::get_v_scroll_speed() const {}

void TextEdit::set_fit_content_height_enabled(bool p_enabled) {}

bool TextEdit::is_fit_content_height_enabled() const {}

void TextEdit::set_fit_content_width_enabled(bool p_enabled) {}

bool TextEdit::is_fit_content_width_enabled() const {}

double TextEdit::get_scroll_pos_for_line(int p_line, int p_wrap_index) const {}

// Visible lines.
void TextEdit::set_line_as_first_visible(int p_line, int p_wrap_index) {}

int TextEdit::get_first_visible_line() const {}

void TextEdit::set_line_as_center_visible(int p_line, int p_wrap_index) {}

void TextEdit::set_line_as_last_visible(int p_line, int p_wrap_index) {}

int TextEdit::get_last_full_visible_line() const {}

int TextEdit::get_last_full_visible_line_wrap_index() const {}

int TextEdit::get_visible_line_count() const {}

int TextEdit::get_visible_line_count_in_range(int p_from_line, int p_to_line) const {}

int TextEdit::get_total_visible_line_count() const {}

// Auto adjust.
void TextEdit::adjust_viewport_to_caret(int p_caret) {}

void TextEdit::center_viewport_to_caret(int p_caret) {}

/* Minimap */
void TextEdit::set_draw_minimap(bool p_enabled) {}

bool TextEdit::is_drawing_minimap() const {}

void TextEdit::set_minimap_width(int p_minimap_width) {}

int TextEdit::get_minimap_width() const {}

int TextEdit::get_minimap_visible_lines() const {}

/* Gutters. */
void TextEdit::add_gutter(int p_at) {}

void TextEdit::remove_gutter(int p_gutter) {}

int TextEdit::get_gutter_count() const {}

void TextEdit::set_gutter_name(int p_gutter, const String &p_name) {}

String TextEdit::get_gutter_name(int p_gutter) const {}

void TextEdit::set_gutter_type(int p_gutter, GutterType p_type) {}

TextEdit::GutterType TextEdit::get_gutter_type(int p_gutter) const {}

void TextEdit::set_gutter_width(int p_gutter, int p_width) {}

int TextEdit::get_gutter_width(int p_gutter) const {}

int TextEdit::get_total_gutter_width() const {}

void TextEdit::set_gutter_draw(int p_gutter, bool p_draw) {}

bool TextEdit::is_gutter_drawn(int p_gutter) const {}

void TextEdit::set_gutter_clickable(int p_gutter, bool p_clickable) {}

bool TextEdit::is_gutter_clickable(int p_gutter) const {}

void TextEdit::set_gutter_overwritable(int p_gutter, bool p_overwritable) {}

bool TextEdit::is_gutter_overwritable(int p_gutter) const {}

void TextEdit::merge_gutters(int p_from_line, int p_to_line) {}

void TextEdit::set_gutter_custom_draw(int p_gutter, const Callable &p_draw_callback) {}

// Line gutters.
void TextEdit::set_line_gutter_metadata(int p_line, int p_gutter, const Variant &p_metadata) {}

Variant TextEdit::get_line_gutter_metadata(int p_line, int p_gutter) const {}

void TextEdit::set_line_gutter_text(int p_line, int p_gutter, const String &p_text) {}

String TextEdit::get_line_gutter_text(int p_line, int p_gutter) const {}

void TextEdit::set_line_gutter_icon(int p_line, int p_gutter, const Ref<Texture2D> &p_icon) {}

Ref<Texture2D> TextEdit::get_line_gutter_icon(int p_line, int p_gutter) const {}

void TextEdit::set_line_gutter_item_color(int p_line, int p_gutter, const Color &p_color) {}

Color TextEdit::get_line_gutter_item_color(int p_line, int p_gutter) const {}

void TextEdit::set_line_gutter_clickable(int p_line, int p_gutter, bool p_clickable) {}

bool TextEdit::is_line_gutter_clickable(int p_line, int p_gutter) const {}

// Line style
void TextEdit::set_line_background_color(int p_line, const Color &p_color) {}

Color TextEdit::get_line_background_color(int p_line) const {}

/* Syntax Highlighting. */
void TextEdit::set_syntax_highlighter(Ref<SyntaxHighlighter> p_syntax_highlighter) {}

Ref<SyntaxHighlighter> TextEdit::get_syntax_highlighter() const {}

/* Visual. */
void TextEdit::set_highlight_current_line(bool p_enabled) {}

bool TextEdit::is_highlight_current_line_enabled() const {}

void TextEdit::set_highlight_all_occurrences(bool p_enabled) {}

bool TextEdit::is_highlight_all_occurrences_enabled() const {}

void TextEdit::set_use_default_word_separators(bool p_enabled) {}

bool TextEdit::is_default_word_separators_enabled() const {}

// Set word separators. Combine default separators with custom separators if those options are enabled.
void TextEdit::set_custom_word_separators(const String &p_separators) {}

void TextEdit::Text::set_custom_word_separators(const String &p_separators) {}

bool TextEdit::is_custom_word_separators_enabled() const {}

String TextEdit::get_custom_word_separators() const {}

// Enable or disable custom word separators.
void TextEdit::set_use_custom_word_separators(bool p_enabled) {}

String TextEdit::get_default_word_separators() const {}

void TextEdit::set_draw_control_chars(bool p_enabled) {}

bool TextEdit::get_draw_control_chars() const {}

void TextEdit::set_draw_tabs(bool p_enabled) {}

bool TextEdit::is_drawing_tabs() const {}

void TextEdit::set_draw_spaces(bool p_enabled) {}

bool TextEdit::is_drawing_spaces() const {}

Color TextEdit::get_font_color() const {}

void TextEdit::_bind_methods() {}

/* Internal API for CodeEdit. */
// Line hiding.
void TextEdit::_set_hiding_enabled(bool p_enabled) {}

bool TextEdit::_is_hiding_enabled() const {}

bool TextEdit::_is_line_hidden(int p_line) const {}

void TextEdit::_unhide_all_lines() {}

void TextEdit::_unhide_carets() {}

void TextEdit::_set_line_as_hidden(int p_line, bool p_hidden) {}

// Symbol lookup.
void TextEdit::_set_symbol_lookup_word(const String &p_symbol) {}

/* Text manipulation */

// Overridable actions
void TextEdit::_handle_unicode_input_internal(const uint32_t p_unicode, int p_caret) {}

void TextEdit::_backspace_internal(int p_caret) {}

void TextEdit::_cut_internal(int p_caret) {}

void TextEdit::_copy_internal(int p_caret) {}

void TextEdit::_paste_internal(int p_caret) {}

void TextEdit::_paste_primary_clipboard_internal(int p_caret) {}

// Context menu.

Key TextEdit::_get_menu_action_accelerator(const String &p_action) {}

void TextEdit::_generate_context_menu() {}

void TextEdit::_update_context_menu() {}

/* Versioning */
void TextEdit::_push_current_op() {}

void TextEdit::_do_text_op(const TextOperation &p_op, bool p_reverse) {}

void TextEdit::_clear_redo() {}

/* Search */
int TextEdit::_get_column_pos_of_word(const String &p_key, const String &p_search, uint32_t p_search_flags, int p_from_column) const {}

/* Mouse */
int TextEdit::_get_char_pos_for_line(int p_px, int p_line, int p_wrap_index) const {}

/* Caret */
void TextEdit::_caret_changed(int p_caret) {}

void TextEdit::_emit_caret_changed() {}

void TextEdit::_reset_caret_blink_timer() {}

void TextEdit::_toggle_draw_caret() {}

int TextEdit::_get_column_x_offset_for_line(int p_char, int p_line, int p_column) const {}

bool TextEdit::_is_line_col_in_range(int p_line, int p_column, int p_from_line, int p_from_column, int p_to_line, int p_to_column, bool p_include_edges) const {}

void TextEdit::_offset_carets_after(int p_old_line, int p_old_column, int p_new_line, int p_new_column, bool p_include_selection_begin, bool p_include_selection_end) {}

void TextEdit::_cancel_drag_and_drop_text() {}

/* Selection */
void TextEdit::_selection_changed(int p_caret) {}

void TextEdit::_click_selection_held() {}

void TextEdit::_update_selection_mode_pointer(bool p_initial) {}

void TextEdit::_update_selection_mode_word(bool p_initial) {}

void TextEdit::_update_selection_mode_line(bool p_initial) {}

void TextEdit::_pre_shift_selection(int p_caret) {}

bool TextEdit::_selection_contains(int p_caret, int p_line, int p_column, bool p_include_edges, bool p_only_selections) const {}

/* Line Wrapping */
void TextEdit::_update_wrap_at_column(bool p_force) {}

/* Viewport. */
void TextEdit::_update_scrollbars() {}

int TextEdit::_get_control_height() const {}

void TextEdit::_v_scroll_input() {}

void TextEdit::_scroll_moved(double p_to_val) {}

double TextEdit::_get_visible_lines_offset() const {}

double TextEdit::_get_v_scroll_offset() const {}

void TextEdit::_scroll_up(real_t p_delta, bool p_animate) {}

void TextEdit::_scroll_down(real_t p_delta, bool p_animate) {}

void TextEdit::_scroll_lines_up() {}

void TextEdit::_scroll_lines_down() {}

// Minimap

void TextEdit::_update_minimap_hover() {}

void TextEdit::_update_minimap_click() {}

void TextEdit::_update_minimap_drag() {}

/* Gutters. */
void TextEdit::_update_gutter_width() {}

/* Syntax highlighting. */
Dictionary TextEdit::_get_line_syntax_highlighting(int p_line) {}

/* Deprecated. */
#ifndef DISABLE_DEPRECATED
Vector<int> TextEdit::get_caret_index_edit_order() {}

void TextEdit::adjust_carets_after_edit(int p_caret, int p_from_line, int p_from_col, int p_to_line, int p_to_col) {}

int TextEdit::get_selection_line(int p_caret) const {}

int TextEdit::get_selection_column(int p_caret) const {}
#endif

/*** Super internal Core API. Everything builds on it. ***/

void TextEdit::_text_changed() {}

void TextEdit::_emit_text_changed() {}

void TextEdit::_insert_text(int p_line, int p_char, const String &p_text, int *r_end_line, int *r_end_char) {}

void TextEdit::_remove_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column) {}

void TextEdit::_base_insert_text(int p_line, int p_char, const String &p_text, int &r_end_line, int &r_end_column) {}

String TextEdit::_base_get_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column) const {}

void TextEdit::_base_remove_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column) {}

TextEdit::TextEdit(const String &p_placeholder) {}