Horizon
tool_assign_part.hpp
1 #pragma once
2 #include "block/component.hpp"
3 #include "core/tool.hpp"
4 #include <forward_list>
5 
6 namespace horizon {
7 
8 class ToolAssignPart : public ToolBase {
9 public:
10  ToolAssignPart(IDocument *c, ToolID tid);
11  ToolResponse begin(const ToolArgs &args) override;
12  ToolResponse update(const ToolArgs &args) override;
13  bool can_begin() override;
14  bool is_specific() override
15  {
16  return true;
17  }
18 
19 private:
20  const class Entity *get_entity();
21  Component *comp;
22 };
23 } // namespace horizon
horizon::ToolAssignPart::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
horizon::ToolAssignPart::is_specific
bool is_specific() override
Definition: tool_assign_part.hpp:14
horizon::ToolAssignPart::can_begin
bool can_begin() override
horizon::Entity
Definition: entity.hpp:14
horizon::Component
A Component is an instanced Entity in a Block.
Definition: component.hpp:39
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::ToolAssignPart::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.