Horizon
Loading...
Searching...
No Matches
tool_draw_connection_line.hpp
1#pragma once
2#include "core/tool.hpp"
3#include "tool_helper_pick_pad.hpp"
4
5namespace horizon {
6
7class ToolDrawConnectionLine : public virtual ToolBase, public ToolHelperPickPad {
8public:
9 using ToolBase::ToolBase;
10 ToolResponse begin(const ToolArgs &args) override;
11 ToolResponse update(const ToolArgs &args) override;
12 bool can_begin() override;
13 std::set<InToolActionID> get_actions() const override
14 {
15 using I = InToolActionID;
16 return {
17 I::LMB,
18 I::CANCEL,
19 I::RMB,
20 };
21 }
22
23private:
24 class BoardJunction *temp_junc = 0;
25 class ConnectionLine *temp_line = 0;
26 class ConnectionLine *temp_line_last = 0;
27 class ConnectionLine *temp_line_last2 = 0;
28 class Net *temp_net = nullptr;
29
30 void update_tip();
31};
32} // namespace horizon
Definition board_junction.hpp:6
Definition connection_line.hpp:12
Definition net.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_connection_line.hpp:7
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition tool_draw_connection_line.cpp:16
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition tool_draw_connection_line.cpp:39
bool can_begin() override
Definition tool_draw_connection_line.cpp:11
Definition tool_helper_pick_pad.hpp:6
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition tool_pub.hpp:40