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/context_menu.h>
29 
30 class EDA_DRAW_FRAME;
31 
32 class GRID_MENU : public CONTEXT_MENU
33 {
34 public:
35  GRID_MENU( EDA_DRAW_FRAME* aParent );
36 
37 private:
38  CONTEXT_MENU* create() const override
39  {
40  return new GRID_MENU( m_parent );
41  }
42 
43  OPT_TOOL_EVENT eventHandler( const wxMenuEvent& aEvent ) override;
44  void update() override;
45 
47 };
48 
49 #endif /* GRID_MENU_H */
Class CONTEXT_MENU.
Definition: context_menu.h:44
OPT_TOOL_EVENT eventHandler(const wxMenuEvent &aEvent) override
Event handler stub.
Definition: grid_menu.cpp:54
Class EDA_DRAW_FRAME is the base class for create windows for drawing purpose.
Definition: draw_frame.h:54
EDA_DRAW_FRAME * m_parent
Definition: grid_menu.h:46
CONTEXT_MENU * create() const override
Returns an instance of this class. It has to be overridden in inheriting classes. ...
Definition: grid_menu.h:38
void update() override
Update menu state stub.
Definition: grid_menu.cpp:64
OPT< TOOL_EVENT > OPT_TOOL_EVENT
Definition: tool_event.h:460
GRID_MENU(EDA_DRAW_FRAME *aParent)
Definition: grid_menu.cpp:36