Horizon
imp_board.hpp
1 #pragma once
2 #include "core/core_board.hpp"
3 #include "imp_layer.hpp"
4 
5 namespace horizon {
6 class ImpBoard : public ImpLayer {
7 public:
8  ImpBoard(const std::string &board_filename, const std::string &block_filename, const std::string &via_dir,
9  const PoolParams &params);
10 
11  const std::map<int, Layer> &get_layers();
12  void update_highlights() override;
13 
14 protected:
15  void construct() override;
16  bool handle_broadcast(const json &j) override;
17  void handle_maybe_drag() override;
18 
19  ActionCatalogItem::Availability get_editor_type_for_action() const
20  {
21  return ActionCatalogItem::AVAILABLE_IN_BOARD;
22  };
23 
24 private:
25  void canvas_update() override;
26  void handle_selection_cross_probe();
27 
28  CoreBoard core_board;
29 
30  class FabOutputWindow *fab_output_window = nullptr;
31  class View3DWindow *view_3d_window = nullptr;
32  class StepExportWindow *step_export_window = nullptr;
33  bool cross_probing_enabled = false;
34 
35  Coordf cursor_pos_drag_begin;
36  Target target_drag_begin;
37 
38  void handle_drag();
39 };
40 } // namespace horizon
Definition: 3d_view.hpp:6
Definition: target.hpp:6
Definition: imp_board.hpp:6
a class to store JSON values
Definition: json.hpp:161
Definition: fab_output_window.hpp:9
Definition: imp_layer.hpp:5
Definition: imp.hpp:27
Definition: step_export_window.hpp:7
Definition: block.cpp:7
Definition: core_board.hpp:10