Horizon
Loading...
Searching...
No Matches
tool_draw_polygon_circle.hpp
1#pragma once
2#include "core/tool.hpp"
3
4namespace horizon {
5
7public:
8 using ToolBase::ToolBase;
9 ToolResponse begin(const ToolArgs &args) override;
10 ToolResponse update(const ToolArgs &args) override;
11 bool can_begin() override;
12 std::set<InToolActionID> get_actions() const override
13 {
14 using I = InToolActionID;
15 return {
16 I::LMB,
17 I::CANCEL,
18 I::RMB,
19 I::ENTER_DATUM,
20 };
21 }
22
23private:
24 Coordi first_pos;
25 Coordi second_pos;
26
27 int step = 0;
28 class Polygon *temp = nullptr;
29
30 void update_polygon();
31 void update_tip();
32};
33} // namespace horizon
Polygon used in Padstack, Package and Board for specifying filled Regions.
Definition polygon.hpp:25
This is what a Tool receives when the user did something.
Definition tool_pub.hpp:23
Common interface for all Tools.
Definition tool_pub.hpp:94
Definition tool_draw_polygon_circle.hpp:6
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition tool_draw_polygon_circle.cpp:65
bool can_begin() override
Definition tool_draw_polygon_circle.cpp:9
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition tool_draw_polygon_circle.cpp:34
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition tool_pub.hpp:40