summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.h
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-06-05 13:50:21 -0300
committerGeorge Marques <george@gmarqu.es>2018-07-20 21:55:18 -0300
commit03746da73f275030832f83373388cb0f248616eb (patch)
tree6fb76e12980dfa2524df4e15927adc3eff6a2a08 /scene/gui/text_edit.h
parenta2305cd8b2fccf576ca62634a061b16edd4d6c55 (diff)
Add editor highlight for type-safe lines
The line number is hightlighted to indicate that the line contains only type-safe code.
Diffstat (limited to 'scene/gui/text_edit.h')
-rw-r--r--scene/gui/text_edit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 586f4c8e93..34d69bb508 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -76,6 +76,7 @@ public:
bool marked : 1;
bool breakpoint : 1;
bool hidden : 1;
+ bool safe : 1;
int wrap_amount_cache : 24;
Map<int, ColorRegionInfo> region_info;
String data;
@@ -106,6 +107,8 @@ public:
bool is_breakpoint(int p_line) const { return text[p_line].breakpoint; }
void set_hidden(int p_line, bool p_hidden) { text[p_line].hidden = p_hidden; }
bool is_hidden(int p_line) const { return text[p_line].hidden; }
+ void set_safe(int p_line, bool p_safe) { text[p_line].safe = p_safe; }
+ bool is_safe(int p_line) const { return text[p_line].safe; }
void insert(int p_at, const String &p_text);
void remove(int p_at);
int size() const { return text.size(); }
@@ -165,6 +168,7 @@ private:
Color caret_color;
Color caret_background_color;
Color line_number_color;
+ Color safe_line_number_color;
Color font_color;
Color font_selected_color;
Color keyword_color;
@@ -472,6 +476,8 @@ public:
void set_line_as_marked(int p_line, bool p_marked);
void set_line_as_breakpoint(int p_line, bool p_breakpoint);
bool is_line_set_as_breakpoint(int p_line) const;
+ void set_line_as_safe(int p_line, bool p_safe);
+ bool is_line_set_as_safe(int p_line) const;
void get_breakpoints(List<int> *p_breakpoints) const;
Array get_breakpoints_array() const;
void remove_breakpoints();