KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_push_pad_properties.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, see <https://www.gnu.org/licenses/>.
18 */
19
21
22#include <pad.h>
23#include <macros.h>
24#include <pcb_edit_frame.h>
25
26
29 m_parent( aParent )
30{
31 SetupStandardButtons( { { wxID_OK, _( "Change Pads on Current Footprint" ) },
32 { wxID_APPLY, _( "Change Pads on Identical Footprints" ) } } );
33
34 if( aParent->IsType( FRAME_FOOTPRINT_EDITOR ) )
35 m_sdbSizer1Apply->Show( false );
36
37 m_sdbSizer1->Layout();
38
40}
41
42
44{
45 int returncode = 0;
46
47 switch( event.GetId() )
48 {
49 case wxID_APPLY:
50 returncode = 1;
52
53 case wxID_OK:
54 if( IsQuasiModal() )
55 EndQuasiModal( returncode );
56 else
57 EndDialog( returncode );
58
59 break;
60 }
61
62 m_parent->OnModify();
63}
DIALOG_PUSH_PAD_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Push Pad Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void PadPropertiesAccept(wxCommandEvent &event) override
DIALOG_PUSH_PAD_PROPERTIES(PCB_BASE_FRAME *aParent)
void SetupStandardButtons(std::map< int, wxString > aLabels={})
bool IsQuasiModal() const
Definition dialog_shim.h:90
void EndQuasiModal(int retCode)
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
bool IsType(FRAME_T aType) const
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
#define _(s)
@ FRAME_FOOTPRINT_EDITOR
Definition frame_type.h:39
This file contains miscellaneous commonly used macros and functions.
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
Definition macros.h:79