Horizon
Loading...
Searching...
No Matches
tool_place_bus_label.hpp
1#pragma once
2#include "core/tool.hpp"
3#include "tool_place_junction_schematic.hpp"
4#include <forward_list>
5
6namespace horizon {
7
9public:
10 using ToolPlaceJunctionSchematic::ToolPlaceJunctionSchematic;
11
12 bool can_begin() override;
13 std::set<InToolActionID> get_actions() const override
14 {
15 using I = InToolActionID;
16 return {
17 I::LMB, I::CANCEL, I::RMB, I::ROTATE, I::MIRROR,
18 };
19 }
20
21private:
22 void create_attached() override;
23 void delete_attached() override;
24 bool begin_attached() override;
25 bool update_attached(const ToolArgs &args) override;
26 bool check_line(class LineNet *li) override;
27 class BusLabel *la = nullptr;
28 Orientation last_orientation = Orientation::RIGHT;
29 std::forward_list<class BusLabel *> labels_placed;
30 class Bus *bus = nullptr;
31};
32} // namespace horizon
Makes a Bus available on the schematic.
Definition bus_label.hpp:16
A Bus is used for grouping nets.
Definition bus.hpp:18
LineNet is similar to Line, except it denotes electrical connection.
Definition line_net.hpp:17
This is what a Tool receives when the user did something.
Definition tool_pub.hpp:23
Definition tool_place_bus_label.hpp:8
bool can_begin() override
Definition tool_place_bus_label.cpp:10
Definition tool_place_junction_schematic.hpp:6