KiCad PCB EDA Suite
gerbview_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) 2017 Jon Evans <jon@craftyjon.com>
5  * Copyright (C) 2017 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 GERBVIEW_CONTROL_H
22 #define GERBVIEW_CONTROL_H
23 
24 #include <tool/tool_interactive.h>
25 
26 
34 {
35 public:
37  ~GERBVIEW_CONTROL() override { }
38 
40  void Reset( RESET_REASON aReason ) override;
41 
42  // Display modes
43  int HighContrastMode( const TOOL_EVENT& aEvent );
44  int HighContrastInc( const TOOL_EVENT& aEvent );
45  int HighContrastDec( const TOOL_EVENT& aEvent );
46  int DisplayControl( const TOOL_EVENT& aEvent );
47 
48  // Layer control
49  int LayerSwitch( const TOOL_EVENT& aEvent );
50  int LayerNext( const TOOL_EVENT& aEvent );
51  int LayerPrev( const TOOL_EVENT& aEvent );
52  int LayerToggle( const TOOL_EVENT& aEvent );
53  int LayerAlphaInc( const TOOL_EVENT& aEvent );
54  int LayerAlphaDec( const TOOL_EVENT& aEvent );
55 
56  // Files
57  int OpenGerber( const TOOL_EVENT& aEvent );
58  int OpenDrillFile( const TOOL_EVENT& aEvent );
59  int OpenJobFile( const TOOL_EVENT& aEvent );
60  int OpenZipFile( const TOOL_EVENT& aEvent );
61 
62  // Highlight control
63  int HighlightControl( const TOOL_EVENT& aEvent );
64 
65  // Miscellaneous
66  int SwitchUnits( const TOOL_EVENT& aEvent );
67  int UpdateMessagePanel( const TOOL_EVENT& aEvent );
68  int Print( const TOOL_EVENT& aEvent );
69 
71  void setTransitions() override;
72 
73 private:
75 
76 };
77 
78 #endif
int OpenJobFile(const TOOL_EVENT &aEvent)
int OpenGerber(const TOOL_EVENT &aEvent)
~GERBVIEW_CONTROL() override
GERBVIEW_FRAME * m_frame
int OpenZipFile(const TOOL_EVENT &aEvent)
int Print(const TOOL_EVENT &aEvent)
int HighContrastInc(const TOOL_EVENT &aEvent)
void Reset(RESET_REASON aReason) override
Function Reset() Brings the tool to a known, initial state.
int LayerPrev(const TOOL_EVENT &aEvent)
int UpdateMessagePanel(const TOOL_EVENT &aEvent)
int HighlightControl(const TOOL_EVENT &aEvent)
void setTransitions() override
Sets up handlers for various events.
int LayerToggle(const TOOL_EVENT &aEvent)
int HighContrastMode(const TOOL_EVENT &aEvent)
TOOL_EVENT.
Definition: tool_event.h:171
int SwitchUnits(const TOOL_EVENT &aEvent)
int LayerAlphaDec(const TOOL_EVENT &aEvent)
int LayerNext(const TOOL_EVENT &aEvent)
int OpenDrillFile(const TOOL_EVENT &aEvent)
int HighContrastDec(const TOOL_EVENT &aEvent)
RESET_REASON
Determines the reason of reset for a tool
Definition: tool_base.h:79
int LayerSwitch(const TOOL_EVENT &aEvent)
int DisplayControl(const TOOL_EVENT &aEvent)
int LayerAlphaInc(const TOOL_EVENT &aEvent)
PCBNEW_CONTROL.