Horizon
tool_set_nc.hpp
1 #pragma once
2 #include "core.hpp"
3 #include <forward_list>
4 
5 namespace horizon {
6 
7 class ToolSetNotConnected : public ToolBase {
8 public:
9  ToolSetNotConnected(Core *c, ToolID tid);
10  ToolResponse begin(const ToolArgs &args) override;
11  ToolResponse update(const ToolArgs &args) override;
12  bool can_begin() override;
13  bool is_specific() override
14  {
15  return false;
16  }
17 
18 private:
19  enum class Mode { SET, CLEAR, TOGGLE };
20  Mode mode = Mode::SET;
21  void update_tip();
22 };
23 } // namespace horizon
horizon::ToolSetNotConnected::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition: tool_set_nc.cpp:45
horizon::ToolSetNotConnected::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition: tool_set_nc.cpp:17
horizon::ToolSetNotConnected::can_begin
bool can_begin() override
Definition: tool_set_nc.cpp:12
horizon::Core
Where Tools and and documents meet.
Definition: core.hpp:240
horizon::ToolSetNotConnected
Definition: tool_set_nc.hpp:7
horizon::ToolBase
Common interface for all Tools.
Definition: core.hpp:141
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::ToolSetNotConnected::is_specific
bool is_specific() override
Definition: tool_set_nc.hpp:13