Horizon
Loading...
Searching...
No Matches
src
core
tools
tool_add_block_instance.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
4
namespace
horizon {
5
class
ToolAddBlockInstance
:
public
ToolBase
{
6
public
:
7
using
ToolBase::ToolBase;
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
{I::LMB, I::CANCEL, I::RMB, I::ROTATE, I::MIRROR};
15
}
16
17
private
:
18
class
SchematicBlockSymbol
*temp =
nullptr
;
19
};
20
}
// namespace horizon
horizon::SchematicBlockSymbol
Definition
schematic_block_symbol.hpp:12
horizon::ToolAddBlockInstance
Definition
tool_add_block_instance.hpp:5
horizon::ToolAddBlockInstance::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition
tool_add_block_instance.cpp:61
horizon::ToolAddBlockInstance::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition
tool_add_block_instance.cpp:15
horizon::ToolAddBlockInstance::can_begin
bool can_begin() override
Definition
tool_add_block_instance.cpp:10
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition
tool_pub.hpp:23
horizon::ToolBase
Common interface for all Tools.
Definition
tool_pub.hpp:94
horizon::ToolResponse
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition
tool_pub.hpp:40
Generated by
1.9.8