KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_kicad_launcher.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 The KiCad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License as published by the
8
* Free Software Foundation, either version 3 of the License, or (at your
9
* option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <https://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef KICAD_PANEL_KICAD_LAUNCHER_H
21
#define KICAD_PANEL_KICAD_LAUNCHER_H
22
23
#include "
panel_kicad_launcher_base.h
"
24
25
#include <unordered_map>
26
27
class
TOOL_MANAGER
;
28
class
TOOL_ACTION
;
29
class
KICAD_MANAGER_FRAME
;
30
31
class
PANEL_KICAD_LAUNCHER
:
public
PANEL_KICAD_LAUNCHER_BASE
32
{
33
public
:
34
PANEL_KICAD_LAUNCHER
( wxWindow* aParent );
35
36
~PANEL_KICAD_LAUNCHER
();
37
38
void
CreateLaunchers
();
39
40
private
:
41
void
onThemeChanged
( wxSysColourChangedEvent& aEvent );
42
void
onLauncherButtonClick
( wxCommandEvent& aEvent );
43
44
KICAD_MANAGER_FRAME
*
m_frame
;
45
46
// Action lookup keyed by button id rather than stashed as button client data, so the
47
// handler for the button's asynchronous click event never has to dereference the event
48
// object, which CreateLaunchers() may have already destroyed by the time the event arrives.
49
std::unordered_map<int, const TOOL_ACTION*>
m_actionForId
;
50
51
// Source of never-reused button ids so a stale click cannot alias a rebuilt button's id.
52
int
m_nextLauncherId
= wxID_HIGHEST + 1;
53
};
54
55
56
#endif
// KICAD_PANEL_KICAD_LAUNCHER_H
KICAD_MANAGER_FRAME
The main KiCad project manager frame.
Definition
kicad_manager_frame.h:41
PANEL_KICAD_LAUNCHER_BASE::PANEL_KICAD_LAUNCHER_BASE
PANEL_KICAD_LAUNCHER_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
Definition
panel_kicad_launcher_base.cpp:12
PANEL_KICAD_LAUNCHER::CreateLaunchers
void CreateLaunchers()
Definition
panel_kicad_launcher.cpp:89
PANEL_KICAD_LAUNCHER::onThemeChanged
void onThemeChanged(wxSysColourChangedEvent &aEvent)
Definition
panel_kicad_launcher.cpp:194
PANEL_KICAD_LAUNCHER::onLauncherButtonClick
void onLauncherButtonClick(wxCommandEvent &aEvent)
Definition
panel_kicad_launcher.cpp:58
PANEL_KICAD_LAUNCHER::m_actionForId
std::unordered_map< int, const TOOL_ACTION * > m_actionForId
Definition
panel_kicad_launcher.h:49
PANEL_KICAD_LAUNCHER::~PANEL_KICAD_LAUNCHER
~PANEL_KICAD_LAUNCHER()
Definition
panel_kicad_launcher.cpp:44
PANEL_KICAD_LAUNCHER::m_nextLauncherId
int m_nextLauncherId
Definition
panel_kicad_launcher.h:52
PANEL_KICAD_LAUNCHER::PANEL_KICAD_LAUNCHER
PANEL_KICAD_LAUNCHER(wxWindow *aParent)
Definition
panel_kicad_launcher.cpp:34
PANEL_KICAD_LAUNCHER::m_frame
KICAD_MANAGER_FRAME * m_frame
Definition
panel_kicad_launcher.h:44
TOOL_ACTION
Represent a single user action.
Definition
tool_action.h:300
TOOL_MANAGER
Master controller class:
Definition
tool_manager.h:58
panel_kicad_launcher_base.h
src
kicad
dialogs
panel_kicad_launcher.h
Generated on Fri Jul 31 2026 00:07:52 for KiCad PCB EDA Suite by
1.13.2