Horizon
src
core
tools
tool_draw_connection_line.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
4
namespace
horizon {
5
6
class
ToolDrawConnectionLine
:
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 = 0;
24
class
ConnectionLine
*temp_line = 0;
25
class
ConnectionLine
*temp_line_last = 0;
26
class
ConnectionLine
*temp_line_last2 = 0;
27
class
Net
*temp_net =
nullptr
;
28
29
void
update_tip();
30
};
31
}
// namespace horizon
horizon::BoardJunction
Definition:
board_junction.hpp:6
horizon::ConnectionLine
Definition:
connection_line.hpp:15
horizon::Net
Definition:
net.hpp:11
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition:
tool_pub.hpp:23
horizon::ToolBase
Common interface for all Tools.
Definition:
tool_pub.hpp:94
horizon::ToolDrawConnectionLine
Definition:
tool_draw_connection_line.hpp:6
horizon::ToolDrawConnectionLine::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition:
tool_draw_connection_line.cpp:16
horizon::ToolDrawConnectionLine::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition:
tool_draw_connection_line.cpp:39
horizon::ToolDrawConnectionLine::can_begin
bool can_begin() override
Definition:
tool_draw_connection_line.cpp:11
horizon::ToolResponse
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition:
tool_pub.hpp:40
Generated by
1.9.1