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-2019 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 
37 {
38 public:
41 
43  bool Init() override;
44 
46  void Reset( RESET_REASON aReason ) override;
47 
53  int Main( const TOOL_EVENT& aEvent );
54 
59  {
60  return m_selection;
61  }
62 
63  void clearSelection() {}
64 
66  int MeasureTool( 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 MeasureTool(const TOOL_EVENT &aEvent)
Launches a tool to measure between points
Class DISPLAY_FOOTPRINTS_FRAME is used to display footprints.
Class CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL.
DISPLAY_FOOTPRINTS_FRAME * m_frame
Pointer to the parent frame.
void setTransitions() override
Sets up handlers for various events.
bool Init() override
Function Init() Init() is called once upon a registration of the tool.
Class TOOL_EVENT.
Definition: tool_event.h:171
int Main(const TOOL_EVENT &aEvent)
Function Main()
RESET_REASON
Determines the reason of reset for a tool
Definition: tool_base.h:79
SELECTION m_selection
Current state of selection (not really used: no selection in display footprints frame).
void Reset(RESET_REASON aReason) override
Function Reset() Brings the tool to a known, initial state.