summaryrefslogtreecommitdiff
path: root/editor/editor_help.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_help.h')
-rw-r--r--editor/editor_help.h48
1 files changed, 47 insertions, 1 deletions
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 0f93e1b55b..514169dc19 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -125,6 +125,52 @@ public:
EditorHelpIndex();
};
+class FindBar : public HBoxContainer {
+
+ GDCLASS(FindBar, HBoxContainer);
+
+ LineEdit *search_text;
+ ToolButton *find_prev;
+ ToolButton *find_next;
+ Label *error_label;
+ TextureButton *hide_button;
+ String prev_search;
+
+ Control *container;
+ HBoxContainer *hbc;
+ VBoxContainer *vbc_search_text;
+
+ RichTextLabel *rich_text_label;
+
+ void _show_search();
+ void _hide_bar();
+
+ void _search_text_changed(const String &p_text);
+ void _search_text_entered(const String &p_text);
+
+ void _update_size();
+
+protected:
+ void _notification(int p_what);
+ void _unhandled_input(const Ref<InputEvent> &p_event);
+
+ bool _search(bool p_search_previous = false);
+
+ static void _bind_methods();
+
+public:
+ void set_error(const String &p_label);
+
+ void set_rich_text_label(RichTextLabel *p_rich_text_label);
+
+ void popup_search();
+
+ bool search_prev();
+ bool search_next();
+
+ FindBar();
+};
+
class EditorHelp : public VBoxContainer {
GDCLASS(EditorHelp, VBoxContainer);
@@ -161,6 +207,7 @@ class EditorHelp : public VBoxContainer {
ConfirmationDialog *search_dialog;
LineEdit *search;
+ FindBar *find_bar;
String base_path;
@@ -194,7 +241,6 @@ class EditorHelp : public VBoxContainer {
void _request_help(const String &p_string);
void _search(const String &p_str);
- void _search_cbk();
void _unhandled_key_input(const Ref<InputEvent> &p_ev);