KiCad PCB EDA Suite
dialog_export_step_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Nov 22 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
13 
14 DIALOG_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  wxBoxSizer* bSizerSTEPFile;
19  bSizerSTEPFile = new wxBoxSizer( wxVERTICAL );
20 
21  m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("File name:"), wxDefaultPosition, wxDefaultSize, 0 );
22  m_txtBrdFile->Wrap( -1 );
23  bSizerSTEPFile->Add( m_txtBrdFile, 0, wxALL, 5 );
24 
25  m_filePickerSTEP = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a STEP export filename"), wxT("STEP files (*.stp;*.step)|*.stp;*.step"), wxDefaultPosition, wxSize( -1,-1 ), wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
26  bSizerSTEPFile->Add( m_filePickerSTEP, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
27 
28  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
29  bSizerSTEPFile->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
30 
31  wxBoxSizer* bSizer2;
32  bSizer2 = new wxBoxSizer( wxHORIZONTAL );
33 
34  wxBoxSizer* bSizer7;
35  bSizer7 = new wxBoxSizer( wxVERTICAL );
36 
37  m_staticText6 = new wxStaticText( this, wxID_ANY, _("Coordinate origin options:"), wxDefaultPosition, wxDefaultSize, 0 );
38  m_staticText6->Wrap( -1 );
39  m_staticText6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
40 
41  bSizer7->Add( m_staticText6, 0, wxALL, 5 );
42 
43  wxFlexGridSizer* fgSizer2;
44  fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
45  fgSizer2->SetFlexibleDirection( wxBOTH );
46  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
47 
48 
49  fgSizer2->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
50 
51  m_cbPlotOrigin = new wxCheckBox( this, wxID_ANY, _("Drill and plot axis origin"), wxDefaultPosition, wxDefaultSize, 0 );
52  m_cbPlotOrigin->SetToolTip( _("Use the auxiliary axis origin (used in plot and drill geneation) as STEP coordinates origin.") );
53 
54  fgSizer2->Add( m_cbPlotOrigin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
55 
56 
57  fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
58 
59  m_cbGridOrigin = new wxCheckBox( this, wxID_ANY, _("Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
60  m_cbGridOrigin->SetToolTip( _("Use the grid origin as STEP coordinates origin.") );
61 
62  fgSizer2->Add( m_cbGridOrigin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
63 
64 
65  fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
66 
67  m_cbUserOrigin = new wxCheckBox( this, wxID_ANY, _("User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
68  m_cbUserOrigin->SetToolTip( _("Use this option if you want to define a specific coordinate origin value.") );
69 
70  fgSizer2->Add( m_cbUserOrigin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
71 
72 
73  fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
74 
75  m_cbBoardCenter = new wxCheckBox( this, wxID_ANY, _("Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
76  m_cbBoardCenter->SetToolTip( _("Use this option if you want to define coordinate origin at board center.") );
77 
78  fgSizer2->Add( m_cbBoardCenter, 0, wxALL, 5 );
79 
80 
81  bSizer7->Add( fgSizer2, 1, wxEXPAND, 5 );
82 
83 
84  bSizer2->Add( bSizer7, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
85 
86  wxBoxSizer* bSizer3;
87  bSizer3 = new wxBoxSizer( wxVERTICAL );
88 
89  m_staticText2 = new wxStaticText( this, wxID_ANY, _("User defined origin:"), wxDefaultPosition, wxDefaultSize, 0 );
90  m_staticText2->Wrap( -1 );
91  m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
92 
93  bSizer3->Add( m_staticText2, 0, wxALL, 5 );
94 
95  wxFlexGridSizer* fgSizer1;
96  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
97  fgSizer1->SetFlexibleDirection( wxBOTH );
98  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
99 
100 
101  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
102 
103  m_staticText5 = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
104  m_staticText5->Wrap( -1 );
105  fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
106 
107  wxString m_STEP_OrgUnitChoiceChoices[] = { _("mm"), _("inch") };
108  int m_STEP_OrgUnitChoiceNChoices = sizeof( m_STEP_OrgUnitChoiceChoices ) / sizeof( wxString );
109  m_STEP_OrgUnitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_STEP_OrgUnitChoiceNChoices, m_STEP_OrgUnitChoiceChoices, 0 );
110  m_STEP_OrgUnitChoice->SetSelection( 0 );
111  fgSizer1->Add( m_STEP_OrgUnitChoice, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
112 
113 
114  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
115 
116  m_staticText3 = new wxStaticText( this, wxID_ANY, _("X position:"), wxDefaultPosition, wxDefaultSize, 0 );
117  m_staticText3->Wrap( -1 );
118  fgSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
119 
120  m_STEP_Xorg = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
121  #ifdef __WXGTK__
122  if ( !m_STEP_Xorg->HasFlag( wxTE_MULTILINE ) )
123  {
124  m_STEP_Xorg->SetMaxLength( 8 );
125  }
126  #else
127  m_STEP_Xorg->SetMaxLength( 8 );
128  #endif
129  fgSizer1->Add( m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
130 
131 
132  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
133 
134  m_staticText4 = new wxStaticText( this, wxID_ANY, _("Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
135  m_staticText4->Wrap( -1 );
136  fgSizer1->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
137 
138  m_STEP_Yorg = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
139  #ifdef __WXGTK__
140  if ( !m_STEP_Yorg->HasFlag( wxTE_MULTILINE ) )
141  {
142  m_STEP_Yorg->SetMaxLength( 8 );
143  }
144  #else
145  m_STEP_Yorg->SetMaxLength( 8 );
146  #endif
147  fgSizer1->Add( m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
148 
149 
150  bSizer3->Add( fgSizer1, 1, wxEXPAND, 5 );
151 
152 
153  bSizer2->Add( bSizer3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
154 
155  wxBoxSizer* bSizer8;
156  bSizer8 = new wxBoxSizer( wxVERTICAL );
157 
158  m_staticText7 = new wxStaticText( this, wxID_ANY, _("Other options:"), wxDefaultPosition, wxDefaultSize, 0 );
159  m_staticText7->Wrap( -1 );
160  m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
161 
162  bSizer8->Add( m_staticText7, 0, wxALL, 5 );
163 
164  wxFlexGridSizer* fgSizer3;
165  fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
166  fgSizer3->SetFlexibleDirection( wxBOTH );
167  fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
168 
169 
170  fgSizer3->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
171 
172  m_cbRemoveVirtual = new wxCheckBox( this, wxID_ANY, _("Ignore virtual components"), wxDefaultPosition, wxDefaultSize, 0 );
173  fgSizer3->Add( m_cbRemoveVirtual, 0, wxALL, 5 );
174 
175 
176  bSizer8->Add( fgSizer3, 1, wxEXPAND, 5 );
177 
178 
179  bSizer2->Add( bSizer8, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
180 
181 
182  bSizerSTEPFile->Add( bSizer2, 1, wxEXPAND, 5 );
183 
184  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
185  bSizerSTEPFile->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
186 
187  m_sdbSizer = new wxStdDialogButtonSizer();
188  m_sdbSizerOK = new wxButton( this, wxID_OK );
189  m_sdbSizer->AddButton( m_sdbSizerOK );
190  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
191  m_sdbSizer->AddButton( m_sdbSizerCancel );
192  m_sdbSizer->Realize();
193 
194  bSizerSTEPFile->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
195 
196 
197  this->SetSizer( bSizerSTEPFile );
198  this->Layout();
199  bSizerSTEPFile->Fit( this );
200 
201  this->Centre( wxBOTH );
202 
203  // Connect Events
204  m_cbPlotOrigin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this );
205  m_cbGridOrigin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this );
206  m_cbUserOrigin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this );
207  m_cbBoardCenter->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this );
208 }
209 
211 {
212  // Disconnect Events
213  m_cbPlotOrigin->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this );
214  m_cbGridOrigin->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this );
215  m_cbUserOrigin->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this );
216  m_cbBoardCenter->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onSelectOrigin ), NULL, this );
217 
218 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
wxFilePickerCtrl * m_filePickerSTEP
wxStdDialogButtonSizer * m_sdbSizer
wxTextCtrl wrapper to handle math expression evaluation.
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)
virtual void onSelectOrigin(wxCommandEvent &event)