KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_wizard_tools.cpp
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
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU 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, you may find one here:
18
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19
* or you may search the http://www.gnu.org website for the version 2 license,
20
* or you may write to the Free Software Foundation, Inc.,
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
*/
23
24
#include "
tools/footprint_wizard_tools.h
"
25
26
#include <
tools/pcb_actions.h
>
27
28
#include <
pcbnew_id.h
>
29
30
bool
FOOTPRINT_WIZARD_TOOLS::Init
()
31
{
32
return
true
;
33
}
34
35
36
void
FOOTPRINT_WIZARD_TOOLS::Reset
(
RESET_REASON
aReason )
37
{
38
}
39
40
41
int
FOOTPRINT_WIZARD_TOOLS::ShowWizards
(
const
TOOL_EVENT
& aEvent )
42
{
43
wxCommandEvent
dummy
;
44
frame
()->
SelectCurrentWizard
(
dummy
);
45
return
0;
46
}
47
48
49
int
FOOTPRINT_WIZARD_TOOLS::ResetWizardPrms
(
const
TOOL_EVENT
& aEvent )
50
{
51
frame
()->
DefaultParameters
();
52
return
0;
53
}
54
55
56
57
int
FOOTPRINT_WIZARD_TOOLS::ExportFpToEditor
(
const
TOOL_EVENT
& aEvent )
58
{
59
wxPostEvent(
frame
(), wxCommandEvent( wxEVT_TOOL,
ID_FOOTPRINT_WIZARD_DONE
) );
60
return
0;
61
}
62
63
64
void
FOOTPRINT_WIZARD_TOOLS::setTransitions
()
65
{
66
// clang-format off
67
Go
( &
FOOTPRINT_WIZARD_TOOLS::ShowWizards
,
PCB_ACTIONS::showWizards
.MakeEvent() );
68
Go
( &
FOOTPRINT_WIZARD_TOOLS::ResetWizardPrms
,
PCB_ACTIONS::resetWizardPrms
.MakeEvent() );
69
Go
( &
FOOTPRINT_WIZARD_TOOLS::ExportFpToEditor
,
PCB_ACTIONS::exportFpToEditor
.MakeEvent() );
70
// clang-format on
71
}
FOOTPRINT_WIZARD_FRAME::SelectCurrentWizard
void SelectCurrentWizard(wxCommandEvent &aDummy)
Definition
footprint_wizard_frame_functions.cpp:123
FOOTPRINT_WIZARD_FRAME::DefaultParameters
void DefaultParameters()
Definition
footprint_wizard_frame_functions.cpp:129
FOOTPRINT_WIZARD_TOOLS::setTransitions
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
Definition
footprint_wizard_tools.cpp:64
FOOTPRINT_WIZARD_TOOLS::ResetWizardPrms
int ResetWizardPrms(const TOOL_EVENT &aEvent)
Definition
footprint_wizard_tools.cpp:49
FOOTPRINT_WIZARD_TOOLS::Init
bool Init() override
Init() is called once upon a registration of the tool.
Definition
footprint_wizard_tools.cpp:30
FOOTPRINT_WIZARD_TOOLS::ShowWizards
int ShowWizards(const TOOL_EVENT &aEvent)
Definition
footprint_wizard_tools.cpp:41
FOOTPRINT_WIZARD_TOOLS::frame
FOOTPRINT_WIZARD_FRAME * frame() const
Definition
footprint_wizard_tools.h:61
FOOTPRINT_WIZARD_TOOLS::Reset
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
Definition
footprint_wizard_tools.cpp:36
FOOTPRINT_WIZARD_TOOLS::ExportFpToEditor
int ExportFpToEditor(const TOOL_EVENT &aEvent)
Definition
footprint_wizard_tools.cpp:57
PCB_ACTIONS::exportFpToEditor
static TOOL_ACTION exportFpToEditor
Definition
pcb_actions.h:631
PCB_ACTIONS::showWizards
static TOOL_ACTION showWizards
Footprint wizard frame actions:
Definition
pcb_actions.h:629
PCB_ACTIONS::resetWizardPrms
static TOOL_ACTION resetWizardPrms
Definition
pcb_actions.h:630
TOOL_BASE::RESET_REASON
RESET_REASON
Determine the reason of reset for a tool.
Definition
tool_base.h:78
TOOL_EVENT
Generic, UI-independent tool event.
Definition
tool_event.h:171
TOOL_INTERACTIVE::Go
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Define which state (aStateFunc) to go when a certain event arrives (aConditions).
Definition
tool_interactive.h:147
footprint_wizard_tools.h
pcb_actions.h
pcbnew_id.h
ID_FOOTPRINT_WIZARD_DONE
@ ID_FOOTPRINT_WIZARD_DONE
Definition
pcbnew_id.h:90
dummy
std::vector< FAB_LAYER_COLOR > dummy
Definition
stackup_predefined_prms.cpp:97
src
pcbnew
tools
footprint_wizard_tools.cpp
Generated on Fri Apr 3 2026 00:07:23 for KiCad PCB EDA Suite by
1.13.2