KiCad PCB EDA Suite
dialog_edit_footprint_for_BoardEditor.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 (C) 1992-2016 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 
26 #ifndef DIALOG_EDIT_FOOTPRINT_FOR_BOARDEDITOR_H
27 #define DIALOG_EDIT_FOOTPRINT_FOR_BOARDEDITOR_H
28 
29 
31 #include <wx/valnum.h>
32 #include <text_mod_grid_table.h>
33 #include <class_module.h>
34 #include <widgets/unit_binder.h>
35 
36 
37 class PCB_EDIT_FRAME;
38 class PANEL_PREV_3D;
39 
40 
42 {
43 private:
44  wxConfigBase* m_config;
46  wxDC* m_DC;
48 
49  static int m_page; // remember the last open page during session
50 
54  wxFloatingPointValidator<double> m_OrientValidator;
55  double m_OrientValue;
56 
60 
61  std::vector<MODULE_3D_SETTINGS> m_shapes3D_list;
63 
68 
69  bool m_inSelect;
70 
71 public:
72  // The dialog can be closed for several reasons.
74  {
80  };
81 
82 public:
83  // Constructor and destructor
84  DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aParent, MODULE* aModule, wxDC* aDC );
86 
87  bool Validate() override;
88 
89  bool TransferDataToWindow() override;
90  bool TransferDataFromWindow() override;
91 
92 private:
93  // virtual event functions
94  void On3DModelSelected( wxGridEvent& ) override;
95  void On3DModelCellChanged( wxGridEvent& aEvent ) override;
96  void OnRemove3DModel( wxCommandEvent& ) override;
97  void OnAdd3DModel( wxCommandEvent& ) override;
98  void OnAdd3DRow( wxCommandEvent& ) override;
99  void EditFootprint( wxCommandEvent& ) override;
100  void EditLibraryFootprint( wxCommandEvent& ) override;
101  void UpdateModule( wxCommandEvent& ) override;
102  void ExchangeModule( wxCommandEvent& ) override;
103  void ModuleOrientEvent( wxCommandEvent& ) override;
104  void OnOtherOrientation( wxKeyEvent& aEvent ) override;
105  void Cfg3DPath( wxCommandEvent& ) override;
106  void OnGridSize( wxSizeEvent& aEvent ) override;
107  void OnAddField( wxCommandEvent& ) override;
108  void OnDeleteField( wxCommandEvent& ) override;
109  void OnUpdateUI( wxUpdateUIEvent& ) override;
110 
111  void select3DModel( int aModelIdx );
112 
113  void adjustGridColumns( int aWidth );
114 };
115 
116 
117 #endif // DIALOG_EDIT_FOOTPRINT_FOR_BOARDEDITOR_H
void On3DModelCellChanged(wxGridEvent &aEvent) override
wxFloatingPointValidator< double > m_OrientValidator
void OnOtherOrientation(wxKeyEvent &aEvent) override
void EditLibraryFootprint(wxCommandEvent &) override
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
Module description (excepted pads)
DIALOG_FOOTPRINT_BOARD_EDITOR(PCB_EDIT_FRAME *aParent, MODULE *aModule, wxDC *aDC)
Class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list