KiCad PCB EDA Suite
actions.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) 2013-2016 CERN
5  * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
6  * @author Maciej Suminski <maciej.suminski@cern.ch>
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 #ifndef __ACTIONS_H
27 #define __ACTIONS_H
28 
29 #include <tool/tool_action.h>
30 #include <core/optional.h>
31 
32 class TOOL_EVENT;
33 class TOOL_MANAGER;
34 
41 class ACTIONS
42 {
43 public:
44 
45  virtual ~ACTIONS() {};
46 
47  // Generic actions
49 
50  // View controls
59 
60  // Grid control
68 
76  virtual OPT<TOOL_EVENT> TranslateLegacyId( int aId ) = 0;
77 
79  virtual void RegisterAllTools( TOOL_MANAGER* aToolManager ) = 0;
80 
84 
86  enum class REMOVE_FLAGS { NORMAL = 0x00, ALT = 0x01 };
87 };
88 
89 #endif
static TOOL_ACTION zoomPreset
Definition: actions.h:57
static TOOL_ACTION zoomInCenter
Definition: actions.h:53
virtual ~ACTIONS()
Definition: actions.h:45
REMOVE_FLAGS
Remove event modifier flags
Definition: actions.h:86
virtual OPT< TOOL_EVENT > TranslateLegacyId(int aId)=0
Function TranslateLegacyId() Translates legacy tool ids to the corresponding TOOL_ACTION name...
static TOOL_ACTION zoomTool
Definition: actions.h:58
static TOOL_ACTION gridResetOrigin
Definition: actions.h:66
static TOOL_ACTION cancelInteractive
Definition: actions.h:45
static TOOL_ACTION zoomFitScreen
Definition: actions.h:56
static TOOL_ACTION gridFast1
Definition: actions.h:61
static TOOL_ACTION zoomOutCenter
Definition: actions.h:54
Class TOOL_MANAGER.
Definition: tool_manager.h:49
static TOOL_ACTION gridFast2
Definition: actions.h:62
static TOOL_ACTION gridPreset
Definition: actions.h:67
static TOOL_ACTION gridPrev
Definition: actions.h:64
Class TOOL_EVENT.
Definition: tool_event.h:162
static TOOL_ACTION zoomCenter
Definition: actions.h:55
Class TOOL_ACTION.
Definition: tool_action.h:46
CURSOR_EVENT_TYPE
Cursor control event types
Definition: actions.h:82
static TOOL_ACTION gridNext
Definition: actions.h:63
boost::optional< T > OPT
Definition: optional.h:7
Class ACTIONS.
Definition: actions.h:41
static TOOL_ACTION zoomIn
Definition: actions.h:51
static TOOL_ACTION zoomOut
Definition: actions.h:52
static TOOL_ACTION gridSetOrigin
Definition: actions.h:65
virtual void RegisterAllTools(TOOL_MANAGER *aToolManager)=0
Registers all valid tools for an application with the tool manager