4 #include "util/uuid.hpp"
5 #include "pool/part.hpp"
6 #include "pool/unit.hpp"
7 #include "pool/entity.hpp"
8 #include "pool/symbol.hpp"
9 #include "pool/package.hpp"
10 #include "pool/padstack.hpp"
12 #include "pool/pool.hpp"
13 #include "pool/pool_parametric.hpp"
14 #include "util/editor_process.hpp"
15 #include "pool-update/pool-update.hpp"
31 bool get_close_prohibited()
const;
33 void pool_update(std::function<
void()> cb =
nullptr,
const std::vector<std::string> &filenames = {});
34 bool get_needs_save()
const;
36 void go_to(ObjectType type,
const UUID &uu);
37 const UUID &get_pool_uuid()
const;
41 const std::string base_path;
45 std::map<ObjectType, class PoolBrowser *> browsers;
46 std::map<std::string, class PoolBrowserParametric *> browsers_parametric;
51 Glib::Dispatcher pool_update_dispatcher;
52 bool in_pool_update_handler =
false;
53 std::mutex pool_update_status_queue_mutex;
54 std::deque<std::tuple<PoolUpdateStatus, std::string, std::string>> pool_update_status_queue;
55 std::deque<std::tuple<PoolUpdateStatus, std::string, std::string>> pool_update_error_queue;
56 bool pool_updating =
false;
57 void pool_updated(
bool success);
58 std::string pool_update_last_file;
59 unsigned int pool_update_n_files = 0;
60 unsigned int pool_update_n_files_last = 0;
61 std::function<void()> pool_update_done_cb =
nullptr;
62 std::vector<std::string> pool_update_filenames;
64 void pool_update_thread();
66 void show_duplicate_window(ObjectType ty,
const UUID &uu);
68 void construct_units();
69 void handle_create_unit();
70 void handle_edit_unit(
const UUID &uu);
71 void handle_create_symbol_for_unit(
const UUID &uu);
72 void handle_create_entity_for_unit(
const UUID &uu);
73 void handle_duplicate_unit(
const UUID &uu);
75 void construct_symbols();
76 void handle_edit_symbol(
const UUID &uu);
77 void handle_create_symbol();
78 void handle_duplicate_symbol(
const UUID &uu);
80 void construct_entities();
81 void handle_edit_entity(
const UUID &uu);
82 void handle_create_entity();
83 void handle_duplicate_entity(
const UUID &uu);
85 void construct_padstacks();
86 void handle_edit_padstack(
const UUID &uu);
87 void handle_create_padstack();
88 void handle_duplicate_padstack(
const UUID &uu);
90 void construct_packages();
91 void handle_edit_package(
const UUID &uu);
92 void handle_create_package();
93 void handle_create_padstack_for_package(
const UUID &uu);
94 void handle_duplicate_package(
const UUID &uu);
95 void handle_part_wizard(
const UUID &uu);
97 void construct_parts();
98 void handle_edit_part(
const UUID &uu);
99 void handle_create_part();
100 void handle_create_part_from_part(
const UUID &uu);
101 void handle_duplicate_part(
const UUID &uu);
103 void construct_frames();
104 void handle_edit_frame(
const UUID &uu);
105 void handle_create_frame();
106 void handle_duplicate_frame(
const UUID &uu);
108 Gtk::Button *add_action_button(
const std::string &label, Gtk::Box *bbox, sigc::slot0<void>);
109 Gtk::Button *add_action_button(
const std::string &label, Gtk::Box *bbox,
class PoolBrowser *br,
110 sigc::slot1<void, UUID>);
111 void add_preview_stack_switcher(Gtk::Box *bbox, Gtk::Stack *stack);
113 void handle_delete(ObjectType ty,
const UUID &uu);
114 void handle_copy_path(ObjectType ty,
const UUID &uu);
117 void install_search_once(Gtk::Widget *page,
PoolBrowser *browser);
118 bool widget_is_visible(Gtk::Widget *widget);
120 std::string remote_repo;