Horizon
imp_schematic.hpp
1 #pragma once
2 #include "imp.hpp"
3 
4 namespace horizon {
5 class ImpSchematic : public ImpBase {
6  friend class ImpInterface;
7 
8 public:
9  ImpSchematic(const std::string &schematic_filename, const std::string &block_filename, const PoolParams &params);
10  void update_highlights() override;
11 
12 protected:
13  void construct() override;
14  bool handle_broadcast(const json &j);
15  void handle_maybe_drag();
16  void update_action_sensitivity() override;
17 
18  ActionCatalogItem::Availability get_editor_type_for_action() const
19  {
20  return ActionCatalogItem::AVAILABLE_IN_SCHEMATIC;
21  };
22  ObjectType get_editor_type() const override
23  {
24  return ObjectType::SCHEMATIC;
25  }
26 
27  std::string get_hud_text(std::set<SelectableRef> &sel) override;
28 
29 private:
30  void canvas_update() override;
31  CoreSchematic core_schematic;
32  int handle_ask_net_merge(class Net *net, class Net *into);
33  int handle_ask_delete_component(class Component *comp);
34  void handle_select_sheet(Sheet *sh);
35  void handle_remove_sheet(Sheet *sh);
36  void handle_core_rebuilt();
37  void handle_tool_change(ToolID id) override;
38  void handle_export_pdf();
39  void handle_move_to_other_sheet(const ActionConnection &conn);
40  std::string last_pdf_filename;
41  UUID part_from_project_manager;
42 
43  std::map<UUID, std::pair<float, Coordf>> sheet_views;
44  class SheetBox *sheet_box;
45  void handle_selection_cross_probe();
46  bool cross_probing_enabled = false;
47 
48  Coordf cursor_pos_drag_begin;
49  Target target_drag_begin;
50 
51  class BOMExportWindow *bom_export_window;
52 
53  void handle_drag();
54 
55  int get_board_pid();
56 };
57 } // namespace horizon
Definition: target.hpp:6
a class to store JSON values
Definition: json.hpp:161
A Component is an instanced Entity in a Block.
Definition: component.hpp:39
Definition: imp_schematic.hpp:5
Definition: imp.hpp:27
Definition: imp.hpp:38
Definition: imp_interface.hpp:7
Definition: sheet_box.hpp:6
Definition: sheet.hpp:37
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: action.hpp:89
Definition: block.cpp:9
Definition: bom_export_window.hpp:11
Definition: core_schematic.hpp:11
Your typical coordinate class.
Definition: common.hpp:71
Definition: net.hpp:16