3 #include <gtkmm/entry.h>
6 #include "gtkmm2ext/visibility.h"
10 class LIBGTKMM2EXT_API SearchBar : public Gtk::Entry
14 const std::string& placeholder_text = "Search...",
15 bool icon_click_resets = true);
17 // resets the searchbar to the initial state
19 // emitted when the filter has been updated
20 sigc::signal<void, const std::string&> signal_search_string_updated () { return sig_search_string_updated; }
22 bool focus_in_event (GdkEventFocus*);
23 bool focus_out_event (GdkEventFocus*);
25 bool key_press_event (GdkEventKey*);
26 void icon_clicked_event (Gtk::EntryIconPosition, const GdkEventButton*);
28 const std::string placeholder_text;
29 sigc::signal<void, const std::string&> sig_search_string_updated;
31 void search_string_changed () const;
33 Glib::RefPtr<Gdk::Pixbuf> icon;
34 bool icon_click_resets;