5 #include "util/uuid.hpp"
6 #include "util/sort_controller.hpp"
7 #include "util/selection_provider.hpp"
8 #include "common/common.hpp"
14 UUID get_selected()
override;
15 bool get_any_selected();
16 void set_show_none(
bool v);
17 void set_show_path(
bool v);
18 void add_context_menu_item(
const std::string &label, sigc::slot1<void, UUID> cb);
19 virtual void add_copy_name_context_menu_item(){};
20 virtual void search() = 0;
22 void clear_search_once();
23 virtual ObjectType get_type()
const
25 return ObjectType::INVALID;
27 void go_to(
const UUID &uu);
30 enum class PoolItemSource { LOCAL, INCLUDED, OVERRIDING };
33 void construct(Gtk::Widget *search_box =
nullptr);
36 bool pools_included =
false;
37 bool show_none =
false;
38 bool show_path =
false;
39 Gtk::TreeViewColumn *path_column =
nullptr;
42 Gtk::TreeView *treeview =
nullptr;
43 Gtk::ScrolledWindow *scrolled_window =
nullptr;
45 Gtk::TreeViewColumn *append_column(
const std::string &name,
const Gtk::TreeModelColumnBase &column,
46 Pango::EllipsizeMode ellipsize = Pango::ELLIPSIZE_NONE);
47 Gtk::TreeViewColumn *append_column_with_item_source_cr(
const std::string &name,
48 const Gtk::TreeModelColumnBase &column,
49 Pango::EllipsizeMode ellipsize = Pango::ELLIPSIZE_NONE);
51 void install_column_tooltip(Gtk::TreeViewColumn &tvc,
const Gtk::TreeModelColumnBase &col);
53 Gtk::Entry *create_search_entry(
const std::string &label);
54 class TagEntry *create_tag_entry(
const std::string &label);
55 void add_search_widget(
const std::string &label, Gtk::Widget &w);
58 virtual Glib::RefPtr<Gtk::ListStore> create_list_store() = 0;
59 virtual void create_columns() = 0;
60 virtual void add_sort_controller_columns() = 0;
61 virtual UUID uuid_from_row(
const Gtk::TreeModel::Row &row) = 0;
63 Glib::RefPtr<Gtk::ListStore> store;
64 std::unique_ptr<SortController> sort_controller;
66 void row_activated(
const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
67 void selection_changed();
69 void select_uuid(
const UUID &uu);
70 void scroll_to_selection();
72 Gtk::Menu context_menu;
73 std::set<Gtk::Entry *> search_entries;
74 std::set<TagEntry *> tag_entries;
76 PoolItemSource pool_item_source_from_db(
const UUID &uu,
bool overridden);
78 void install_pool_item_source_tooltip();
79 virtual PoolItemSource pool_item_source_from_row(
const Gtk::TreeModel::Row &row);
80 bool searched_once =
false;
82 void set_busy(
bool busy);
83 void prepare_search();
86 Gtk::Box *status_box =
nullptr;
89 Gtk::Grid *grid =
nullptr;
92 Gtk::Box *busy_box =
nullptr;
93 UUID selected_uuid_before_search;
95 Gtk::Label *status_label =
nullptr;
Definition: cell_renderer_color_box.hpp:6
Definition: pool_browser.hpp:11
Definition: selection_provider.hpp:6
Definition: tag_entry.hpp:9
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16