// SPDX-License-Identifier: GPL-2.0-or-later #ifndef INKSCAPE_UI_WIDGET_COMPLETION_POPUP_H #define INKSCAPE_UI_WIDGET_COMPLETION_POPUP_H #include #include #include #include #include #include #include #include #include #include "labelled.h" namespace Inkscape { namespace UI { namespace Widget { class CompletionPopup : public Gtk::Box { public: CompletionPopup(); Gtk::Menu& get_menu(); Gtk::SearchEntry& get_entry(); Glib::RefPtr get_list(); void clear_completion_list(); void add_to_completion_list(int id, Glib::ustring name, Glib::ustring icon_name, Glib::ustring search_text = Glib::ustring()); sigc::signal& on_match_selected(); sigc::signal& on_button_press(); sigc::signal& on_focus(); private: Glib::RefPtr _builder; Glib::RefPtr _list; Gtk::SearchEntry& _search; Gtk::MenuButton& _button; Gtk::Menu& _popup; Glib::RefPtr _completion; sigc::signal _match_selected; sigc::signal _button_press; sigc::signal _on_focus; }; }}} // namespaces #endif // INKSCAPE_UI_WIDGET_COMPLETION_POPUP_H