Horizon
tool_place_bus_ripper.hpp
1 #pragma once
2 #include "block/bus.hpp"
3 #include "core/tool.hpp"
4 #include "tool_place_junction_schematic.hpp"
5 #include "tool_helper_move.hpp"
6 
7 namespace horizon {
8 
10 public:
11  ToolPlaceBusRipper(IDocument *c, ToolID tid);
12  bool can_begin() override;
13  std::set<InToolActionID> get_actions() const override
14  {
15  using I = InToolActionID;
16  return {
17  I::LMB, I::CANCEL, I::RMB, I::ROTATE, I::MIRROR, I::EDIT,
18  };
19  }
20 
21 private:
22  void create_attached() override;
23  void delete_attached() override;
24  bool begin_attached() override;
25  bool update_attached(const ToolArgs &args) override;
26  bool check_line(class LineNet *li) override;
27  class BusRipper *ri = nullptr;
28  Orientation last_orientation = Orientation::RIGHT;
29  Bus *bus = nullptr;
30 
31  std::vector<Bus::Member *> bus_members;
32  size_t bus_member_current = 0;
33 };
34 } // namespace horizon
Make a Bus member's Net available on the schematic.
Definition: bus_ripper.hpp:19
A Bus is used for grouping nets.
Definition: bus.hpp:20
Definition: idocument.hpp:5
LineNet is similar to Line, except it denotes electrical connection.
Definition: line_net.hpp:17
This is what a Tool receives when the user did something.
Definition: tool.hpp:23
Definition: tool_helper_move.hpp:6
Definition: tool_place_bus_ripper.hpp:9
bool can_begin() override
Definition: tool_place_bus_ripper.cpp:16
Definition: tool_place_junction_schematic.hpp:6