KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_select_3d_model.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 <[email protected]>
5 * Copyright The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef DIALOG_SELECT_3DMODEL_H
22#define DIALOG_SELECT_3DMODEL_H
23
25
26class FP_3DMODEL;
27class S3D_CACHE;
30
32{
33public:
34 DIALOG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, FP_3DMODEL* aModelItem,
35 wxString& prevModelSelectDir, int& prevModelWildcard );
36
37 bool TransferDataFromWindow() override;
38 void OnSelectionChanged( wxCommandEvent& event )override;
39 void OnFileActivated( wxCommandEvent& event )override;
40 void SetRootDir( wxCommandEvent& event ) override;
41 void Cfg3DPaths( wxCommandEvent& event ) override;
42
43 bool IsEmbedded3DModel() const
44 {
45 return m_EmbedModelCb->IsChecked();
46 }
47
48private:
49 void updateDirChoiceList( void );
50
51 FP_3DMODEL* m_model; // data for the selected model
52 S3D_CACHE* m_cache; // cache manager
53 FILENAME_RESOLVER* m_resolver; // 3D filename resolver
54
55 wxString& m_previousDir;
56
58};
59
60#endif // DIALOG_SELECT_3DMODEL_H
void OnSelectionChanged(wxCommandEvent &event) override
DIALOG_SELECT_3DMODEL(wxWindow *aParent, S3D_CACHE *aCacheManager, FP_3DMODEL *aModelItem, wxString &prevModelSelectDir, int &prevModelWildcard)
void SetRootDir(wxCommandEvent &event) override
FILENAME_RESOLVER * m_resolver
EDA_3D_MODEL_VIEWER * m_modelViewer
void OnFileActivated(wxCommandEvent &event) override
void Cfg3DPaths(wxCommandEvent &event) override
DIALOG_SELECT_3D_MODEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Select 3D Model"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Implement a canvas based on a wxGLCanvas.
Provide an extensible class to resolve 3D model paths.
Cache for storing the 3D shapes.
Definition 3d_cache.h:53