#pragma once #include "autocomplete.h" #include "source.h" #include namespace Source { class GenericView : public View { public: GenericView(const boost::filesystem::path &file_path, const Glib::RefPtr &language); ~GenericView(); private: void parse_language_file(bool &has_context_class, const boost::property_tree::ptree &pt); std::set keywords; bool is_word_iter(const Gtk::TextIter &iter); std::pair get_word(Gtk::TextIter iter); std::vector> get_words(const Gtk::TextIter &start, const Gtk::TextIter &end); std::map buffer_words; void setup_buffer_words(); std::atomic show_prefix_buffer_word = {false}; /// To avoid showing the current word if it is unique in document Autocomplete autocomplete; std::vector autocomplete_comment; std::vector autocomplete_insert; void setup_autocomplete(); }; } // namespace Source