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 
23 private:
24  void canvas_update() override;
25  CoreSchematic core_schematic;
26  int handle_ask_net_merge(class Net *net, class Net *into);
27  int handle_ask_delete_component(class Component *comp);
28  void handle_select_sheet(Sheet *sh);
29  void handle_remove_sheet(Sheet *sh);
30  void handle_core_rebuilt();
31  void handle_tool_change(ToolID id) override;
32  void handle_export_pdf();
33  void handle_move_to_other_sheet(const ActionConnection &conn);
34  std::string last_pdf_filename;
35  UUID part_from_project_manager;
36 
37  std::map<UUID, std::pair<float, Coordf>> sheet_views;
38  class SheetBox *sheet_box;
39  void handle_selection_cross_probe();
40  bool cross_probing_enabled = false;
41 
42  Coordf cursor_pos_drag_begin;
43  Target target_drag_begin;
44 
45  void handle_drag();
46 };
47 } // 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:6
Definition: sheet_box.hpp:6
Definition: sheet.hpp:35
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: action.hpp:71
Definition: block.cpp:7
Definition: core_schematic.hpp:11
Your typical coordinate class.
Definition: common.hpp:69
Definition: net.hpp:16