KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_fp_properties_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) 2010-2015 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
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, 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 PANEL_FP_PROPERTIES_3D_MODEL_H_
26#define PANEL_FP_PROPERTIES_3D_MODEL_H_
27
28#include <footprint.h>
30#include <vector>
31
32class DIALOG_SHIM;
36
38{
44};
45
47{
48
49public:
51 DIALOG_SHIM* aDialogParent,
52 PANEL_EMBEDDED_FILES* aFilesPanel,
53 wxWindow* aParent, wxWindowID aId = wxID_ANY,
54 const wxPoint& aPos = wxDefaultPosition,
55 const wxSize& aSize = wxDefaultSize,
56 long aStyle = wxTAB_TRAVERSAL,
57 const wxString& aName = wxEmptyString );
58
60
61 bool TransferDataToWindow() override;
62 bool TransferDataFromWindow() override;
63
65
67
68 std::vector<FP_3DMODEL>& GetModelList()
69 {
70 return m_shapes3D_list;
71 }
72
73private:
74 // virtual event functions
75 void On3DModelSelected( wxGridEvent& ) override;
76 void On3DModelCellChanged( wxGridEvent& aEvent ) override;
77 void OnRemove3DModel( wxCommandEvent& event ) override;
78 void OnAdd3DModel( wxCommandEvent& event ) override;
79 void OnAdd3DRow( wxCommandEvent& event ) override;
80 void Cfg3DPath( wxCommandEvent& event ) override;
81
82 void OnGridSize( wxSizeEvent& event ) override;
83 void OnUpdateUI( wxUpdateUIEvent& event ) override;
84
85 void updateValidateStatus( int aRow );
86
87 MODEL_VALIDATE_ERRORS validateModelExists( const wxString& aFilename );
88
89 void select3DModel( int aModelIdx );
90
91 void onModify();
92
93 virtual void onDialogActivateEvent( wxActivateEvent& aEvent );
94 virtual void onShowEvent( wxShowEvent& aEvent );
95
96 // Wrapper on creating and posting custom event
97 void postCustomPanelShownEventWithPredicate( bool predicate );
98
99private:
103
104 std::vector<FP_3DMODEL> m_shapes3D_list;
107
109};
110
111#endif // PANEL_FP_PROPERTIES_3D_MODEL_H_
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
Class PANEL_FP_PROPERTIES_3D_MODEL_BASE.
void OnUpdateUI(wxUpdateUIEvent &event) override
void Cfg3DPath(wxCommandEvent &event) override
void OnRemove3DModel(wxCommandEvent &event) override
std::vector< FP_3DMODEL > & GetModelList()
virtual void onShowEvent(wxShowEvent &aEvent)
void On3DModelCellChanged(wxGridEvent &aEvent) override
virtual void onDialogActivateEvent(wxActivateEvent &aEvent)
void OnGridSize(wxSizeEvent &event) override
void postCustomPanelShownEventWithPredicate(bool predicate)
MODEL_VALIDATE_ERRORS validateModelExists(const wxString &aFilename)
void OnAdd3DModel(wxCommandEvent &event) override
void OnAdd3DRow(wxCommandEvent &event) override
std::vector< FP_3DMODEL > m_shapes3D_list
void On3DModelSelected(wxGridEvent &) override
Common, abstract interface for edit frames.