KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_design_block_pane.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 The 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, see <https://www.gnu.org/licenses/>.
18 */
19#ifndef PCB_DESIGN_BLOCK_PANE_H
20#define PCB_DESIGN_BLOCK_PANE_H
21
24#include <widgets/html_window.h>
25#include <widgets/wx_panel.h>
26#include <wx/checkbox.h>
27#include <wx/filedlgcustomize.h>
28#include <pcbnew_settings.h>
29
30
31class PCB_EDIT_FRAME;
33
34
36{
37public:
38 PCB_DESIGN_BLOCK_PANE( PCB_EDIT_FRAME* aParent, const LIB_ID* aPreselect, std::vector<LIB_ID>& aHistoryList );
39
40 void OnCheckBox( wxCommandEvent& aEvent );
41 void UpdateCheckboxes();
42
43 void OnSaveBoardAsDesignBlock( wxCommandEvent& aEvent );
44 void OnSaveSelectionAsDesignBlock( wxCommandEvent& aEvent );
45
46protected:
47 void setLabelsAndTooltips() override;
48
50 wxCheckBox* m_placeAsGroup;
51 wxCheckBox* m_keepAnnotations;
52};
53
54
55// This is a helper class for the file dialog to allow the user to choose similar options
56// as the design block chooser when importing a board.
57class FILEDLG_IMPORT_BOARD_CONTENTS : public wxFileDialogCustomizeHook
58{
59public:
61
62 void AddCustomControls( wxFileDialogCustomize& customizer ) override;
63
64 void TransferDataFromCustomControls() override;
65
66private:
68
69 wxFileDialogCheckBox* m_cbRepeatedPlacement;
70 wxFileDialogCheckBox* m_cbPlaceAsGroup;
71 wxFileDialogCheckBox* m_cbKeepAnnotations;
72
74};
75
76#endif
DESIGN_BLOCK_PANE(EDA_DRAW_FRAME *aParent, const LIB_ID *aPreselect, std::vector< LIB_ID > &aHistoryList)
FILEDLG_IMPORT_BOARD_CONTENTS(PCBNEW_SETTINGS *aSettings)
wxFileDialogCheckBox * m_cbRepeatedPlacement
wxFileDialogCheckBox * m_cbPlaceAsGroup
wxDECLARE_NO_COPY_CLASS(FILEDLG_IMPORT_BOARD_CONTENTS)
void AddCustomControls(wxFileDialogCustomize &customizer) override
wxFileDialogCheckBox * m_cbKeepAnnotations
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
void OnCheckBox(wxCommandEvent &aEvent)
void OnSaveBoardAsDesignBlock(wxCommandEvent &aEvent)
PCB_DESIGN_BLOCK_PANE(PCB_EDIT_FRAME *aParent, const LIB_ID *aPreselect, std::vector< LIB_ID > &aHistoryList)
void OnSaveSelectionAsDesignBlock(wxCommandEvent &aEvent)
The main frame for Pcbnew.