KiCad PCB EDA Suite
dialog_edit_module_for_Modedit.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-2015 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_EDIT_MODULE_FOR_MODEDIT__
26 #define __DIALOG_EDIT_MODULE_FOR_MODEDIT__
27 
28 // Include the wxFormBuider header base:
29 #include <vector>
31 
32 class PANEL_PREV_3D;
33 class MODULE;
34 
36 {
37 private:
38 
43  std::vector<S3D_INFO> m_shapes3D_list;
45  static size_t m_page; // remember the last open page during session
48  LIB_ID m_currentFPID; // the full initial FPID
49 
50 public:
51 
52  // Constructor and destructor
55 
56 private:
58  void initModeditProperties();
59  void Edit3DShapeFileName();
60 
61  // virtual event functions
62  void OnEditValue( wxCommandEvent& event ) override;
63  void OnEditReference( wxCommandEvent& event ) override;
64  void On3DShapeSelection( wxCommandEvent& event );
65  void On3DShapeNameSelected( wxCommandEvent& event ) override;
66  void Add3DShape( wxCommandEvent& event ) override
67  {
69  }
70  void Remove3DShape( wxCommandEvent& event ) override;
71  void Edit3DShapeFilename( wxCommandEvent& event ) override
72  {
74  }
75 
76  void Cfg3DPath( wxCommandEvent& event ) override;
77 
78  bool TransferDataFromWindow() override;
79 
80  void OnInitDlg( wxInitDialogEvent& event ) override
81  {
82  // Call the default wxDialog handler of a wxInitDialogEvent
83  TransferDataToWindow();
84 
85  // Now all widgets have the size fixed, call FinishDialogSettings
87  }
88 };
89 
90 
91 #endif // __DIALOG_EDIT_MODULE_FOR_MODEDIT__
void Remove3DShape(wxCommandEvent &event) override
DIALOG_MODULE_MODULE_EDITOR(FOOTPRINT_EDIT_FRAME *aParent, MODULE *aModule)
void OnInitDlg(wxInitDialogEvent &event) override
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Class LIB_ID.
Definition: lib_id.h:56
void Edit3DShapeFilename(wxCommandEvent &event) override
void Cfg3DPath(wxCommandEvent &event) override
void Add3DShape(wxCommandEvent &event) override
void On3DShapeSelection(wxCommandEvent &event)
void OnEditValue(wxCommandEvent &event) override
void On3DShapeNameSelected(wxCommandEvent &event) override
void OnEditReference(wxCommandEvent &event) override
Class DIALOG_MODULE_MODULE_EDITOR_BASE.