Horizon
src
core
tools
tool_place_board_hole.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
4
namespace
horizon {
5
class
ToolPlaceBoardHole :
public
ToolBase {
6
public
:
7
ToolPlaceBoardHole(IDocument *c, ToolID tid);
8
ToolResponse
begin
(
const
ToolArgs
&args)
override
;
9
ToolResponse
update
(
const
ToolArgs
&args)
override
;
10
bool
can_begin
()
override
;
11
std::set<InToolActionID> get_actions()
const override
12
{
13
using
I = InToolActionID;
14
return
{
15
I::LMB,
16
I::CANCEL,
17
I::RMB,
18
};
19
}
20
21
private
:
22
const
class
Padstack *padstack =
nullptr
;
23
class
BoardHole *temp =
nullptr
;
24
void
create_hole(
const
Coordi &c);
25
};
26
}
// namespace horizon
horizon::ToolPlaceBoardHole::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
horizon::ToolPlaceBoardHole::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
horizon::ToolPlaceBoardHole::can_begin
bool can_begin() override
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
Generated by
1.8.20