KiCad PCB EDA Suite
dialog_export_step_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 1 2018)
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, wxTOP|wxRIGHT|wxLEFT, 5 );
24 
25  m_filePickerSTEP = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a STEP export filename"), _("STEP files (*.stp;*.step)|*.stp;*.step"), wxDefaultPosition, wxSize( -1,-1 ), wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
26  bSizerSTEPFile->Add( m_filePickerSTEP, 0, wxEXPAND|wxALL, 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  m_rbDrillAndPlotOrigin = new wxRadioButton( this, wxID_ANY, _("Drill and plot origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
44  bSizer7->Add( m_rbDrillAndPlotOrigin, 0, wxALL, 5 );
45 
46  m_rbGridOrigin = new wxRadioButton( this, wxID_ANY, _("Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
47  bSizer7->Add( m_rbGridOrigin, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
48 
49  m_rbUserDefinedOrigin = new wxRadioButton( this, wxID_ANY, _("User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
50  bSizer7->Add( m_rbUserDefinedOrigin, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
51 
52  m_rbBoardCenterOrigin = new wxRadioButton( this, wxID_ANY, _("Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
53  bSizer7->Add( m_rbBoardCenterOrigin, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
54 
55 
56  bSizer2->Add( bSizer7, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
57 
58  wxBoxSizer* bSizer3;
59  bSizer3 = new wxBoxSizer( wxVERTICAL );
60 
61  m_staticText2 = new wxStaticText( this, wxID_ANY, _("User defined origin:"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_staticText2->Wrap( -1 );
63  m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
64 
65  bSizer3->Add( m_staticText2, 0, wxALL, 5 );
66 
67  wxFlexGridSizer* fgSizer1;
68  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
69  fgSizer1->SetFlexibleDirection( wxBOTH );
70  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
71 
72 
73  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
74 
75  m_staticTextUnits = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
76  m_staticTextUnits->Wrap( -1 );
77  fgSizer1->Add( m_staticTextUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
78 
79  wxString m_STEP_OrgUnitChoiceChoices[] = { _("mm"), _("inch") };
80  int m_STEP_OrgUnitChoiceNChoices = sizeof( m_STEP_OrgUnitChoiceChoices ) / sizeof( wxString );
81  m_STEP_OrgUnitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_STEP_OrgUnitChoiceNChoices, m_STEP_OrgUnitChoiceChoices, 0 );
82  m_STEP_OrgUnitChoice->SetSelection( 0 );
83  fgSizer1->Add( m_STEP_OrgUnitChoice, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
84 
85 
86  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
87 
88  m_staticTextXpos = new wxStaticText( this, wxID_ANY, _("X position:"), wxDefaultPosition, wxDefaultSize, 0 );
89  m_staticTextXpos->Wrap( -1 );
90  fgSizer1->Add( m_staticTextXpos, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
91 
92  m_STEP_Xorg = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
93  #ifdef __WXGTK__
94  if ( !m_STEP_Xorg->HasFlag( wxTE_MULTILINE ) )
95  {
96  m_STEP_Xorg->SetMaxLength( 8 );
97  }
98  #else
99  m_STEP_Xorg->SetMaxLength( 8 );
100  #endif
101  fgSizer1->Add( m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
102 
103 
104  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
105 
106  m_staticTextYpos = new wxStaticText( this, wxID_ANY, _("Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
107  m_staticTextYpos->Wrap( -1 );
108  fgSizer1->Add( m_staticTextYpos, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
109 
110  m_STEP_Yorg = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
111  #ifdef __WXGTK__
112  if ( !m_STEP_Yorg->HasFlag( wxTE_MULTILINE ) )
113  {
114  m_STEP_Yorg->SetMaxLength( 8 );
115  }
116  #else
117  m_STEP_Yorg->SetMaxLength( 8 );
118  #endif
119  fgSizer1->Add( m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
120 
121 
122  bSizer3->Add( fgSizer1, 1, wxEXPAND, 5 );
123 
124 
125  bSizer2->Add( bSizer3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
126 
127  wxBoxSizer* bSizer8;
128  bSizer8 = new wxBoxSizer( wxVERTICAL );
129 
130  m_staticText7 = new wxStaticText( this, wxID_ANY, _("Other options:"), wxDefaultPosition, wxDefaultSize, 0 );
131  m_staticText7->Wrap( -1 );
132  m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
133 
134  bSizer8->Add( m_staticText7, 0, wxALL, 5 );
135 
136  m_cbRemoveVirtual = new wxCheckBox( this, wxID_ANY, _("Ignore virtual components"), wxDefaultPosition, wxDefaultSize, 0 );
137  bSizer8->Add( m_cbRemoveVirtual, 0, wxALL, 5 );
138 
139  m_cbOverwriteFile = new wxCheckBox( this, wxID_ANY, _("Overwrite old file"), wxDefaultPosition, wxDefaultSize, 0 );
140  bSizer8->Add( m_cbOverwriteFile, 0, wxALL, 5 );
141 
142  m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
143  bSizer8->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
144 
145  m_staticText9 = new wxStaticText( this, wxID_ANY, _("Board outline builder:"), wxDefaultPosition, wxDefaultSize, 0 );
146  m_staticText9->Wrap( -1 );
147  bSizer8->Add( m_staticText9, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
148 
149  wxBoxSizer* bSizerTolerance;
150  bSizerTolerance = new wxBoxSizer( wxHORIZONTAL );
151 
152  m_staticTextTolerance = new wxStaticText( this, wxID_ANY, _("Tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
153  m_staticTextTolerance->Wrap( -1 );
154  bSizerTolerance->Add( m_staticTextTolerance, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
155 
156  wxString m_toleranceChoices[] = { _("Tight"), _("Standard"), _("Loose"), _("Very loose") };
157  int m_toleranceNChoices = sizeof( m_toleranceChoices ) / sizeof( wxString );
158  m_tolerance = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_toleranceNChoices, m_toleranceChoices, 0 );
159  m_tolerance->SetSelection( 1 );
160  m_tolerance->SetToolTip( _("Tolerance sets the distance between two points that are considered joined. Standard is 0.001mm.") );
161 
162  bSizerTolerance->Add( m_tolerance, 1, wxALL, 5 );
163 
164 
165  bSizer8->Add( bSizerTolerance, 0, wxEXPAND, 5 );
166 
167 
168  bSizer2->Add( bSizer8, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
169 
170 
171  bSizerSTEPFile->Add( bSizer2, 1, wxEXPAND, 5 );
172 
173  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
174  bSizerSTEPFile->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
175 
176  m_sdbSizer = new wxStdDialogButtonSizer();
177  m_sdbSizerOK = new wxButton( this, wxID_OK );
178  m_sdbSizer->AddButton( m_sdbSizerOK );
179  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
180  m_sdbSizer->AddButton( m_sdbSizerCancel );
181  m_sdbSizer->Realize();
182 
183  bSizerSTEPFile->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxRIGHT, 5 );
184 
185 
186  this->SetSizer( bSizerSTEPFile );
187  this->Layout();
188 
189  this->Centre( wxBOTH );
190 
191  // Connect Events
192  m_STEP_OrgUnitChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
193  m_STEP_Xorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
194  m_STEP_Yorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
195  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this );
196 }
197 
199 {
200  // Disconnect Events
201  m_STEP_OrgUnitChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
202  m_STEP_Xorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
203  m_STEP_Yorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
204  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this );
205 
206 }
virtual void onExportButton(wxCommandEvent &event)
virtual void onUpdateXPos(wxUpdateUIEvent &event)
wxRadioButton * m_rbDrillAndPlotOrigin
virtual void onUpdateYPos(wxUpdateUIEvent &event)
virtual void onUpdateUnits(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
wxFilePickerCtrl * m_filePickerSTEP
#define NULL
DIALOG_EXPORT_STEP_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export STEP"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(560, 277), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStdDialogButtonSizer * m_sdbSizer
wxTextCtrl wrapper to handle math expression evaluation.
#define _(s)
Definition: 3d_actions.cpp:33