KiCad PCB EDA Suite
dialog_export_step_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.9.0 Apr 22 2021)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
14DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15{
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17
18 bSizerSTEPFile = new wxBoxSizer( wxVERTICAL );
19
20 bSizerTop = new wxBoxSizer( wxHORIZONTAL );
21
22 m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
23 m_txtBrdFile->Wrap( -1 );
24 bSizerTop->Add( m_txtBrdFile, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
25
26 m_filePickerSTEP = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("temp"), _("temp"), wxDefaultPosition, wxSize( -1,-1 ), wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
27 bSizerTop->Add( m_filePickerSTEP, 1, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
28
29
30 bSizerSTEPFile->Add( bSizerTop, 0, wxEXPAND|wxALL, 10 );
31
32 wxBoxSizer* bSizer2;
33 bSizer2 = new wxBoxSizer( wxHORIZONTAL );
34
35 wxStaticBoxSizer* sbCoordinates;
36 sbCoordinates = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Coordinates") ), wxVERTICAL );
37
38 m_rbDrillAndPlotOrigin = new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY, _("Drill/place file origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
39 sbCoordinates->Add( m_rbDrillAndPlotOrigin, 0, wxBOTTOM|wxRIGHT, 5 );
40
41 m_rbGridOrigin = new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY, _("Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
42 sbCoordinates->Add( m_rbGridOrigin, 0, wxBOTTOM|wxRIGHT, 5 );
43
44 m_rbUserDefinedOrigin = new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY, _("User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
45 sbCoordinates->Add( m_rbUserDefinedOrigin, 0, wxBOTTOM|wxRIGHT, 5 );
46
47 m_rbBoardCenterOrigin = new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY, _("Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
48 sbCoordinates->Add( m_rbBoardCenterOrigin, 0, wxBOTTOM|wxRIGHT, 5 );
49
50
51 bSizer2->Add( sbCoordinates, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
52
53 wxStaticBoxSizer* sbUserDefinedOrigin;
54 sbUserDefinedOrigin = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Defined Origin") ), wxVERTICAL );
55
56 wxFlexGridSizer* fgSizer1;
57 fgSizer1 = new wxFlexGridSizer( 0, 2, 5, 0 );
58 fgSizer1->SetFlexibleDirection( wxBOTH );
59 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
60
61 m_staticTextUnits = new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_staticTextUnits->Wrap( -1 );
63 fgSizer1->Add( m_staticTextUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
64
65 wxString m_STEP_OrgUnitChoiceChoices[] = { _("mm"), _("inch") };
66 int m_STEP_OrgUnitChoiceNChoices = sizeof( m_STEP_OrgUnitChoiceChoices ) / sizeof( wxString );
67 m_STEP_OrgUnitChoice = new wxChoice( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_STEP_OrgUnitChoiceNChoices, m_STEP_OrgUnitChoiceChoices, 0 );
68 m_STEP_OrgUnitChoice->SetSelection( 0 );
69 fgSizer1->Add( m_STEP_OrgUnitChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
70
71 m_staticTextXpos = new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("X position:"), wxDefaultPosition, wxDefaultSize, 0 );
72 m_staticTextXpos->Wrap( -1 );
73 fgSizer1->Add( m_staticTextXpos, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
74
75 m_STEP_Xorg = new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
76 #ifdef __WXGTK__
77 if ( !m_STEP_Xorg->HasFlag( wxTE_MULTILINE ) )
78 {
79 m_STEP_Xorg->SetMaxLength( 8 );
80 }
81 #else
82 m_STEP_Xorg->SetMaxLength( 8 );
83 #endif
84 fgSizer1->Add( m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
85
86 m_staticTextYpos = new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
87 m_staticTextYpos->Wrap( -1 );
88 fgSizer1->Add( m_staticTextYpos, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
89
90 m_STEP_Yorg = new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
91 #ifdef __WXGTK__
92 if ( !m_STEP_Yorg->HasFlag( wxTE_MULTILINE ) )
93 {
94 m_STEP_Yorg->SetMaxLength( 8 );
95 }
96 #else
97 m_STEP_Yorg->SetMaxLength( 8 );
98 #endif
99 fgSizer1->Add( m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
100
101
102 sbUserDefinedOrigin->Add( fgSizer1, 1, wxEXPAND, 5 );
103
104
105 bSizer2->Add( sbUserDefinedOrigin, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
106
107 wxStaticBoxSizer* sbOtherOptions;
108 sbOtherOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Other Options") ), wxVERTICAL );
109
110 m_cbRemoveVirtual = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Ignore virtual components"), wxDefaultPosition, wxDefaultSize, 0 );
111 sbOtherOptions->Add( m_cbRemoveVirtual, 0, wxBOTTOM|wxRIGHT, 5 );
112
113 m_cbSubstModels = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Substitute similarly named models"), wxDefaultPosition, wxDefaultSize, 0 );
114 m_cbSubstModels->SetToolTip( _("Replace VRML models with STEP models of the same name") );
115
116 sbOtherOptions->Add( m_cbSubstModels, 0, wxBOTTOM|wxRIGHT, 5 );
117
118 m_cbOverwriteFile = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Overwrite old file"), wxDefaultPosition, wxDefaultSize, 0 );
119 sbOtherOptions->Add( m_cbOverwriteFile, 0, wxBOTTOM|wxRIGHT, 5 );
120
121 m_staticTextTolerance = new wxStaticText( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Board outline chaining tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
122 m_staticTextTolerance->Wrap( -1 );
123 sbOtherOptions->Add( m_staticTextTolerance, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
124
125 wxString m_toleranceChoices[] = { _("Tight (0.001 mm)"), _("Standard (0.01 mm)"), _("Loose (0.1 mm)") };
126 int m_toleranceNChoices = sizeof( m_toleranceChoices ) / sizeof( wxString );
127 m_tolerance = new wxChoice( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_toleranceNChoices, m_toleranceChoices, 0 );
128 m_tolerance->SetSelection( 1 );
129 m_tolerance->SetToolTip( _("Tolerance sets the distance between two points that are considered joined.") );
130
131 sbOtherOptions->Add( m_tolerance, 0, wxALL|wxEXPAND, 5 );
132
133
134 bSizer2->Add( sbOtherOptions, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
135
136
137 bSizerSTEPFile->Add( bSizer2, 1, wxEXPAND|wxTOP, 5 );
138
139 wxBoxSizer* bSizer81;
140 bSizer81 = new wxBoxSizer( wxHORIZONTAL );
141
142
143 bSizerSTEPFile->Add( bSizer81, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
144
145 m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
146 bSizerSTEPFile->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
147
148 m_sdbSizer = new wxStdDialogButtonSizer();
149 m_sdbSizerOK = new wxButton( this, wxID_OK );
150 m_sdbSizer->AddButton( m_sdbSizerOK );
151 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
152 m_sdbSizer->AddButton( m_sdbSizerCancel );
153 m_sdbSizer->Realize();
154
155 bSizerSTEPFile->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxRIGHT, 5 );
156
157
158 this->SetSizer( bSizerSTEPFile );
159 this->Layout();
160 bSizerSTEPFile->Fit( this );
161
162 this->Centre( wxBOTH );
163
164 // Connect Events
165 m_STEP_OrgUnitChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
166 m_STEP_Xorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
167 m_STEP_Yorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
168 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this );
169}
170
172{
173 // Disconnect Events
174 m_STEP_OrgUnitChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
175 m_STEP_Xorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
176 m_STEP_Yorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
177 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this );
178
179}
wxStdDialogButtonSizer * m_sdbSizer
virtual void onUpdateUnits(wxUpdateUIEvent &event)
DIALOG_EXPORT_STEP_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export STEP"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxFilePickerCtrl * m_filePickerSTEP
virtual void onExportButton(wxCommandEvent &event)
virtual void onUpdateXPos(wxUpdateUIEvent &event)
virtual void onUpdateYPos(wxUpdateUIEvent &event)
wxRadioButton * m_rbDrillAndPlotOrigin
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
wxTextCtrl wrapper to handle math expression evaluation.
#define _(s)