KiCad PCB EDA Suite
cvpcb_control.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) 2019 Ian McInerney <Ian.S.McInerney@ieee.org>
5  * Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software: you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef CVPCB_CONTROL_H_
22 #define CVPCB_CONTROL_H_
23 
24 #include <tool/tool_interactive.h>
25 
26 #include <cvpcb_mainframe.h>
27 
28 
36 {
37 public:
38  CVPCB_CONTROL();
40 
42  void Reset( RESET_REASON aReason ) override;
43 
50  int Main( const TOOL_EVENT& aEvent );
51 
57  int ChangeFocus( const TOOL_EVENT& aEvent );
58 
64  int ToNA( const TOOL_EVENT& aEvent );
65 
71  int ShowEquFileTable( const TOOL_EVENT& aEvent );
72 
78  int SaveAssociations( const TOOL_EVENT& aEvent );
79 
86  int ShowFootprintViewer( const TOOL_EVENT& aEvent );
87 
95  int ToggleFootprintFilter( const TOOL_EVENT& aEvent );
96 
102  int UpdateMenu( const TOOL_EVENT& aEvent );
103 
104  /*
105  * Sets up handlers for various events.
106  */
107  void setTransitions() override;
108 
109 private:
111 };
112 
113 #endif
int ShowEquFileTable(const TOOL_EVENT &aEvent)
Show the dialog to modify the included footprint association files (.equ)
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
CVPCB_MAINFRAME * m_frame
int SaveAssociations(const TOOL_EVENT &aEvent)
Save the associations to the schematic.
int ToNA(const TOOL_EVENT &aEvent)
Move the selected component to the not associated one in the specified direction.
int ChangeFocus(const TOOL_EVENT &aEvent)
Rotate focus in the CVPCB window.
Class TOOL_EVENT.
Definition: tool_event.h:168
void Reset(RESET_REASON aReason) override
Function Reset() Brings the tool to a known, initial state.
int ToggleFootprintFilter(const TOOL_EVENT &aEvent)
Filter the footprint list by toggling the given filter type.
int ShowFootprintViewer(const TOOL_EVENT &aEvent)
Create or Update the frame showing the current highlighted footprint and (if showed) the 3D display f...
int Main(const TOOL_EVENT &aEvent)
Main processing loop for the CVPCB window.
RESET_REASON
Determines the reason of reset for a tool
Definition: tool_base.h:79
int UpdateMenu(const TOOL_EVENT &aEvent)
Update the menu to reflect the current tool states.
Class CVPCB_CONTROL.
Definition: cvpcb_control.h:35
The CvPcb application main window.