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 
33 class PANEL_PREV_3D;
34 
36 {
37 private:
39  wxDC * m_DC;
43  std::vector <MODULE_3D_SETTINGS> m_shapes3D_list;
45  static size_t m_page; // remember the last open page during session
48 
49  wxFloatingPointValidator<double> m_OrientValidator;
50  double m_OrientValue;
51 
52 public:
53  // The dialog can be closed for several reasons.
54  // they are listed here:
56  {
62  };
63 
64 public:
65  // Constructor and destructor
66  DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aParent, MODULE* aModule, wxDC* aDC );
68 
69 private:
71  void InitBoardProperties();
72  void InitModeditProperties();
73  void Edit3DShapeFileName();
74 
75  // virtual event functions
76  void OnEditValue( wxCommandEvent& event ) override;
77  void OnEditReference( wxCommandEvent& event ) override;
78  void On3DShapeNameSelected( wxCommandEvent& event ) override;
79  void Edit3DShapeFilename( wxCommandEvent& event ) override
80  {
82  }
83  void Remove3DShape( wxCommandEvent& event ) override;
84  void Add3DShape( wxCommandEvent& event ) override
85  {
87  }
88  void GotoModuleEditor( wxCommandEvent& event ) override;
89  void UpdateModule( wxCommandEvent& event ) override;
90  void ExchangeModule( wxCommandEvent& event ) override;
91  void ModuleOrientEvent( wxCommandEvent& event ) override;
92  void Cfg3DPath( wxCommandEvent& event ) override;
93 
94  void OnInitDlg( wxInitDialogEvent& event ) override
95  {
96  // Call the default wxDialog handler of a wxInitDialogEvent
98 
99  // Now all widgets have the size fixed, call FinishDialogSettings
101  }
102 
103  bool TransferDataToWindow() override;
104  bool TransferDataFromWindow() override;
105 };
106 
107 
108 #endif // DIALOG_EDIT_FOOTPRINT_FOR_BOARDEDITOR_H
void Cfg3DPath(wxCommandEvent &event) override
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
void OnEditValue(wxCommandEvent &event) override
static size_t m_page
Module editor: Dialog for editing footprint properties in the pcb editor.
void ExchangeModule(wxCommandEvent &event) override
void ModuleOrientEvent(wxCommandEvent &event) override
void Edit3DShapeFilename(wxCommandEvent &event) override
wxFloatingPointValidator< double > m_OrientValidator
void Remove3DShape(wxCommandEvent &event) override
void Add3DShape(wxCommandEvent &event) override
void GotoModuleEditor(wxCommandEvent &event) override
void OnEditReference(wxCommandEvent &event) override
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
void OnInitDlg(wxInitDialogEvent &event) override
void UpdateModule(wxCommandEvent &event) override
DIALOG_FOOTPRINT_BOARD_EDITOR(PCB_EDIT_FRAME *aParent, MODULE *aModule, wxDC *aDC)
void On3DShapeNameSelected(wxCommandEvent &event) override
Class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE.
std::vector< MODULE_3D_SETTINGS > m_shapes3D_list