Horizon
tool_map_pin.hpp
1 #pragma once
2 #include "core.hpp"
3 
4 namespace horizon {
5 class ToolMapPin : public ToolBase {
6 public:
7  ToolMapPin(Core *c, ToolID tid);
8  ToolResponse begin(const ToolArgs &args) override;
9  ToolResponse update(const ToolArgs &args) override;
10  bool can_begin() override;
11 
12 private:
13  std::vector<std::pair<const Pin *, bool>> pins;
14  unsigned int pin_index = 0;
15  SymbolPin *pin = nullptr;
16  SymbolPin *pin_last = nullptr;
17  SymbolPin *pin_last2 = nullptr;
18  void create_pin(const UUID &uu);
19 };
20 } // namespace horizon
horizon::ToolMapPin::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition: tool_map_pin.cpp:97
horizon::SymbolPin
Definition: symbol.hpp:22
horizon::Core
Where Tools and and documents meet.
Definition: core.hpp:240
horizon::ToolMapPin::can_begin
bool can_begin() override
Definition: tool_map_pin.cpp:15
horizon::ToolBase
Common interface for all Tools.
Definition: core.hpp:141
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
horizon::ToolMapPin::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition: tool_map_pin.cpp:35
horizon::ToolResponse
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition: core.hpp:52
horizon::ToolArgs
This is what a Tool receives when the user did something.
Definition: core.hpp:26
horizon::ToolMapPin
Definition: tool_map_pin.hpp:5