Horizon
tool_resize_symbol.hpp
1 #pragma once
2 #include "core/tool.hpp"
3 
4 namespace horizon {
5 
6 class ToolResizeSymbol : public ToolBase {
7 public:
8  ToolResizeSymbol(IDocument *c, ToolID tid);
9  ToolResponse begin(const ToolArgs &args) override;
10  ToolResponse update(const ToolArgs &args) override;
11  bool can_begin() override;
12 
13 private:
14  Coordi pos_orig;
15  Coordi delta_key;
16  std::map<std::pair<ObjectType, UUID>, Coordi> positions;
17 
18  void update_positions(const Coordi &ac);
19 };
20 } // namespace horizon
horizon::IDocument
Definition: idocument.hpp:5
horizon::ToolResizeSymbol::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition: tool_resize_symbol.cpp:90
horizon::ToolResizeSymbol
Definition: tool_resize_symbol.hpp:6
horizon::ToolResizeSymbol::can_begin
bool can_begin() override
Definition: tool_resize_symbol.cpp:13
horizon::Coord
Your typical coordinate class.
Definition: common.hpp:74
horizon::ToolBase
Common interface for all Tools.
Definition: tool.hpp:136
horizon::ToolResponse
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition: tool.hpp:48
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition: tool.hpp:22
horizon::ToolResizeSymbol::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition: tool_resize_symbol.cpp:18