Horizon
tool_add_part.hpp
1 #pragma once
2 #include "core.hpp"
3 #include "tool_helper_map_symbol.hpp"
4 #include "tool_helper_move.hpp"
5 
6 namespace horizon {
8 public:
9  ToolAddPart(Core *c, ToolID tid);
10  ToolResponse begin(const ToolArgs &args) override;
11  ToolResponse update(const ToolArgs &args) override;
12  bool can_begin() override;
13 
14 private:
15  unsigned int current_gate = 0;
16  class SchematicSymbol *sym_current = nullptr;
17  std::vector<const class Gate *> gates;
18  class Component *comp = nullptr;
19  void update_tip();
20 };
21 } // namespace horizon
This is what a Tool receives when the user did something.
Definition: core.hpp:108
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.
Definition: tool_add_part.cpp:80
A Component is an instanced Entity in a Block.
Definition: component.hpp:39
Definition: tool_helper_map_symbol.hpp:5
Definition: tool_add_part.hpp:7
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
Definition: tool_add_part.cpp:18
Definition: tool_helper_move.hpp:5
Where Tools and and documents meet.
Definition: core.hpp:249
To signal back to the core what the Tool did, a Tool returns a ToolResponse.
Definition: core.hpp:126
Definition: block.cpp:7
bool can_begin() override
Definition: tool_add_part.cpp:13
Definition: schematic_symbol.hpp:19