Horizon
tool_edit_symbol_pin_names.hpp
1 #pragma once
2 #include "block/component.hpp"
3 #include "core/tool.hpp"
4 #include <forward_list>
5 #include "tool_helper_get_symbol.hpp"
6 
7 namespace horizon {
8 
9 class ToolEditSymbolPinNames : public ToolHelperGetSymbol {
10 public:
11  ToolEditSymbolPinNames(IDocument *c, ToolID tid);
12  ToolResponse begin(const ToolArgs &args) override;
13  ToolResponse update(const ToolArgs &args) override;
14  bool can_begin() override;
15  bool is_specific() override
16  {
17  return true;
18  }
19  std::set<InToolActionID> get_actions() const override
20  {
21  using I = InToolActionID;
22  return {
23  I::LMB,
24  };
25  }
26 
27 private:
28  class SymbolPinNamesWindow *win = nullptr;
29  class SchematicSymbol *sym = nullptr;
30 };
31 } // namespace horizon
horizon::ToolEditSymbolPinNames::is_specific
bool is_specific() override
Definition: tool_edit_symbol_pin_names.hpp:15
horizon::ToolEditSymbolPinNames::can_begin
bool can_begin() override
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::ToolEditSymbolPinNames::begin
ToolResponse begin(const ToolArgs &args) override
Gets called right after the constructor has finished.
horizon::ToolEditSymbolPinNames::update
ToolResponse update(const ToolArgs &args) override
Gets called whenever the user generated some sort of input.