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 (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 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;
35
37{
43};
44
46{
47
48public:
50 DIALOG_SHIM* aDialogParent, wxWindow* aParent,
51 wxWindowID aId = wxID_ANY,
52 const wxPoint& aPos = wxDefaultPosition,
53 const wxSize& aSize = wxDefaultSize,
54 long aStyle = wxTAB_TRAVERSAL,
55 const wxString& aName = wxEmptyString );
56
58
59 bool TransferDataToWindow() override;
60 bool TransferDataFromWindow() override;
61
63
65
66 std::vector<FP_3DMODEL>& GetModelList()
67 {
68 return m_shapes3D_list;
69 }
70
71private:
72 // virtual event functions
73 void On3DModelSelected( wxGridEvent& ) override;
74 void On3DModelCellChanged( wxGridEvent& aEvent ) override;
75 void OnRemove3DModel( wxCommandEvent& event ) override;
76 void OnAdd3DModel( wxCommandEvent& event ) override;
77 void OnAdd3DRow( wxCommandEvent& event ) override;
78 void Cfg3DPath( wxCommandEvent& event ) override;
79
80 void OnGridSize( wxSizeEvent& event ) override;
81 void OnUpdateUI( wxUpdateUIEvent& event ) override;
82
83 void updateValidateStatus( int aRow );
84
85 MODEL_VALIDATE_ERRORS validateModelExists( const wxString& aFilename );
86
87 void select3DModel( int aModelIdx );
88
89 void onModify();
90
91 virtual void onDialogActivateEvent( wxActivateEvent& aEvent );
92 virtual void onShowEvent( wxShowEvent& aEvent );
93
94 // Wrapper on creating and posting custom event
95 void postCustomPanelShownEventWithPredicate( bool predicate );
96
97private:
101
102 std::vector<FP_3DMODEL> m_shapes3D_list;
104
106};
107
108#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.