KiCad PCB EDA Suite
dialog_global_pads_edition.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 (C) 2017 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 
26 
27 #include <class_pad.h>
28 #include <wxPcbStruct.h>
29 
30 
33 {
34  m_parent = aParent;
35  m_currentPad = aPad;
36 
37  // Pad filter selection.
41 
42  SetFocus();
43 
44  GetSizer()->Fit( this );
45  Centre();
46 }
47 
48 
49 // Class DIALOG_GLOBAL_PADS_EDITION static variables
53 
54 
55 void DIALOG_GLOBAL_PADS_EDITION::OnCancelClick( wxCommandEvent& event )
56 {
57  EndModal( -1 );
58 }
59 
60 
61 /* Calls the Pad editor.
62  */
63 void DIALOG_GLOBAL_PADS_EDITION::InstallPadEditor( wxCommandEvent& event )
64 {
66 }
67 
68 
69 /* Update the parameters for the component being edited.
70  */
72 {
73  int returncode = 0;
74 
75  switch( event.GetId() )
76  {
78  returncode = 1;
79 
80  // Fall through
81 
86  EndModal( returncode );
87  break;
88  }
89 
90  m_parent->OnModify();
91 }
void PadPropertiesAccept(wxCommandEvent &event) override
DIALOG_GLOBAL_PADS_EDITION(PCB_BASE_FRAME *aParent, D_PAD *aPad)
#define ID_CHANGE_ID_MODULES
Class DIALOG_GLOBAL_PADS_EDITION_BASE.
Pad object description.
void InstallPadEditor(wxCommandEvent &event) override
virtual void OnModify()
Function OnModify Virtual Must be called after a change in order to set the "modify" flag of the curr...
void InstallPadOptionsFrame(D_PAD *pad)
void OnCancelClick(wxCommandEvent &event) override
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...
#define ID_CHANGE_CURRENT_MODULE