Horizon
Loading...
Searching...
No Matches
imp_board.hpp
1#pragma once
2#include "core/core_board.hpp"
3#include "imp_layer.hpp"
4#include "search/searcher_board.hpp"
5
6namespace horizon {
7class ImpBoard : public ImpLayer {
8public:
9 ImpBoard(const CoreBoard::Filenames &filenames, const PoolParams &params);
10
11 const std::map<int, Layer> &get_layers();
12
13 std::map<ObjectType, SelectionFilterInfo> get_selection_filter_info() const override;
14
15 ~ImpBoard();
16
17protected:
18 void construct() override;
19 bool handle_broadcast(const json &j) override;
20 void handle_maybe_drag(bool ctrl) override;
21 void update_action_sensitivity() override;
22 void apply_preferences() override;
23 void update_highlights() override;
24 void set_window_title(const std::string &s) override;
25
26 ActionCatalogItem::Availability get_editor_type_for_action() const override
27 {
28 return ActionCatalogItem::AVAILABLE_IN_BOARD;
29 };
30
31 std::string get_hud_text(std::set<SelectableRef> &sel) override;
32 ActionToolID get_doubleclick_action(ObjectType type, const UUID &uu) override;
33
34 void get_save_meta(json &j) override;
35 std::vector<std::string> get_view_hints() override;
36
37 Searcher *get_searcher_ptr() override
38 {
39 return &searcher;
40 }
41
42 ToolID get_tool_for_drag_move(bool ctrl, const std::set<SelectableRef> &sel) const override;
43
44 void update_monitor() override;
45
46private:
47 void canvas_update() override;
48 void handle_selection_cross_probe() override;
49
50 CoreBoard core_board;
51 const std::string project_dir;
52 SearcherBoard searcher;
53
54 class FabOutputWindow *fab_output_window = nullptr;
55 class View3DWindow *view_3d_window = nullptr;
56 class StepExportWindow *step_export_window = nullptr;
57 class TuningWindow *tuning_window = nullptr;
58 class PDFExportWindow *pdf_export_window = nullptr;
59 class BoardDisplayOptionsBox *board_display_options_box = nullptr;
60 class PnPExportWindow *pnp_export_window = nullptr;
61 class AirwireFilterWindow *airwire_filter_window = nullptr;
62 class PartsWindow *parts_window = nullptr;
63 bool cross_probing_enabled = false;
64
65 Coordf cursor_pos_drag_begin;
66 Target target_drag_begin;
67
68 void handle_drag();
69 void handle_measure_tracks(const ActionConnection &a);
70
71 class CanvasAnnotation *text_owner_annotation = nullptr;
72 std::map<UUID, UUID> text_owners;
73 void update_text_owners();
74 void update_text_owner_annotation();
75
76 void handle_select_more(const ActionConnection &conn);
77
78 class UnplacedBox *unplaced_box = nullptr;
79 void update_unplaced();
80
81 void update_airwires();
82
83 int get_schematic_pid();
84
85 class CanvasAnnotation *airwire_annotation = nullptr;
86 void update_airwire_annotation();
87 void update_net_colors();
88 void apply_net_colors();
89 std::map<UUID, uint8_t> net_color_map;
90
91 Gtk::Popover *reload_netlist_popover = nullptr;
92 sigc::connection reload_netlist_delay_conn;
93
94 UUID net_from_selectable(const SelectableRef &sr);
95
96 void handle_show_in_pool_manager(const ActionConnection &conn);
97};
98} // namespace horizon
Definition action.hpp:87
Definition airwire_filter_window.hpp:12
Definition board_display_options.hpp:7
Definition annotation.hpp:7
Definition core_board.hpp:12
Definition core_board.hpp:10
Definition fab_output_window.hpp:12
Definition imp_board.hpp:7
Definition imp_layer.hpp:5
Definition pdf_export_window.hpp:12
Definition parts_window.hpp:11
Definition pnp_export_window.hpp:14
Definition imp.hpp:28
Definition searcher_board.hpp:5
Definition searcher.hpp:9
Definition selectables.hpp:35
Definition step_export_window.hpp:10
Definition target.hpp:7
Definition tuning_window.hpp:9
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16
Definition unplaced_box.hpp:9
Definition 3d_view.hpp:11
a class to store JSON values
Definition json.hpp:177
Definition action.hpp:13