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__
26 #define __DIALOG_CREATE_ARRAY__
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 <boost/bimap.hpp>
36 #include <widgets/unit_binder.h>
38 
39 
41 {
42 public:
43 
44  #define NUMBERING_TYPE_MAX NUMBERING_ALPHA_FULL
45 
46  // Constructor and destructor
47  DIALOG_CREATE_ARRAY( PCB_BASE_FRAME* aParent, bool enableNumbering,
48  wxPoint aOrigPos );
49 
51 
57  {
58  return m_settings;
59  }
60 
61 private:
62 
68 
74 
76 
77  /*
78  * The position of the original item(s), used for finding radius, etc
79  */
80  const wxPoint m_originalItemPosition;
81 
82  // Event callbacks
83  void OnParameterChanged( wxCommandEvent& event ) override;
84 
85  // Internal callback handlers
86  void setControlEnablement();
88 
89  bool TransferDataFromWindow() override;
90 
91  // some uses of arrays might not allow component renumbering
93 };
94 
95 #endif // __DIALOG_CREATE_ARRAY__
DIALOG_CREATE_ARRAY(PCB_BASE_FRAME *aParent, bool enableNumbering, wxPoint aOrigPos)
void OnParameterChanged(wxCommandEvent &event) override
ARRAY_OPTIONS * m_settings
The settings object returned to the caller.
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
ARRAY_OPTIONS * GetArrayOptions() const
WIDGET_SAVE_RESTORE m_cfg_persister
Classes used in Pcbnew, CvPcb and GerbView.
Options that govern the setup of an "array" of multiple item.
Definition: array_options.h:34
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