Horizon
src
core
tools
tool_place_decal.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
4
namespace
horizon {
5
class
ToolPlaceDecal :
public
ToolBase {
6
public
:
7
ToolPlaceDecal(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, I::CANCEL, I::RMB, I::ROTATE, I::MIRROR,
16
};
17
}
18
19
private
:
20
class
BoardDecal *temp =
nullptr
;
21
};
22
}
// namespace horizon
horizon::ToolPlaceDecal::can_begin
bool can_begin() override
horizon::ToolPlaceDecal::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
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
horizon::ToolPlaceDecal::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Generated by
1.8.20