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 (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
26
27#include <pad.h>
28#include <macros.h>
29#include <pcb_edit_frame.h>
30
31
32// Class DIALOG_PUSH_PAD_PROPERTIES static variables
37
38
41 m_parent( aParent )
42{
43 // Pad filter selection.
48
49 SetupStandardButtons( { { wxID_OK, _( "Change Pads on Current Footprint" ) },
50 { wxID_APPLY, _( "Change Pads on Identical Footprints" ) } } );
51
52 if( aParent->IsType( FRAME_FOOTPRINT_EDITOR ) )
53 m_sdbSizer1Apply->Show( false );
54
55 m_sdbSizer1->Layout();
56
58}
59
60
62{
63 int returncode = 0;
64
65 switch( event.GetId() )
66 {
67 case wxID_APPLY:
68 returncode = 1;
70
71 case wxID_OK:
76
77 if( IsQuasiModal() )
78 EndQuasiModal( returncode );
79 else
80 EndDialog( returncode );
81
82 break;
83 }
84
86}
Class DIALOG_PUSH_PAD_PROPERTIES_BASE.
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:113
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.
void OnModify() override
Must be called after a change in order to set the "modify" flag and update other data structures and ...
#define _(s)
@ FRAME_FOOTPRINT_EDITOR
Definition: frame_type.h:43
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:83