KiCad PCB EDA Suite
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Variables
a
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
Typedefs
a
c
e
f
i
k
l
m
n
o
p
s
v
w
Enumerations
c
d
f
g
l
m
n
o
p
q
r
s
t
v
Enumerator
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
KiCad Dev Docs
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
pad_tool.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
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
#ifndef __PAD_TOOL_H
25
#define __PAD_TOOL_H
26
27
28
#include <
tools/pcb_tool_base.h
>
29
30
class
ACTION_MENU
;
31
class
PCB_SHAPE
;
32
36
class
PAD_TOOL
:
public
PCB_TOOL_BASE
37
{
38
public
:
39
PAD_TOOL
();
40
~PAD_TOOL
();
41
43
void
Reset
(
RESET_REASON
aReason )
override
;
44
46
bool
Init
()
override
;
47
51
int
EnumeratePads
(
const
TOOL_EVENT
& aEvent );
52
56
int
PlacePad
(
const
TOOL_EVENT
& aEvent );
57
61
int
EditPad
(
const
TOOL_EVENT
& aEvent );
62
63
int
OnUndoRedo
(
const
TOOL_EVENT
& aEvent );
64
65
bool
InPadEditMode
() {
return
m_editPad
!=
niluuid
; }
66
void
ExitPadEditMode
();
67
68
wxString
GetLastPadNumber
()
const
{
return
m_lastPadNumber
; }
69
void
SetLastPadNumber
(
const
wxString& aPadNumber ) {
m_lastPadNumber
= aPadNumber; }
70
77
std::vector<PCB_SHAPE*>
RecombinePad
(
PAD
* aPad,
bool
aIsDryRun );
78
79
private
:
81
void
setTransitions
()
override
;
82
84
int
pastePadProperties
(
const
TOOL_EVENT
& aEvent );
85
87
int
copyPadSettings
(
const
TOOL_EVENT
& aEvent );
88
90
int
pushPadSettings
(
const
TOOL_EVENT
& aEvent );
91
92
void
explodePad
(
PAD
* aPad,
PCB_LAYER_ID
* aLayer,
BOARD_COMMIT
& aCommit );
93
94
void
enterPadEditMode
();
95
96
private
:
97
wxString
m_lastPadNumber
;
98
99
HIGH_CONTRAST_MODE
m_previousHighContrastMode
;
100
KIID
m_editPad
;
101
};
102
103
#endif
// __PAD_TOOL_H
HIGH_CONTRAST_MODE
HIGH_CONTRAST_MODE
Determine how inactive layers should be displayed.
Definition:
board_project_settings.h:95
ACTION_MENU
Define the structure of a menu based on ACTIONs.
Definition:
action_menu.h:49
BOARD_COMMIT
Definition:
board_commit.h:47
KIID
Definition:
kiid.h:49
PAD_TOOL
Tool relating to pads and pad settings.
Definition:
pad_tool.h:37
PAD_TOOL::OnUndoRedo
int OnUndoRedo(const TOOL_EVENT &aEvent)
Definition:
pad_tool.cpp:774
PAD_TOOL::m_previousHighContrastMode
HIGH_CONTRAST_MODE m_previousHighContrastMode
Definition:
pad_tool.h:99
PAD_TOOL::explodePad
void explodePad(PAD *aPad, PCB_LAYER_ID *aLayer, BOARD_COMMIT &aCommit)
Definition:
pad_tool.cpp:876
PAD_TOOL::~PAD_TOOL
~PAD_TOOL()
React to model/view changes.
Definition:
pad_tool.cpp:59
PAD_TOOL::setTransitions
void setTransitions() override
< Bind handlers to corresponding TOOL_ACTIONs.
Definition:
pad_tool.cpp:929
PAD_TOOL::EditPad
int EditPad(const TOOL_EVENT &aEvent)
Enter/exit WYSIWYG pad shape editing.
Definition:
pad_tool.cpp:720
PAD_TOOL::ExitPadEditMode
void ExitPadEditMode()
Definition:
pad_tool.cpp:846
PAD_TOOL::m_editPad
KIID m_editPad
Definition:
pad_tool.h:100
PAD_TOOL::copyPadSettings
int copyPadSettings(const TOOL_EVENT &aEvent)
Push pad settings from a pad to other pads on board or footprint.
Definition:
pad_tool.cpp:173
PAD_TOOL::enterPadEditMode
void enterPadEditMode()
Definition:
pad_tool.cpp:810
PAD_TOOL::pastePadProperties
int pastePadProperties(const TOOL_EVENT &aEvent)
Copy pad settings from a pad to the board design settings.
Definition:
pad_tool.cpp:146
PAD_TOOL::PlacePad
int PlacePad(const TOOL_EVENT &aEvent)
Place a pad in footprint editor.
Definition:
pad_tool.cpp:572
PAD_TOOL::EnumeratePads
int EnumeratePads(const TOOL_EVENT &aEvent)
Tool for quick pad enumeration.
Definition:
pad_tool.cpp:304
PAD_TOOL::PAD_TOOL
PAD_TOOL()
Definition:
pad_tool.cpp:52
PAD_TOOL::Init
bool Init() override
Init() is called once upon a registration of the tool.
Definition:
pad_tool.cpp:85
PAD_TOOL::SetLastPadNumber
void SetLastPadNumber(const wxString &aPadNumber)
Definition:
pad_tool.h:69
PAD_TOOL::GetLastPadNumber
wxString GetLastPadNumber() const
Definition:
pad_tool.h:68
PAD_TOOL::RecombinePad
std::vector< PCB_SHAPE * > RecombinePad(PAD *aPad, bool aIsDryRun)
Recombine an exploded pad (or one produced with overlapping polygons in an older version).
Definition:
pad_tool.cpp:918
PAD_TOOL::InPadEditMode
bool InPadEditMode()
Definition:
pad_tool.h:65
PAD_TOOL::m_lastPadNumber
wxString m_lastPadNumber
Definition:
pad_tool.h:97
PAD_TOOL::pushPadSettings
int pushPadSettings(const TOOL_EVENT &aEvent)
Definition:
pad_tool.cpp:243
PAD
Definition:
pad.h:54
PCB_SHAPE
Definition:
pcb_shape.h:38
PCB_TOOL_BASE
Definition:
pcb_tool_base.h:71
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:168
Reset
void Reset() override
niluuid
KIID niluuid(0)
PCB_LAYER_ID
PCB_LAYER_ID
A quick note on layer IDs:
Definition:
layer_ids.h:60
pcb_tool_base.h
src
pcbnew
tools
pad_tool.h
Generated on Mon Feb 24 2025 00:05:35 for KiCad PCB EDA Suite by
1.9.6