KiCad PCB EDA Suite
dlg_select_3dmodel.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) 2016 Cirilo Bernardo <cirilo.bernardo@gmail.com>
5  * Copyright (C) 2018 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 
31 #ifndef DLG_SELECT_3DMODEL_H
32 #define DLG_SELECT_3DMODEL_H
33 
34 #include <wx/event.h>
35 #include <wx/stattext.h>
36 #include <wx/button.h>
37 #include <wx/dialog.h>
38 #include <wx/dirctrl.h>
39 #include <wx/sizer.h>
40 #include <wx/frame.h>
41 
42 #include <dialog_shim.h>
43 
44 class MODULE_3D_SETTINGS;
45 class S3D_CACHE;
47 class C3D_MODEL_VIEWER;
48 
50 {
51 private:
52  MODULE_3D_SETTINGS* m_model; // data for the selected model
53  S3D_CACHE* m_cache; // cache manager
54  S3D_FILENAME_RESOLVER* m_resolver; // 3D filename resolver
55 
56  wxString& m_previousDir;
58 
59  wxGenericDirCtrl* m_FileTree;
61  wxChoice* dirChoices;
62 
63  void updateDirChoiceList( void );
64 
65 public:
66  DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, MODULE_3D_SETTINGS* aModelItem,
67  wxString& prevModelSelectDir, int& prevModelWildcard );
68 
69  bool TransferDataFromWindow() override;
70  void OnSelectionChanged( wxTreeEvent& event );
71  void OnFileActivated( wxTreeEvent& event );
72  void SetRootDir( wxCommandEvent& event );
73  void Cfg3DPaths( wxCommandEvent& event );
74 
76 };
77 
78 #endif // DLG_SELECT_3DMODEL_H
bool TransferDataFromWindow() override
C3D_MODEL_VIEWER * m_modelViewer
void Cfg3DPaths(wxCommandEvent &event)
void OnFileActivated(wxTreeEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
S3D_FILENAME_RESOLVER * m_resolver
Class C3D_MODEL_VIEWER Implement a canvas based on a wxGLCanvas.
wxGenericDirCtrl * m_FileTree
void SetRootDir(wxCommandEvent &event)
void OnSelectionChanged(wxTreeEvent &event)
DLG_SELECT_3DMODEL(wxWindow *aParent, S3D_CACHE *aCacheManager, MODULE_3D_SETTINGS *aModelItem, wxString &prevModelSelectDir, int &prevModelWildcard)
MODULE_3D_SETTINGS * m_model