Horizon
tool_import_dxf.hpp
1 #pragma once
2 #include "core/tool.hpp"
3 #include "tool_helper_move.hpp"
4 
5 namespace horizon {
6 
7 class ToolImportDXF : public ToolHelperMove {
8 public:
9  ToolImportDXF(IDocument *c, ToolID tid);
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 
21 private:
22  std::set<class Line *> lines;
23  std::set<class Arc *> arcs;
24  int64_t width = 0;
25 };
26 } // namespace horizon
horizon::ToolImportDXF::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
horizon::ToolImportDXF::can_begin
bool can_begin() override
libzip::int64_t
zip_int64_t int64_t
zip_int64_t typedef.
Definition: zip.hpp:103
horizon::ToolImportDXF::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
horizon::ToolResponse
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition: tool.hpp:42
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition: tool.hpp:23