Horizon
horizon-eda-1.3.0
src
core
tools
tool_place_net_label.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
#include "schematic/net_label.hpp"
4
#include "tool_place_junction.hpp"
5
#include "tool_helper_draw_net_setting.hpp"
6
#include <forward_list>
7
8
namespace
horizon {
9
10
class
ToolPlaceNetLabel
:
public
ToolPlaceJunction
,
public
ToolHelperDrawNetSetting
{
11
public
:
12
ToolPlaceNetLabel
(
IDocument
*c, ToolID tid);
13
bool
can_begin
()
override
;
14
std::set<InToolActionID> get_actions()
const override
15
{
16
using
I = InToolActionID;
17
return
{
18
I::LMB, I::CANCEL, I::RMB, I::ROTATE, I::MIRROR, I::NET_LABEL_SIZE_INC, I::NET_LABEL_SIZE_DEC,
19
I::ENTER_SIZE,
20
};
21
}
22
23
protected
:
24
std::forward_list<NetLabel *> labels_placed;
25
void
create_attached()
override
;
26
void
delete_attached()
override
;
27
bool
begin_attached()
override
;
28
bool
update_attached(
const
ToolArgs
&args)
override
;
29
bool
check_line(
LineNet
*li)
override
;
30
NetLabel
*la =
nullptr
;
31
Orientation last_orientation = Orientation::RIGHT;
32
void
apply_settings()
override
;
33
};
34
}
// namespace horizon
horizon::IDocument
Definition:
idocument.hpp:5
horizon::ToolHelperDrawNetSetting
Definition:
tool_helper_draw_net_setting.hpp:6
horizon::LineNet
LineNet is similar to Line, except it denotes electrical connection.
Definition:
line_net.hpp:23
horizon::NetLabel
Displays the junction's Net name it is attached to.
Definition:
net_label.hpp:21
horizon::ToolPlaceJunction
Definition:
tool_place_junction.hpp:7
horizon::ToolPlaceNetLabel
Definition:
tool_place_net_label.hpp:10
horizon::ToolPlaceNetLabel::can_begin
bool can_begin() override
Definition:
tool_place_net_label.cpp:15
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition:
tool.hpp:23
Generated by
1.8.20