KiCad PCB EDA Suite
cvpcb_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 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_SELECTION_TOOL_H
21 #define CVPCB_SELECTION_TOOL_H
22 
23 
24 #include <tool/tool_interactive.h>
25 #include <tool/context_menu.h>
26 #include <tool/selection.h>
28 #include <tool/tool_menu.h>
29 
31 
32 class SELECTION_AREA;
33 class GERBER_COLLECTOR;
34 
35 namespace KIGFX
36 {
37  class GAL;
38 }
39 
40 
47 {
48 public:
51 
53  bool Init() override;
54 
56  void Reset( RESET_REASON aReason ) override;
57 
63  int Main( const TOOL_EVENT& aEvent );
64 
67  SELECTION& GetSelection();
68 
70  {
71  return m_menu;
72  }
73 
76  void clearSelection() {};
77 
79  int MeasureTool( const TOOL_EVENT& aEvent );
80 
82  void setTransitions() override;
83 
85  void zoomFitSelection( void );
86 
87 private:
88 
91 
94 
97 };
98 
99 #endif
Class CVPCB_SELECTION_TOOL.
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:58
Class GERBER_COLLECTOR is intended for use when the right click button is pressed, or when the plain "arrow" tool is in effect.
Class TOOL_MENU.
Definition: tool_menu.h:47
SELECTION m_selection
Current state of selection (not really used: no selection in display footprints frame).
TOOL_MENU m_menu
Menu model displayed by the tool.
Class DISPLAY_FOOTPRINTS_FRAME is used to display footprints.
DISPLAY_FOOTPRINTS_FRAME * m_frame
Pointer to the parent frame.
Class TOOL_EVENT.
Definition: tool_event.h:168
void clearSelection()
Clears the current selection.
RESET_REASON
Determines the reason of reset for a tool
Definition: tool_base.h:80