KiCad PCB EDA Suite
cvpcb_fpviewer_control.cpp
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) 2014-2016 CERN
5  * @author Maciej Suminski <maciej.suminski@cern.ch>
6  * Copyright (C) 2007-2019 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #include <functional>
27 using namespace std::placeholders;
28 
29 #include <tool/actions.h>
31 
32 
34  TOOL_INTERACTIVE( "cvpcb.FootprintViewerControl" ),
35  m_frame( nullptr )
36 {
37 }
38 
39 
41 {
42  m_frame = getEditFrame<DISPLAY_FOOTPRINTS_FRAME>();
43 }
44 
45 
47 {
49  return 0;
50 }
51 
52 
54 {
56 }
static TOOL_ACTION show3DViewer
Definition: actions.h:147
int Show3DViewer(const TOOL_EVENT &aEvent)
Show the 3D viewer with the currently selected footprint
void Reset(RESET_REASON aReason) override
Function Reset() Brings the tool to a known, initial state.
void setTransitions() override
Sets up handlers for various events.
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Function Go()
EDA_3D_VIEWER * CreateAndShow3D_Frame()
Shows the 3D view frame.
Class TOOL_EVENT.
Definition: tool_event.h:168
DISPLAY_FOOTPRINTS_FRAME * m_frame
Pointer to the currently used edit/draw frame.
RESET_REASON
Determines the reason of reset for a tool
Definition: tool_base.h:79