KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 <
[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 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
void
UpdateTitle
()
override
;
39
40
static
void
BuildChoiceList
( wxArrayString* aGridsList,
APP_SETTINGS_BASE
* aCfg,
41
EDA_DRAW_FRAME
* aParent );
42
43
private
:
44
ACTION_MENU
*
create
()
const override
45
{
46
return
new
GRID_MENU
(
m_parent
);
47
}
48
49
OPT_TOOL_EVENT
eventHandler
(
const
wxMenuEvent& aEvent )
override
;
50
void
update
()
override
;
51
52
EDA_DRAW_FRAME
*
m_parent
;
53
};
54
55
#endif
/* GRID_MENU_H */
action_menu.h
ACTION_MENU
Defines the structure of a menu based on ACTIONs.
Definition:
action_menu.h:49
APP_SETTINGS_BASE
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition:
app_settings.h:92
EDA_DRAW_FRAME
The base class for create windows for drawing purpose.
Definition:
eda_draw_frame.h:84
GRID_MENU
Definition:
grid_menu.h:34
GRID_MENU::create
ACTION_MENU * create() const override
< Return an instance of this class. It has to be overridden in inheriting classes.
Definition:
grid_menu.h:44
GRID_MENU::eventHandler
OPT_TOOL_EVENT eventHandler(const wxMenuEvent &aEvent) override
Event handler stub.
Definition:
grid_menu.cpp:46
GRID_MENU::update
void update() override
Update menu state stub.
Definition:
grid_menu.cpp:60
GRID_MENU::UpdateTitle
void UpdateTitle() override
Used by some menus to just-in-time translate their titles.
Definition:
grid_menu.cpp:54
GRID_MENU::BuildChoiceList
static void BuildChoiceList(wxArrayString *aGridsList, APP_SETTINGS_BASE *aCfg, EDA_DRAW_FRAME *aParent)
Definition:
grid_menu.cpp:83
GRID_MENU::m_parent
EDA_DRAW_FRAME * m_parent
Definition:
grid_menu.h:52
OPT_TOOL_EVENT
std::optional< TOOL_EVENT > OPT_TOOL_EVENT
Definition:
tool_event.h:629
src
include
tool
grid_menu.h
Generated on Sun Nov 24 2024 00:04:51 for KiCad PCB EDA Suite by
1.9.6