KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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, [email protected]
5 * Copyright (C) 1992-2023 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 <board_item.h>
33#include <pcb_base_frame.h>
34
35#include <widgets/unit_binder.h>
37
38#include <memory>
39
41{
42public:
51 DIALOG_CREATE_ARRAY( PCB_BASE_FRAME* aParent, std::unique_ptr<ARRAY_OPTIONS>& aOptions,
52 bool enableNumbering, const VECTOR2I& aOrigPos );
53
54private:
55 // Event callbacks
56 void OnButtonPosition( wxCommandEvent& event ) override;
57 void OnButtonRadius( wxCommandEvent& event ) override;
58
59 void OnParameterChanged( wxCommandEvent& event ) override;
60 void OnRadiusChanged( wxCommandEvent& event ) override;
61
62 // Internal callback handlers
66
67 bool TransferDataFromWindow() override;
68
72 std::unique_ptr<ARRAY_OPTIONS>& m_settings;
73
74 /*
75 * The position of the original item(s), used for finding radius, etc
76 */
78
79 // Decide whether to display pad numbering options or not
81
89
91};
92
93#endif // DIALOG_CREATE_ARRAY__H_
Class DIALOG_CREATE_ARRAY_BASE.
WIDGET_SAVE_RESTORE m_cfg_persister
void OnButtonRadius(wxCommandEvent &event) override
bool TransferDataFromWindow() override
void OnButtonPosition(wxCommandEvent &event) override
void OnParameterChanged(wxCommandEvent &event) override
void OnRadiusChanged(wxCommandEvent &event) override
const VECTOR2I m_originalItemPosition
std::unique_ptr< ARRAY_OPTIONS > & m_settings
The settings to re-seat on dialog OK.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.