Horizon
Loading...
Searching...
No Matches
src
core
tools
tool_edit_line_rectangle.hpp
1
#pragma once
2
#include "core/tool.hpp"
3
4
namespace
horizon {
5
6
class
ToolEditLineRectangle
:
public
ToolBase
{
7
public
:
8
using
ToolBase::ToolBase;
9
ToolResponse
begin
(
const
ToolArgs
&args)
override
;
10
ToolResponse
update
(
const
ToolArgs
&args)
override
;
11
bool
can_begin
()
override
;
12
bool
is_specific
()
override
13
{
14
return
true
;
15
}
16
std::set<InToolActionID> get_actions()
const override
17
{
18
using
I = InToolActionID;
19
return
{
20
I::LMB,
21
I::CANCEL,
22
I::RMB,
23
};
24
}
25
26
private
:
27
std::array<class Junction *, 4> junctions;
28
29
void
update_junctions(
const
Coordi &c);
30
};
31
}
// namespace horizon
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::ToolEditLineRectangle
Definition
tool_edit_line_rectangle.hpp:6
horizon::ToolEditLineRectangle::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition
tool_edit_line_rectangle.cpp:114
horizon::ToolEditLineRectangle::can_begin
bool can_begin() override
Definition
tool_edit_line_rectangle.cpp:10
horizon::ToolEditLineRectangle::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition
tool_edit_line_rectangle.cpp:34
horizon::ToolEditLineRectangle::is_specific
bool is_specific() override
Definition
tool_edit_line_rectangle.hpp:12
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