Horizon
tool_draw_net_tie.hpp
1 #pragma once
2 #include "core/tool.hpp"
3 
4 namespace horizon {
5 
6 class ToolDrawNetTie : public ToolBase {
7 public:
8  using ToolBase::ToolBase;
9  ToolResponse begin(const ToolArgs &args) override;
10  ToolResponse update(const ToolArgs &args) override;
11  bool can_begin() override;
12  std::set<InToolActionID> get_actions() const override
13  {
14  using I = InToolActionID;
15  return {
16  I::LMB,
17  I::CANCEL,
18  I::RMB,
19  };
20  }
21 
22 private:
23  class BoardJunction *temp_junc = nullptr;
24  class BoardNetTie *temp_tie = nullptr;
25  class NetTie *net_tie = nullptr;
26  void create_temp_tie();
27  class BoardRules *rules;
28 };
29 } // namespace horizon
Definition: board_junction.hpp:6
Definition: board_net_tie.hpp:9
Definition: board_rules.hpp:27
Definition: net_tie.hpp:11
This is what a Tool receives when the user did something.
Definition: tool_pub.hpp:23
Common interface for all Tools.
Definition: tool_pub.hpp:94
Definition: tool_draw_net_tie.hpp:6
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition: tool_draw_net_tie.cpp:58
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition: tool_draw_net_tie.cpp:16
bool can_begin() override
Definition: tool_draw_net_tie.cpp:9
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition: tool_pub.hpp:40