KiCad PCB EDA Suite
cvpcb_fpviewer_selection_tool.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL_H_
21 #define CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL_H_
22 
24 
25 #include <tool/action_menu.h>
26 #include <tool/selection.h>
27 #include <tool/tool_interactive.h>
28 #include <tool/tool_menu.h>
29 
30 
35 {
36 public:
39 
41  bool Init() override;
42 
44  void Reset( RESET_REASON aReason ) override;
45 
49  int Main( const TOOL_EVENT& aEvent );
50 
55  {
56  return m_selection;
57  }
58 
59  void clearSelection() {}
60 
66  int UpdateMenu( const TOOL_EVENT& aEvent );
67 
69  void setTransitions() override;
70 
71 private:
74 
77 };
78 
79 #endif
SELECTION & GetSelection()
Selections aren't currently supported in the footprint viewer.
int UpdateMenu(const TOOL_EVENT &aEvent)
Update the menu to reflect the current tool states.
Selection tool for the footprint viewer in cvpcb.
DISPLAY_FOOTPRINTS_FRAME * m_frame
Pointer to the parent frame.
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
bool Init() override
Init() is called once upon a registration of the tool.
Generic, UI-independent tool event.
Definition: tool_event.h:152
int Main(const TOOL_EVENT &aEvent)
The main loop.
RESET_REASON
Determine the reason of reset for a tool.
Definition: tool_base.h:77
SELECTION m_selection
Current state of selection (not really used: no selection in display footprints frame).
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.