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 void set_show_none(
bool v);
16 void set_show_path(
bool v);
17 void add_context_menu_item(
const std::string &label, sigc::slot1<void, UUID> cb);
18 virtual void search() = 0;
19 virtual ObjectType get_type()
const 21 return ObjectType::INVALID;
23 void go_to(
const UUID &uu);
26 enum class PoolItemSource { LOCAL, INCLUDED, OVERRIDING };
30 class Pool *pool =
nullptr;
32 bool show_none =
false;
33 bool show_path =
false;
34 Gtk::TreeViewColumn *path_column =
nullptr;
37 Gtk::TreeView *treeview =
nullptr;
39 Gtk::TreeViewColumn *append_column(
const std::string &name,
const Gtk::TreeModelColumnBase &column,
40 Pango::EllipsizeMode ellipsize = Pango::ELLIPSIZE_NONE);
41 Gtk::TreeViewColumn *append_column_with_item_source_cr(
const std::string &name,
42 const Gtk::TreeModelColumnBase &column,
43 Pango::EllipsizeMode ellipsize = Pango::ELLIPSIZE_NONE);
46 Gtk::Entry *create_search_entry(
const std::string &label);
47 void add_search_widget(
const std::string &label, Gtk::Widget &w);
50 virtual Glib::RefPtr<Gtk::ListStore> create_list_store() = 0;
51 virtual void create_columns() = 0;
52 virtual void add_sort_controller_columns() = 0;
53 virtual UUID uuid_from_row(
const Gtk::TreeModel::Row &row) = 0;
55 Glib::RefPtr<Gtk::ListStore> store;
56 std::unique_ptr<SortController> sort_controller;
58 void row_activated(
const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
59 void selection_changed();
61 void select_uuid(
const UUID &uu);
62 void scroll_to_selection();
64 Gtk::Menu context_menu;
65 std::set<Gtk::Entry *> search_entries;
67 PoolItemSource pool_item_source_from_db(
const UUID &uu,
bool overridden);
69 void install_pool_item_source_tooltip();
70 virtual PoolItemSource pool_item_source_from_row(
const Gtk::TreeModel::Row &row);
73 Gtk::Grid *grid =
nullptr;
Definition: selection_provider.hpp:6
Definition: cell_renderer_color_box.hpp:6
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: pool_browser.hpp:11
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:19