2 #include "core/clipboard.hpp" 3 #include "core/core_package.hpp" 4 #include "core/core_padstack.hpp" 5 #include "core/core_schematic.hpp" 6 #include "core/core_symbol.hpp" 7 #include "core/cores.hpp" 8 #include "imp_interface.hpp" 9 #include "keyseq_dialog.hpp" 10 #include "main_window.hpp" 11 #include "pool/pool.hpp" 12 #include "preferences.hpp" 13 #include "selection_filter_dialog.hpp" 14 #include "util/window_state_store.hpp" 15 #include "widgets/spin_button_dim.hpp" 16 #include "widgets/warnings_box.hpp" 29 PoolParams(
const std::string &bp,
const std::string &cp =
"") : base_path(bp), cache_path(cp)
32 std::string base_path;
33 std::string cache_path;
36 std::unique_ptr<Pool> make_pool(
const PoolParams ¶ms);
43 void run(
int argc,
char *argv[]);
44 virtual void handle_tool_change(ToolID
id);
45 virtual void construct() = 0;
46 void canvas_update_from_pp();
51 std::set<ObjectRef> highlights;
52 virtual void update_highlights(){};
60 Gtk::Menu *context_menu =
nullptr;
62 std::unique_ptr<SelectionFilterDialog> selection_filter_dialog;
64 std::unique_ptr<Pool> pool;
66 std::unique_ptr<ClipboardManager> clipboard =
nullptr;
67 std::unique_ptr<KeySequenceDialog> key_sequence_dialog =
nullptr;
68 std::unique_ptr<ImpInterface> imp_interface =
nullptr;
69 Glib::RefPtr<Glib::Binding> grid_spacing_binding;
79 zmq::socket_t sock_broadcast_rx;
80 zmq::socket_t sock_project;
81 bool sockets_connected =
false;
82 bool no_update =
false;
84 virtual void canvas_update() = 0;
86 bool handle_key_press(GdkEventKey *key_event);
87 void handle_cursor_move(
const Coordi &pos);
88 bool handle_click(GdkEventButton *button_event);
89 bool handle_click_release(GdkEventButton *button_event);
90 bool handle_context_menu(GdkEventButton *button_event);
92 void tool_begin(ToolID
id);
93 void add_tool_button(ToolID
id,
const std::string &label,
bool left =
true);
94 void handle_warning_selected(
const Coordi &pos);
95 virtual bool handle_broadcast(
const json &j);
96 bool handle_close(GdkEventAny *ev);
99 bool trigger_action(
const std::pair<ActionID, ToolID> &action);
100 bool trigger_action(ActionID aid);
101 bool trigger_action(ToolID tid);
103 void add_tool_action(ToolID tid,
const std::string &action);
104 Glib::RefPtr<Gio::Menu> add_hamburger_menu();
111 return &preferences.canvas_non_layer;
114 std::unique_ptr<WindowStateStore> state_store =
nullptr;
116 virtual void handle_maybe_drag();
118 virtual ActionCatalogItem::Availability get_editor_type_for_action()
const = 0;
120 void layer_up_down(
bool up);
121 void goto_layer(
int layer);
123 Gtk::Button *create_action_button(std::pair<ActionID, ToolID> action);
125 void set_action_sensitive(std::pair<ActionID, ToolID>,
bool v);
126 bool get_action_sensitive(std::pair<ActionID, ToolID>)
const;
127 virtual void update_action_sensitivity();
129 typedef sigc::signal<void> type_signal_action_sensitive;
130 type_signal_action_sensitive signal_action_sensitive()
132 return s_signal_action_sensitive;
136 void fix_cursor_pos();
137 void apply_settings();
138 Glib::RefPtr<Gio::FileMonitor> preferences_monitor;
139 void show_preferences_window();
141 void update_selection_label();
146 KeySequence2 keys_current;
147 bool handle_action_key(GdkEventKey *ev);
151 std::set<SelectableRef> selection_for_drag_move;
152 Coordf cursor_pos_drag_begin;
153 Coordi cursor_pos_grid_drag_begin;
155 std::map<std::pair<ActionID, ToolID>,
bool> action_sensitivity;
156 type_signal_action_sensitive s_signal_action_sensitive;
Definition: warnings_box.hpp:7
Definition: rules_window.hpp:11
Definition: preferences_window.hpp:7
a class to store JSON values
Definition: json.hpp:161
Definition: main_window.hpp:7
Definition: preferences.hpp:13
Definition: log_window.hpp:6
Definition: property_panels.hpp:7
Definition: canvas_gl.hpp:10
Tools use this class to actually access the core.
Definition: cores.hpp:13
Definition: preferences.hpp:58
Definition: imp_interface.hpp:6
Definition: action.hpp:71