KiCad PCB EDA Suite
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 (C) 2017-2021 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
35
class
PAD_TOOL
:
public
PCB_TOOL_BASE
36
{
37
public
:
38
PAD_TOOL
();
39
~PAD_TOOL
();
40
42
void
Reset
(
RESET_REASON
aReason )
override
;
43
45
bool
Init
()
override
;
46
50
int
EnumeratePads
(
const
TOOL_EVENT
& aEvent );
51
55
int
PlacePad
(
const
TOOL_EVENT
& aEvent );
56
60
int
EditPad
(
const
TOOL_EVENT
& aEvent );
61
62
wxString
GetLastPadName
()
const
{
return
m_lastPadName
; }
63
void
SetLastPadName
(
const
wxString& aPadName ) {
m_lastPadName
= aPadName; }
64
65
private
:
67
void
setTransitions
()
override
;
68
70
int
pastePadProperties
(
const
TOOL_EVENT
& aEvent );
71
73
int
copyPadSettings
(
const
TOOL_EVENT
& aEvent );
74
76
int
pushPadSettings
(
const
TOOL_EVENT
& aEvent );
77
78
PCB_LAYER_ID
explodePad
(
PAD
* aPad );
79
void
recombinePad
(
PAD
* aPad );
80
81
wxString
m_lastPadName
;
82
bool
m_padCopied
;
// Indicates there are valid settings in the Master Pad object
83
84
bool
m_wasHighContrast
;
85
KIID
m_editPad
;
86
};
87
88
#endif // __PAD_TOOL_H
PAD_TOOL::m_editPad
KIID m_editPad
Definition:
pad_tool.h:85
ACTION_MENU
Defines the structure of a menu based on ACTIONs.
Definition:
action_menu.h:45
PCB_TOOL_BASE
Definition:
pcb_tool_base.h:71
PAD_TOOL::PAD_TOOL
PAD_TOOL()
Definition:
pad_tool.cpp:44
PAD_TOOL
Tool relating to pads and pad settings.
Definition:
pad_tool.h:35
PAD_TOOL::m_padCopied
bool m_padCopied
Definition:
pad_tool.h:82
pcb_tool_base.h
PAD_TOOL::Reset
void Reset(RESET_REASON aReason) override
Basic initialization.
Definition:
pad_tool.cpp:56
KIID
Definition:
kiid.h:44
PCB_LAYER_ID
PCB_LAYER_ID
A quick note on layer IDs:
Definition:
layers_id_colors_and_visibility.h:69
PAD_TOOL::m_wasHighContrast
bool m_wasHighContrast
Definition:
pad_tool.h:84
PAD_TOOL::SetLastPadName
void SetLastPadName(const wxString &aPadName)
Definition:
pad_tool.h:63
PAD_TOOL::pushPadSettings
int pushPadSettings(const TOOL_EVENT &aEvent)
Definition:
pad_tool.cpp:225
PAD_TOOL::GetLastPadName
wxString GetLastPadName() const
Definition:
pad_tool.h:62
TOOL_EVENT
Generic, UI-independent tool event.
Definition:
tool_event.h:173
PAD_TOOL::pastePadProperties
int pastePadProperties(const TOOL_EVENT &aEvent)
Copy pad settings from a pad to the board design settings.
Definition:
pad_tool.cpp:124
PAD_TOOL::EnumeratePads
int EnumeratePads(const TOOL_EVENT &aEvent)
Tool for quick pad enumeration.
Definition:
pad_tool.cpp:268
PAD_TOOL::explodePad
PCB_LAYER_ID explodePad(PAD *aPad)
Definition:
pad_tool.cpp:582
PAD_TOOL::~PAD_TOOL
~PAD_TOOL()
React to model/view changes.
Definition:
pad_tool.cpp:52
PAD_TOOL::m_lastPadName
wxString m_lastPadName
Definition:
pad_tool.h:81
TOOL_BASE::RESET_REASON
RESET_REASON
Determine the reason of reset for a tool.
Definition:
tool_base.h:78
PAD_TOOL::recombinePad
void recombinePad(PAD *aPad)
Definition:
pad_tool.cpp:630
PAD_TOOL::EditPad
int EditPad(const TOOL_EVENT &aEvent)
Enter/exit WYSIWYG pad shape editing.
Definition:
pad_tool.cpp:524
PAD
Definition:
pad.h:60
PAD_TOOL::Init
bool Init() override
Init() is called once upon a registration of the tool.
Definition:
pad_tool.cpp:66
PAD_TOOL::PlacePad
int PlacePad(const TOOL_EVENT &aEvent)
Place a pad in footprint editor.
Definition:
pad_tool.cpp:464
PAD_TOOL::setTransitions
void setTransitions() override
< Bind handlers to corresponding TOOL_ACTIONs.
Definition:
pad_tool.cpp:735
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:151
pcbnew
tools
pad_tool.h
Generated on Fri Mar 5 2021 04:29:25 for KiCad PCB EDA Suite by
1.8.15