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
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6
* @author Maciej Suminski <
[email protected]
>
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 GRID_MENU_H
27
#define GRID_MENU_H
28
29
#include <
tool/action_menu.h
>
30
31
class
EDA_DRAW_FRAME
;
32
class
APP_SETTINGS_BASE
;
33
34
class
GRID_MENU
:
public
ACTION_MENU
35
{
36
public
:
37
GRID_MENU
(
EDA_DRAW_FRAME
* aParent );
38
39
void
UpdateTitle
()
override
;
40
41
static
void
BuildChoiceList
( wxArrayString* aGridsList,
APP_SETTINGS_BASE
* aCfg,
42
EDA_DRAW_FRAME
* aParent );
43
44
private
:
45
ACTION_MENU
*
create
()
const override
46
{
47
return
new
GRID_MENU
(
m_parent
);
48
}
49
50
OPT_TOOL_EVENT
eventHandler
(
const
wxMenuEvent& aEvent )
override
;
51
void
update
()
override
;
52
53
EDA_DRAW_FRAME
*
m_parent
;
54
};
55
56
#endif
/* GRID_MENU_H */
action_menu.h
ACTION_MENU
Define 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:35
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:45
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:53
OPT_TOOL_EVENT
std::optional< TOOL_EVENT > OPT_TOOL_EVENT
Definition:
tool_event.h:633
src
include
tool
grid_menu.h
Generated on Wed Feb 5 2025 00:05:00 for KiCad PCB EDA Suite by
1.9.6