Horizon
Loading...
Searching...
No Matches
tool_import_dxf.hpp
1#pragma once
2#include "core/tool.hpp"
3#include "tool_helper_move.hpp"
4
5namespace horizon {
6
8public:
9 using ToolHelperMove::ToolHelperMove;
10 ToolResponse begin(const ToolArgs &args) override;
11 ToolResponse update(const ToolArgs &args) override;
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, I::ENTER_WIDTH,
18 };
19 }
20
21private:
22 std::set<class Line *> lines;
23 std::set<class Arc *> arcs;
24 int64_t width = 0;
25};
26} // namespace horizon
This is what a Tool receives when the user did something.
Definition tool_pub.hpp:23
Definition tool_helper_move.hpp:6
Definition tool_import_dxf.hpp:7
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition tool_import_dxf.cpp:74
bool can_begin() override
Definition tool_import_dxf.cpp:12
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition tool_import_dxf.cpp:17
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition tool_pub.hpp:40