Horizon
tool_draw_line_net.hpp
1 #pragma once
2 #include "core.hpp"
3 #include "tool_helper_merge.hpp"
4 
5 namespace horizon {
6 
8 public:
9  ToolDrawLineNet(Core *c, ToolID tid);
10  ToolResponse begin(const ToolArgs &args) override;
11  ToolResponse update(const ToolArgs &args) override;
12  bool can_begin() override;
13  bool handles_esc() override
14  {
15  return true;
16  }
17 
18 private:
19  Junction *temp_junc_head = 0;
20  Junction *temp_junc_mid = 0;
21  class LineNet *temp_line_head = 0;
22  class LineNet *temp_line_mid = 0;
23  class NetLabel *net_label = nullptr;
24  enum class BendMode { XY, YX, ARB };
25  BendMode bend_mode = BendMode::XY;
26  void move_temp_junc(const Coordi &c);
27  void update_tip();
28  void restart(const Coordi &c);
29 
30  class Component *component_floating = nullptr;
31  UUIDPath<2> connpath_floating;
32  class SymbolPin *pin_start = nullptr;
33 
34  Junction *make_temp_junc(const Coordi &c);
35 };
36 } // namespace horizon
bool handles_esc() override
Definition: tool_draw_line_net.hpp:13
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition: tool_draw_line_net.cpp:104
Definition: symbol.hpp:22
bool can_begin() override
Definition: tool_draw_line_net.cpp:13
Definition: tool_helper_merge.hpp:5
This is what a Tool receives when the user did something.
Definition: core.hpp:108
A Component is an instanced Entity in a Block.
Definition: component.hpp:39
LineNet is similar to Line, except it denotes electrical connection.
Definition: line_net.hpp:24
Displays the junction&#39;s Net name it is attached to.
Definition: net_label.hpp:21
Where Tools and and documents meet.
Definition: core.hpp:249
Definition: tool_draw_line_net.hpp:7
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition: core.hpp:126
Definition: block.cpp:7
A Junction is a point in 2D-Space.
Definition: junction.hpp:25
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition: tool_draw_line_net.cpp:18