Horizon
tool_place_hole.hpp
1 #pragma once
2 #include "common/hole.hpp"
3 #include "core.hpp"
4 #include <forward_list>
5 
6 namespace horizon {
7 
8 class ToolPlaceHole : public ToolBase {
9 public:
10  ToolPlaceHole(Core *c, ToolID tid);
11  ToolResponse begin(const ToolArgs &args) override;
12  ToolResponse update(const ToolArgs &args) override;
13  bool can_begin() override;
14 
15 protected:
16  Hole *temp = 0;
17  std::forward_list<Hole *> holes_placed;
18 
19  void create_hole(const Coordi &c);
20 };
21 } // namespace horizon
This is what a Tool receives when the user did something.
Definition: core.hpp:27
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition: tool_place_hole.cpp:33
Where Tools and and documents meet.
Definition: core.hpp:232
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition: tool_place_hole.cpp:17
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition: core.hpp:46
Definition: tool_place_hole.hpp:8
Definition: block.cpp:9
Common interface for all Tools.
Definition: core.hpp:133
bool can_begin() override
Definition: tool_place_hole.cpp:12
A hole with diameter and position, that&#39;s it.
Definition: hole.hpp:19