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