KiCad PCB EDA Suite
dialog_create_array.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) 2015 John Beard, john.j.beard@gmail.com
5  * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef DIALOG_CREATE_ARRAY__H_
26 #define DIALOG_CREATE_ARRAY__H_
27 
28 // Include the wxFormBuider header base:
30 
31 #include <array_options.h>
32 #include <class_board_item.h>
33 #include <pcb_base_frame.h>
34 
35 #include <widgets/unit_binder.h>
37 
38 #include <memory>
39 
41 {
42 public:
51  DIALOG_CREATE_ARRAY( PCB_BASE_FRAME* aParent, std::unique_ptr<ARRAY_OPTIONS>& aOptions,
52  bool enableNumbering, wxPoint aOrigPos );
53 
54 private:
55  // Event callbacks
56  void OnParameterChanged( wxCommandEvent& event ) override;
57 
58  // Internal callback handlers
59  void setControlEnablement();
61 
62  bool TransferDataFromWindow() override;
63 
67  std::unique_ptr<ARRAY_OPTIONS>& m_settings;
68 
69  /*
70  * The position of the original item(s), used for finding radius, etc
71  */
72  const wxPoint m_originalItemPosition;
73 
74  // some uses of arrays might not allow component renumbering
76 
82 
84 };
85 
86 #endif // DIALOG_CREATE_ARRAY__H_
void OnParameterChanged(wxCommandEvent &event) override
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
std::unique_ptr< ARRAY_OPTIONS > & m_settings
The settings to re-seat on dialog OK.
WIDGET_SAVE_RESTORE m_cfg_persister
Classes used in Pcbnew, CvPcb and GerbView.
DIALOG_CREATE_ARRAY(PCB_BASE_FRAME *aParent, std::unique_ptr< ARRAY_OPTIONS > &aOptions, bool enableNumbering, wxPoint aOrigPos)
Construct a new dialog.
bool TransferDataFromWindow() override
Class DIALOG_CREATE_ARRAY_BASE.
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
const wxPoint m_originalItemPosition