2 #include "common/common.hpp"
3 #include "pool/part.hpp"
4 #include "pool/pool.hpp"
5 #include "pool/pool_parametric.hpp"
6 #include "util/uuid.hpp"
7 #include "util/window_state_store.hpp"
8 #include "util/paned_state_store.hpp"
12 #include "util/item_set.hpp"
19 PartBrowserWindow(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
const std::string &pool_path,
20 std::deque<UUID> &favs);
21 static PartBrowserWindow *create(Gtk::Window *p,
const std::string &pool_path, std::deque<UUID> &favs);
22 typedef sigc::signal<void, UUID> type_signal_place_part;
23 type_signal_place_part signal_place_part()
25 return s_signal_place_part;
27 type_signal_place_part signal_assign_part()
29 return s_signal_assign_part;
32 typedef sigc::signal<void, ItemSet> type_signal_open_pool_cache_window;
33 type_signal_open_pool_cache_window signal_open_pool_cache_window()
35 return s_signal_open_pool_cache_window;
38 void placed_part(
const UUID &uu);
39 void go_to_part(
const UUID &uu);
40 void set_can_assign(
bool v);
43 void pool_updated(
const std::string &bp);
44 void set_entity(
const UUID &uu,
const std::string &hint);
47 Gtk::Menu *add_search_menu =
nullptr;
48 Gtk::Notebook *notebook =
nullptr;
49 Gtk::Button *place_part_button =
nullptr;
50 Gtk::Button *assign_part_button =
nullptr;
51 Gtk::ToggleButton *fav_button =
nullptr;
52 Gtk::ListBox *lb_favorites =
nullptr;
53 Gtk::ListBox *lb_recent =
nullptr;
54 Gtk::InfoBar *out_of_date_info_bar =
nullptr;
58 void handle_switch_page(Gtk::Widget *w, guint index);
59 void handle_fav_toggled();
60 void update_favorites();
61 void update_recents();
62 void handle_favorites_selected(Gtk::ListBoxRow *row);
63 void handle_favorites_activated(Gtk::ListBoxRow *row);
64 void handle_place_part();
65 void handle_assign_part();
66 void handle_activate_part();
67 sigc::connection fav_toggled_conn;
68 std::set<Gtk::Widget *> search_views;
72 void update_part_current();
73 void update_out_of_date_info_bar();
74 ItemSet items_out_of_date;
75 std::deque<UUID> &favorites;
76 std::deque<UUID> recents;
78 type_signal_place_part s_signal_place_part;
79 type_signal_place_part s_signal_assign_part;
80 type_signal_open_pool_cache_window s_signal_open_pool_cache_window;
81 bool can_assign =
false;
85 std::optional<PanedStateStore> paned_state_store;
87 Gtk::InfoBar *entity_info_bar =
nullptr;
88 Gtk::Label *entity_label =
nullptr;
91 sigc::connection pool_updated_conn;
92 bool needs_reload =
false;
Definition: part_browser_window.hpp:17
Definition: part_preview.hpp:12
Definition: pool_browser_parametric.hpp:7
Definition: pool_browser_part.hpp:5
Definition: pool_cache_status.hpp:11
Definition: pool_parametric.hpp:10
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:22
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: window_state_store.hpp:25