KiCad PCB EDA Suite
Loading...
Searching...
No Matches
zoom_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 <[email protected]>
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 ZOOM_MENU_H
26#define ZOOM_MENU_H
27
28#include <tool/action_menu.h>
29
30class EDA_DRAW_FRAME;
31
32class ZOOM_MENU : public ACTION_MENU
33{
34public:
35 ZOOM_MENU( EDA_DRAW_FRAME* aParent );
36
37 void UpdateTitle() override;
38
39private:
40 ACTION_MENU* create() const override
41 {
42 return new ZOOM_MENU( m_parent );
43 }
44
45 OPT_TOOL_EVENT eventHandler( const wxMenuEvent& aEvent ) override;
46 void update() override;
47
49};
50
51#endif /* ZOOM_MENU_H */
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:49
The base class for create windows for drawing purpose.
OPT_TOOL_EVENT eventHandler(const wxMenuEvent &aEvent) override
Event handler stub.
Definition: zoom_menu.cpp:46
void UpdateTitle() override
Used by some menus to just-in-time translate their titles.
Definition: zoom_menu.cpp:54
EDA_DRAW_FRAME * m_parent
Definition: zoom_menu.h:48
ACTION_MENU * create() const override
< Return an instance of this class. It has to be overridden in inheriting classes.
Definition: zoom_menu.h:40
void update() override
Update menu state stub.
Definition: zoom_menu.cpp:60
std::optional< TOOL_EVENT > OPT_TOOL_EVENT
Definition: tool_event.h:629