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, 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_FOOTPRINT_PROPERTIES_FP_EDITOR_H
26#define DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_H
27
28#include <vector>
30#include <widgets/unit_binder.h>
31#include <footprint.h>
33
34
39
40
49
51{
52public:
55
56 bool Validate() override;
57
58 bool TransferDataToWindow() override;
59 bool TransferDataFromWindow() override;
60
61private:
62 // virtual event functions
63 void OnGridSize( wxSizeEvent& event ) override;
64 void OnAddField( wxCommandEvent& event ) override;
65 void OnDeleteField( wxCommandEvent& event ) override;
66 void OnAddPrivateLayer( wxCommandEvent& event ) override;
67 void OnDeletePrivateLayer( wxCommandEvent& event ) override;
68 void OnUseCustomLayers( wxCommandEvent& event ) override;
69 void OnAddCustomLayer( wxCommandEvent& event ) override;
70 void OnDeleteCustomLayer( wxCommandEvent& event ) override;
71 void OnAddNettieGroup( wxCommandEvent& event ) override;
72 void OnRemoveNettieGroup( wxCommandEvent& event ) override;
73 void OnAddJumperGroup( wxCommandEvent& event ) override;
74 void OnRemoveJumperGroup( wxCommandEvent& event ) override;
75 void OnUpdateUI( wxUpdateUIEvent& event ) override;
76 void OnPageChanging( wxNotebookEvent& event ) override;
77 void OnText( wxCommandEvent& event ) override;
78 void OnChoice( wxCommandEvent& event ) override;
79 void OnCheckBox( wxCommandEvent& event ) override;
80
81 bool checkFootprintName( const wxString& aFootprintName, LIB_ID* doOverwrite );
83
84 void onAddGroup( WX_GRID* aGrid );
85 void onRemoveGroup( WX_GRID* aGrid );
86
87 void adjustGridColumns();
88
89 // Layer grid helper callbacks
90 void onLayerGridRowDelete( WX_GRID& aGrid, LAYERS_GRID_TABLE& aLayerTable, int aRow );
91 std::pair<int, int> onLayerGridRowAddUserLayer( WX_GRID& aGrid, LAYERS_GRID_TABLE& aLayerTable );
92
97
98private:
102
103 static NOTEBOOK_PAGES m_page; // remember the last open page during session
104
108
113
116
121
123
127};
128
129
130#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:49
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37