Horizon
horizon-eda-1.3.0
src
core
tools
tool_place_via.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
#include "tool_place_junction.hpp"
4
#include <forward_list>
5
6
namespace
horizon {
7
8
class
ToolPlaceVia
:
public
ToolPlaceJunction
{
9
public
:
10
ToolPlaceVia
(
IDocument
*c, ToolID tid);
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
I::EDIT,
20
};
21
}
22
23
protected
:
24
void
create_attached()
override
;
25
void
delete_attached()
override
;
26
bool
begin_attached()
override
;
27
bool
update_attached(
const
ToolArgs
&args)
override
;
28
class
Via
*via =
nullptr
;
29
class
Net
*net =
nullptr
;
30
31
std::forward_list<class Via *> vias_placed;
32
33
private
:
34
const
class
BoardRules
*rules =
nullptr
;
35
void
update_tip();
36
};
37
}
// namespace horizon
horizon::IDocument
Definition:
idocument.hpp:5
horizon::ToolPlaceVia::can_begin
bool can_begin() override
Definition:
tool_place_via.cpp:14
horizon::BoardRules
Definition:
board_rules.hpp:22
horizon::Net
Definition:
net.hpp:15
horizon::ToolPlaceJunction
Definition:
tool_place_junction.hpp:7
horizon::Via
Definition:
via.hpp:16
horizon::ToolPlaceVia
Definition:
tool_place_via.hpp:8
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition:
tool.hpp:23
Generated by
1.8.20