KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_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 SCH_DESIGN_BLOCK_PANE_H
20#define SCH_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 <eeschema_settings.h>
29
30
31class SCH_EDIT_FRAME;
33
34
36{
37public:
38 SCH_DESIGN_BLOCK_PANE( SCH_EDIT_FRAME* aParent, const LIB_ID* aPreselect, std::vector<LIB_ID>& aHistoryList );
39
40 /* Handler for checkbox events */
41 void OnCheckBox( wxCommandEvent& aEvent );
42 void UpdateCheckboxes();
43
44 void ProjectChanged() override;
45
46protected:
47 void setLabelsAndTooltips() override;
48
49protected:
51 wxCheckBox* m_placeAsGroup;
52 wxCheckBox* m_placeAsSheet;
53 wxCheckBox* m_keepAnnotations;
54};
55
56
57// This is a helper class for the file dialog to allow the user to choose similar options
58// as the design block chooser when importing a sheet.
59class FILEDLG_IMPORT_SHEET_CONTENTS : public wxFileDialogCustomizeHook
60{
61public:
63
64 void AddCustomControls( wxFileDialogCustomize& customizer ) override;
65
66 void TransferDataFromCustomControls() override;
67
68private:
70
71 wxFileDialogCheckBox* m_cbRepeatedPlacement;
72 wxFileDialogCheckBox* m_cbPlaceAsGroup;
73 wxFileDialogCheckBox* m_cbPlaceAsSheet;
74 wxFileDialogCheckBox* m_cbKeepAnnotations;
75
77};
78
79#endif
DESIGN_BLOCK_PANE(EDA_DRAW_FRAME *aParent, const LIB_ID *aPreselect, std::vector< LIB_ID > &aHistoryList)
wxFileDialogCheckBox * m_cbRepeatedPlacement
wxFileDialogCheckBox * m_cbPlaceAsSheet
wxFileDialogCheckBox * m_cbKeepAnnotations
void AddCustomControls(wxFileDialogCustomize &customizer) override
FILEDLG_IMPORT_SHEET_CONTENTS(EESCHEMA_SETTINGS *aSettings)
wxFileDialogCheckBox * m_cbPlaceAsGroup
wxDECLARE_NO_COPY_CLASS(FILEDLG_IMPORT_SHEET_CONTENTS)
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
void OnCheckBox(wxCommandEvent &aEvent)
SCH_DESIGN_BLOCK_PANE(SCH_EDIT_FRAME *aParent, const LIB_ID *aPreselect, std::vector< LIB_ID > &aHistoryList)
Schematic editor (Eeschema) main window.