KiCad PCB EDA Suite
grid_menu.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) 2015 CERN
5  * @author Maciej Suminski <maciej.suminski@cern.ch>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef GRID_MENU_H
26 #define GRID_MENU_H
27 
28 #include <tool/action_menu.h>
29 
30 class EDA_DRAW_FRAME;
31 class APP_SETTINGS_BASE;
32 
33 class GRID_MENU : public ACTION_MENU
34 {
35 public:
36  GRID_MENU( EDA_DRAW_FRAME* aParent );
37 
38  static void BuildChoiceList( wxArrayString* aGridsList, APP_SETTINGS_BASE* aCfg, bool mmFirst );
39 
40 private:
41  ACTION_MENU* create() const override
42  {
43  return new GRID_MENU( m_parent );
44  }
45 
46  OPT_TOOL_EVENT eventHandler( const wxMenuEvent& aEvent ) override;
47  void update() override;
48 
50 };
51 
52 #endif /* GRID_MENU_H */
ACTION_MENU.
Definition: action_menu.h:44
OPT_TOOL_EVENT eventHandler(const wxMenuEvent &aEvent) override
Event handler stub.
Definition: grid_menu.cpp:54
The base class for create windows for drawing purpose.
EDA_DRAW_FRAME * m_parent
Definition: grid_menu.h:49
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:92
static void BuildChoiceList(wxArrayString *aGridsList, APP_SETTINGS_BASE *aCfg, bool mmFirst)
Definition: grid_menu.cpp:80
ACTION_MENU * create() const override
Returns an instance of this class. It has to be overridden in inheriting classes.
Definition: grid_menu.h:41
void update() override
Update menu state stub.
Definition: grid_menu.cpp:62
OPT< TOOL_EVENT > OPT_TOOL_EVENT
Definition: tool_event.h:556
GRID_MENU(EDA_DRAW_FRAME *aParent)
Definition: grid_menu.cpp:36