KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_footprint_properties_fp_editor.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) 2010-2015 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
5 * Copyright The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_H
22#define DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_H
23
24#include <vector>
26#include <widgets/unit_binder.h>
28#include <footprint.h>
30
31
36
37
46
48{
49public:
52
53 bool Validate() override;
54
55 bool TransferDataToWindow() override;
56 bool TransferDataFromWindow() override;
57
58private:
59 // virtual event functions
60 void OnAddField( wxCommandEvent& event ) override;
61 void OnDeleteField( wxCommandEvent& event ) override;
62 void OnAddPrivateLayer( wxCommandEvent& event ) override;
63 void OnDeletePrivateLayer( wxCommandEvent& event ) override;
64 void OnUseCustomLayers( wxCommandEvent& event ) override;
65 void OnAddCustomLayer( wxCommandEvent& event ) override;
66 void OnDeleteCustomLayer( wxCommandEvent& event ) override;
67 void OnAddNettieGroup( wxCommandEvent& event ) override;
68 void OnRemoveNettieGroup( wxCommandEvent& event ) override;
69 void OnAddJumperGroup( wxCommandEvent& event ) override;
70 void OnRemoveJumperGroup( wxCommandEvent& event ) override;
71 void OnUpdateUI( wxUpdateUIEvent& event ) override;
72 void OnPageChanging( wxNotebookEvent& event ) override;
73 void OnText( wxCommandEvent& event ) override;
74 void OnChoice( wxCommandEvent& event ) override;
75 void OnCheckBox( wxCommandEvent& event ) override;
76
77 bool checkFootprintName( const wxString& aFootprintName, LIB_ID* doOverwrite );
79
80 void onAddGroup( WX_GRID* aGrid );
81 void onRemoveGroup( WX_GRID* aGrid );
82
83 // Layer grid helper callbacks
84 void onLayerGridRowDelete( WX_GRID& aGrid, LAYERS_GRID_TABLE& aLayerTable, int aRow );
85 std::pair<int, int> onLayerGridRowAddUserLayer( WX_GRID& aGrid, LAYERS_GRID_TABLE& aLayerTable );
86
91
92private:
96
97 static NOTEBOOK_PAGES m_page; // remember the last open page during session
98
102
106
109
114
116
118};
119
120
121#endif // DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_H
DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Footprint Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(FOOTPRINT_EDIT_FRAME *aParent, FOOTPRINT *aFootprint)
LSET getCustomLayersFromControls() const
Get the layers for the footprint from the controls that can be affected by the stackup.
bool checkFootprintName(const wxString &aFootprintName, LIB_ID *doOverwrite)
void onLayerGridRowDelete(WX_GRID &aGrid, LAYERS_GRID_TABLE &aLayerTable, int aRow)
std::pair< int, int > onLayerGridRowAddUserLayer(WX_GRID &aGrid, LAYERS_GRID_TABLE &aLayerTable)
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
A specialized binder for combined margin/ratio input fields.