summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2021-07-05 20:05:28 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2021-08-12 09:27:10 +0100
commitabbf14e7f5189312ddc8e4a35fc56e85d5f511ef (patch)
tree91006d7355b5dd0f497683564d2da6a32fc22758 /scene/gui
parentfba0c8e2e2275d34d75dd0b3d524383fd99e1dfd (diff)
Remove dead code from TextEdit
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp21
-rw-r--r--scene/gui/text_edit.h5
2 files changed, 0 insertions, 26 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 985abf8e55..56b5459558 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -746,8 +746,6 @@ void TextEdit::_notification(int p_what) {
int cursor_wrap_index = get_cursor_wrap_index();
- //FontDrawer drawer(cache.font, Color(1, 1, 1));
-
int first_visible_line = get_first_visible_line() - 1;
int draw_amount = visible_rows + (smooth_scroll_enabled ? 1 : 0);
draw_amount += times_line_wraps(first_visible_line + 1);
@@ -2823,7 +2821,6 @@ void TextEdit::_base_remove_text(int p_from_line, int p_from_column, int p_to_li
}
text.set(p_from_line, pre_text + post_text, structured_text_parser(st_parser, st_args, pre_text + post_text));
- //text.set_line_wrap_amount(p_from_line, -1);
text.invalidate_cache(p_from_line);
if (!text_changed_dirty && !setting_text) {
@@ -2942,19 +2939,6 @@ void TextEdit::_remove_text(int p_from_line, int p_from_column, int p_to_line, i
current_op = op;
}
-int TextEdit::get_char_count() {
- int totalsize = 0;
-
- for (int i = 0; i < text.size(); i++) {
- if (i > 0) {
- totalsize++; // Include \n.
- }
- totalsize += text[i].length();
- }
-
- return totalsize; // Omit last \n.
-}
-
Size2 TextEdit::get_minimum_size() const {
return cache.style_normal->get_minimum_size();
}
@@ -5371,11 +5355,6 @@ void TextEdit::_bind_methods() {
BIND_ENUM_CONSTANT(SELECTION_MODE_WORD);
BIND_ENUM_CONSTANT(SELECTION_MODE_LINE);
- /*
- ClassDB::bind_method(D_METHOD("delete_char"),&TextEdit::delete_char);
- ClassDB::bind_method(D_METHOD("delete_line"),&TextEdit::delete_line);
-*/
-
ClassDB::bind_method(D_METHOD("get_draw_control_chars"), &TextEdit::get_draw_control_chars);
ClassDB::bind_method(D_METHOD("set_draw_control_chars", "enable"), &TextEdit::set_draw_control_chars);
ClassDB::bind_method(D_METHOD("set_text_direction", "direction"), &TextEdit::set_text_direction);
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index c5853786cf..978a13317c 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -342,7 +342,6 @@ private:
void _update_wrap_at(bool p_force = false);
Vector<String> get_wrap_rows_text(int p_line) const;
int get_cursor_wrap_index() const;
- int get_char_count();
double get_scroll_pos_for_line(int p_line, int p_wrap_index = 0) const;
void set_line_as_first_visible(int p_line, int p_wrap_index = 0);
@@ -379,7 +378,6 @@ private:
void _scroll_lines_up();
void _scroll_lines_down();
- //void mouse_motion(const Point& p_pos, const Point& p_rel, int p_button_mask);
Size2 get_minimum_size() const override;
int _get_control_height() const;
@@ -574,9 +572,6 @@ public:
void _get_minimap_mouse_row(const Point2i &p_mouse, int &r_row) const;
bool is_dragging_cursor() const;
- //void delete_char();
- //void delete_line();
-
void begin_complex_operation();
void end_complex_operation();