summaryrefslogtreecommitdiffstats
path: root/editor/editor_help_search.h
diff options
context:
space:
mode:
authorRedMser <redmser.jj2@gmail.com>2023-07-03 18:18:46 +0200
committerRedMser <redmser.jj2@gmail.com>2024-02-09 18:13:23 +0100
commitdb798b29b29f2c1251a7787290fc50e6d05f1bfa (patch)
tree7784d6ed8aa1aac4aadd1ea20efc4fb571d15f23 /editor/editor_help_search.h
parent94dbf69f5d6b7d2fd9561692df2e71557607fddc (diff)
downloadredot-engine-db798b29b29f2c1251a7787290fc50e6d05f1bfa.tar.gz
Add keywords to the class reference
Allows for finding methods, properties, signals, constants, theme items and annotations more easily. - Allow "keywords" attribute in aforementioned locations in the class reference XMLs - Extends doctool, to preserve these attributes - Update the XSD schema for the class reference - Update the RST generator to include a meta tag for class keywords - Update the editor help to support filtering by keywords
Diffstat (limited to 'editor/editor_help_search.h')
-rw-r--r--editor/editor_help_search.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h
index e4980d6ff7..18f79b824f 100644
--- a/editor/editor_help_search.h
+++ b/editor/editor_help_search.h
@@ -160,9 +160,11 @@ class EditorHelpSearch::Runner : public RefCounted {
String _build_method_tooltip(const DocData::ClassDoc *p_class_doc, const DocData::MethodDoc *p_doc) const;
void _match_method_name_and_push_back(Vector<DocData::MethodDoc> &p_methods, Vector<DocData::MethodDoc *> *r_match_methods);
- bool _all_terms_in_name(String name);
+ bool _all_terms_in_name(const String &p_name) const;
+ bool _all_terms_in_keywords(const String &p_name) const;
bool _match_string(const String &p_term, const String &p_string) const;
- void _match_item(TreeItem *p_item, const String &p_text);
+ bool _match_keywords(const String &p_term, const String &p_keywords) const;
+ void _match_item(TreeItem *p_item, const String &p_text, bool p_is_keywords = false);
TreeItem *_create_class_hierarchy(const ClassMatch &p_match);
TreeItem *_create_class_item(TreeItem *p_parent, const DocData::ClassDoc *p_doc, bool p_gray);
TreeItem *_create_method_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const String &p_text, const DocData::MethodDoc *p_doc);
@@ -171,7 +173,7 @@ class EditorHelpSearch::Runner : public RefCounted {
TreeItem *_create_constant_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const DocData::ConstantDoc *p_doc);
TreeItem *_create_property_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const DocData::PropertyDoc *p_doc);
TreeItem *_create_theme_property_item(TreeItem *p_parent, const DocData::ClassDoc *p_class_doc, const DocData::ThemeItemDoc *p_doc);
- TreeItem *_create_member_item(TreeItem *p_parent, const String &p_class_name, const String &p_icon, const String &p_name, const String &p_text, const String &p_type, const String &p_metatype, const String &p_tooltip, bool is_deprecated, bool is_experimental);
+ TreeItem *_create_member_item(TreeItem *p_parent, const String &p_class_name, const String &p_icon, const String &p_name, const String &p_text, const String &p_type, const String &p_metatype, const String &p_tooltip, const String &p_keywords, bool is_deprecated, bool is_experimental);
public:
bool work(uint64_t slot = 100000);