14PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWindowID
id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString&
name ) : wxPanel( parent, id, pos, size, style,
name )
16 wxBoxSizer* bSizermain;
17 bSizermain =
new wxBoxSizer( wxHORIZONTAL );
19 wxBoxSizer* bSizerLeft;
20 bSizerLeft =
new wxBoxSizer( wxVERTICAL );
22 wxStaticBoxSizer* sbSizerScale;
23 sbSizerScale =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Scale") ), wxVERTICAL );
25 wxFlexGridSizer* fgSizerScale;
26 fgSizerScale =
new wxFlexGridSizer( 0, 3, 1, 3 );
27 fgSizerScale->AddGrowableCol( 1 );
28 fgSizerScale->SetFlexibleDirection( wxBOTH );
29 fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31 m_staticText1 =
new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY,
_(
"X:"), wxDefaultPosition, wxDefaultSize, 0 );
33 fgSizerScale->Add(
m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
35 xscale =
new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
36 fgSizerScale->Add(
xscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
38 m_spinXscale =
new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
39 fgSizerScale->Add(
m_spinXscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
41 m_staticText2 =
new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY,
_(
"Y:"), wxDefaultPosition, wxDefaultSize, 0 );
43 fgSizerScale->Add(
m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
45 yscale =
new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
46 fgSizerScale->Add(
yscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
48 m_spinYscale =
new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
49 fgSizerScale->Add(
m_spinYscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
51 m_staticText3 =
new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY,
_(
"Z:"), wxDefaultPosition, wxDefaultSize, 0 );
53 fgSizerScale->Add(
m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
55 zscale =
new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
56 fgSizerScale->Add(
zscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
58 m_spinZscale =
new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
59 fgSizerScale->Add(
m_spinZscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
62 sbSizerScale->Add( fgSizerScale, 0, wxBOTTOM|wxEXPAND|wxRIGHT, 2 );
65 bSizerLeft->Add( sbSizerScale, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
67 wxStaticBoxSizer* sbSizerRotation;
68 sbSizerRotation =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Rotation") ), wxVERTICAL );
70 wxFlexGridSizer* fgSizerRotate;
71 fgSizerRotate =
new wxFlexGridSizer( 0, 3, 1, 3 );
72 fgSizerRotate->AddGrowableCol( 1 );
73 fgSizerRotate->SetFlexibleDirection( wxBOTH );
74 fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
76 m_staticText11 =
new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY,
_(
"X:"), wxDefaultPosition, wxDefaultSize, 0 );
78 fgSizerRotate->Add(
m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
80 xrot =
new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
81 fgSizerRotate->Add(
xrot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
83 m_spinXrot =
new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
84 fgSizerRotate->Add(
m_spinXrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
86 m_staticText21 =
new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY,
_(
"Y:"), wxDefaultPosition, wxDefaultSize, 0 );
88 fgSizerRotate->Add(
m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
90 yrot =
new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
91 fgSizerRotate->Add(
yrot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
93 m_spinYrot =
new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
94 fgSizerRotate->Add(
m_spinYrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
96 m_staticText31 =
new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY,
_(
"Z:"), wxDefaultPosition, wxDefaultSize, 0 );
98 fgSizerRotate->Add(
m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
100 zrot =
new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
101 fgSizerRotate->Add(
zrot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
103 m_spinZrot =
new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
104 fgSizerRotate->Add(
m_spinZrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
107 sbSizerRotation->Add( fgSizerRotate, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 2 );
110 bSizerLeft->Add( sbSizerRotation, 0, wxLEFT|wxRIGHT|wxEXPAND, 5 );
112 wxStaticBoxSizer* sbSizerOffset;
113 sbSizerOffset =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Offset") ), wxVERTICAL );
115 wxFlexGridSizer* fgSizerOffset;
116 fgSizerOffset =
new wxFlexGridSizer( 0, 3, 1, 3 );
117 fgSizerOffset->AddGrowableCol( 1 );
118 fgSizerOffset->SetFlexibleDirection( wxBOTH );
119 fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
121 m_staticText12 =
new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY,
_(
"X:"), wxDefaultPosition, wxDefaultSize, 0 );
123 fgSizerOffset->Add(
m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
125 xoff =
new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
126 fgSizerOffset->Add(
xoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
128 m_spinXoffset =
new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
129 fgSizerOffset->Add(
m_spinXoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
131 m_staticText22 =
new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY,
_(
"Y:"), wxDefaultPosition, wxDefaultSize, 0 );
133 fgSizerOffset->Add(
m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
135 yoff =
new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
136 fgSizerOffset->Add(
yoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
138 m_spinYoffset =
new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
139 fgSizerOffset->Add(
m_spinYoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
141 m_staticText32 =
new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY,
_(
"Z:"), wxDefaultPosition, wxDefaultSize, 0 );
143 fgSizerOffset->Add(
m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
145 zoff =
new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
146 fgSizerOffset->Add(
zoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxEXPAND, 5 );
148 m_spinZoffset =
new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
149 fgSizerOffset->Add(
m_spinZoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
152 sbSizerOffset->Add( fgSizerOffset, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 2 );
155 bSizerLeft->Add( sbSizerOffset, 0, wxLEFT|wxRIGHT|wxEXPAND, 5 );
157 wxStaticBoxSizer* sbSizer4;
158 sbSizer4 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Opacity") ), wxVERTICAL );
160 m_opacity =
new wxSlider( sbSizer4->GetStaticBox(), wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );
161 sbSizer4->Add(
m_opacity, 0, wxRIGHT|wxLEFT, 2 );
164 bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
167 bSizermain->Add( bSizerLeft, 0, 0, 5 );
169 wxBoxSizer* bSizerRight;
170 bSizerRight =
new wxBoxSizer( wxVERTICAL );
173 bSizer6 =
new wxBoxSizer( wxHORIZONTAL );
175 m_previewLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Preview"), wxDefaultPosition, wxDefaultSize, 0 );
177 m_previewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxEmptyString ) );
179 bSizer6->Add(
m_previewLabel, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
182 bSizerRight->Add( bSizer6, 0, wxEXPAND, 5 );
190 bSizermain->Add( bSizerRight, 1, wxRIGHT|wxLEFT|wxEXPAND, 5 );
192 wxBoxSizer* bSizer3DButtons;
193 bSizer3DButtons =
new wxBoxSizer( wxVERTICAL );
196 bSizer3DButtons->Add( 0, 10, 0, 0, 5 );
199 m_bpvISO->SetToolTip(
_(
"Enable/disable orthographic projection") );
201 bSizer3DButtons->Add(
m_bpvISO, 0, wxTOP, 5 );
204 m_bpvBodyStyle->SetToolTip(
_(
"Show or hide the board body\nIf hidden, show only copper and silkscreen layers.") );
209 bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
212 bSizer3DButtons->Add(
m_bpvLeft, 0, wxBOTTOM, 5 );
215 bSizer3DButtons->Add(
m_bpvRight, 0, wxBOTTOM, 5 );
218 bSizer3DButtons->Add(
m_bpvFront, 0, wxBOTTOM, 5 );
221 bSizer3DButtons->Add(
m_bpvBack, 0, wxBOTTOM, 5 );
224 bSizer3DButtons->Add(
m_bpvTop, 0, wxBOTTOM, 5 );
230 bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
233 m_bpUpdate->SetToolTip(
_(
"Reload board and 3D models") );
235 bSizer3DButtons->Add(
m_bpUpdate, 0, wxTOP, 5 );
241 bSizer3DButtons->Add( 0, 10, 0, 0, 5 );
244 bSizermain->Add( bSizer3DButtons, 0, wxEXPAND|wxTOP, 5 );
247 this->SetSizer( bSizermain );
249 bSizermain->Fit(
this );
wxSpinButton * m_spinYrot
virtual void View3DRight(wxCommandEvent &event)
wxSpinButton * m_spinZrot
~PANEL_PREVIEW_3D_MODEL_BASE()
virtual void updateOrientation(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_bpvFront
wxStaticText * m_staticText22
virtual void View3DSettings(wxCommandEvent &event)
wxStaticText * m_staticText2
virtual void onIncrementOffset(wxSpinEvent &event)
wxStaticText * m_staticText31
virtual void onDecrementRot(wxSpinEvent &event)
virtual void View3DUpdate(wxCommandEvent &event)
wxStaticText * m_staticText3
wxSpinButton * m_spinXscale
wxSpinButton * m_spinYscale
wxSpinButton * m_spinXrot
virtual void View3DBottom(wxCommandEvent &event)
virtual void onMouseWheelRot(wxMouseEvent &event)
wxStaticText * m_staticText32
wxBoxSizer * m_SizerPanelView
wxSpinButton * m_spinZoffset
virtual void onMouseWheelScale(wxMouseEvent &event)
virtual void View3DTop(wxCommandEvent &event)
virtual void View3DLeft(wxCommandEvent &event)
virtual void onDecrementOffset(wxSpinEvent &event)
virtual void onDecrementScale(wxSpinEvent &event)
wxStaticText * m_previewLabel
virtual void View3DISO(wxCommandEvent &event)
virtual void setBodyStyleView(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_bpvLeft
wxSpinButton * m_spinXoffset
wxStaticText * m_staticText12
virtual void onIncrementRot(wxSpinEvent &event)
virtual void View3DFront(wxCommandEvent &event)
wxStaticText * m_staticText21
virtual void onMouseWheelOffset(wxMouseEvent &event)
virtual void onIncrementScale(wxSpinEvent &event)
wxSpinButton * m_spinYoffset
STD_BITMAP_BUTTON * m_bpSettings
STD_BITMAP_BUTTON * m_bpvRight
STD_BITMAP_BUTTON * m_bpvBodyStyle
virtual void onOpacitySlider(wxCommandEvent &event)
PANEL_PREVIEW_3D_MODEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
STD_BITMAP_BUTTON * m_bpvBack
wxSpinButton * m_spinZscale
virtual void View3DBack(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_bpUpdate
wxStaticText * m_staticText11
wxStaticText * m_staticText1
STD_BITMAP_BUTTON * m_bpvTop
STD_BITMAP_BUTTON * m_bpvISO
STD_BITMAP_BUTTON * m_bpvBottom