KiCad PCB EDA Suite
dialog_footprint_properties.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-2021 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_FOOTPRINT_PROPERTIES_H
27 #define DIALOG_FOOTPRINT_PROPERTIES_H
28 
29 
31 #include <wx/valnum.h>
32 #include <fp_text_grid_table.h>
33 #include <footprint.h>
34 #include <widgets/unit_binder.h>
35 
36 
37 class PCB_EDIT_FRAME;
39 
41 {
42 public:
43  // The dialog can be closed for several reasons.
45  {
52  };
53 
54  DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParent, FOOTPRINT* aFootprint );
56 
57  bool Validate() override;
58 
59  bool TransferDataToWindow() override;
60  bool TransferDataFromWindow() override;
61 
64 
65 private:
66  // virtual event functions
67  void EditFootprint( wxCommandEvent& ) override;
68  void EditLibraryFootprint( wxCommandEvent& ) override;
69  void UpdateFootprint( wxCommandEvent& ) override;
70  void ChangeFootprint( wxCommandEvent& ) override;
71  void FootprintOrientEvent( wxCommandEvent& ) override;
72  void OnOtherOrientation( wxCommandEvent& aEvent ) override;
73  void OnGridSize( wxSizeEvent& aEvent ) override;
74  void OnAddField( wxCommandEvent& ) override;
75  void OnDeleteField( wxCommandEvent& ) override;
76  void OnUpdateUI( wxUpdateUIEvent& ) override;
77  void OnPageChange( wxNotebookEvent& event ) override;
78 
79  void select3DModel( int aModelIdx );
80 
81  void adjustGridColumns( int aWidth );
82 
88 
89 private:
92 
93  static int m_page; // remember the last open page during session
94 
98  wxFloatingPointValidator<double> m_orientValidator;
99  double m_orientValue;
100 
105 
111 
112  std::vector<bool> m_macHack;
113  enum FP_PROPS_RETVALUE m_returnValue; // the option that closed the dialog
114 
116 
118 };
119 
120 
121 #endif // DIALOG_FOOTPRINT_PROPERTIES_H
PANEL_FP_PROPERTIES_3D_MODEL * m_3dPanel
void OnAddField(wxCommandEvent &) override
void OnUpdateUI(wxUpdateUIEvent &) override
Class DIALOG_FOOTPRINT_PROPERTIES_BASE.
void FootprintOrientEvent(wxCommandEvent &) override
void select3DModel(int aModelIdx)
void OnDeleteField(wxCommandEvent &) override
void EditLibraryFootprint(wxCommandEvent &) override
void OnOtherOrientation(wxCommandEvent &aEvent) override
wxFloatingPointValidator< double > m_orientValidator
The main frame for Pcbnew.
DIALOG_FOOTPRINT_PROPERTIES(PCB_EDIT_FRAME *aParent, FOOTPRINT *aFootprint)
void UpdateFootprint(wxCommandEvent &) override
enum FP_PROPS_RETVALUE GetReturnValue()
void OnPageChange(wxNotebookEvent &event) override
void updateOrientationControl()
Update the orientation validated control, without triggering a change event on the control (which wou...
void EditFootprint(wxCommandEvent &) override
void ChangeFootprint(wxCommandEvent &) override
void OnGridSize(wxSizeEvent &aEvent) override