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#pragma once
26
27// Include the wxFormBuider header base:
29
30#include <memory>
31
32#include <array_options.h>
33#include <board_item.h>
34#include <pcb_base_frame.h>
36#include <widgets/unit_binder.h>
38
39
41{
42public:
51 DIALOG_CREATE_ARRAY( PCB_BASE_FRAME* aParent, std::unique_ptr<ARRAY_OPTIONS>& aOptions,
52 bool enableNumbering, const VECTOR2I& aOrigPos );
54
55 // Implement the RECEIVER interface for the callback from the TOOL
56 void UpdatePickedItem( const EDA_ITEM* aItem ) override;
57 void UpdatePickedPoint( const std::optional<VECTOR2I>& aPoint ) override;
58
59private:
60 // Event callbacks
61 void OnParameterChanged( wxCommandEvent& event ) override;
62
63 // Center select buttons
64 void OnSelectCenterButton( wxCommandEvent& event ) override;
65
66 // Internal callback handlers
69
70 bool TransferDataFromWindow() override;
71
73
77 std::unique_ptr<ARRAY_OPTIONS>& m_settings;
78
79 /*
80 * The position of the original item(s), used for finding radius, etc
81 */
83
84 // Decide whether to display pad numbering options or not
86
91
93};
Class DIALOG_CREATE_ARRAY_BASE.
WIDGET_SAVE_RESTORE m_cfg_persister
bool TransferDataFromWindow() override
PCB_BASE_FRAME * m_frame
void OnParameterChanged(wxCommandEvent &event) override
const VECTOR2I m_originalItemPosition
std::unique_ptr< ARRAY_OPTIONS > & m_settings
The settings to re-seat on dialog OK.
void UpdatePickedItem(const EDA_ITEM *aItem) override
void UpdatePickedPoint(const std::optional< VECTOR2I > &aPoint) override
void OnSelectCenterButton(wxCommandEvent &event) override
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:89
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
Interface class for something that receives picked points or items from this tool.