Horizon
Loading...
Searching...
No Matches
tool_place_net_label.hpp
1#pragma once
2#include "core/tool.hpp"
3#include "tool_place_junction_schematic.hpp"
4#include "tool_helper_draw_net_setting.hpp"
5
6namespace horizon {
7
9public:
10 ToolPlaceNetLabel(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, I::CANCEL, I::RMB, I::ROTATE, I::MIRROR, I::NET_LABEL_SIZE_INC, I::NET_LABEL_SIZE_DEC,
17 I::ENTER_SIZE,
18 };
19 }
20
21protected:
22 std::forward_list<class NetLabel *> labels_placed;
23 void create_attached() override;
24 void delete_attached() override;
25 bool begin_attached() override;
26 bool update_attached(const ToolArgs &args) override;
27 bool check_line(LineNet *li) override;
28 class NetLabel *la = nullptr;
29 Orientation last_orientation = Orientation::RIGHT;
30 void apply_settings() override;
31};
32} // namespace horizon
Definition idocument.hpp:5
LineNet is similar to Line, except it denotes electrical connection.
Definition line_net.hpp:17
Displays the junction's Net name it is attached to.
Definition net_label.hpp:16
This is what a Tool receives when the user did something.
Definition tool_pub.hpp:23
Definition tool_helper_draw_net_setting.hpp:6
Definition tool_place_junction_schematic.hpp:6
Definition tool_place_net_label.hpp:8
bool can_begin() override
Definition tool_place_net_label.cpp:15