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 )
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
20 bSizerTop =
new wxBoxSizer( wxHORIZONTAL );
22 m_txtBrdFile =
new wxStaticText(
this, wxID_ANY,
_(
"File:"), wxDefaultPosition, wxDefaultSize, 0 );
26 m_filePickerSTEP =
new wxFilePickerCtrl(
this, wxID_ANY, wxEmptyString,
_(
"temp"),
_(
"temp"), wxDefaultPosition, wxSize( -1,-1 ), wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
33 bSizer2 =
new wxBoxSizer( wxHORIZONTAL );
35 wxStaticBoxSizer* sbCoordinates;
36 sbCoordinates =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Coordinates") ), wxVERTICAL );
38 m_rbDrillAndPlotOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Drill/place file origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
41 m_rbGridOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
44 m_rbUserDefinedOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
47 m_rbBoardCenterOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
51 bSizer2->Add( sbCoordinates, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
53 wxStaticBoxSizer* sbUserDefinedOrigin;
54 sbUserDefinedOrigin =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"User Defined Origin") ), wxVERTICAL );
56 wxFlexGridSizer* fgSizer1;
57 fgSizer1 =
new wxFlexGridSizer( 0, 2, 5, 0 );
58 fgSizer1->SetFlexibleDirection( wxBOTH );
59 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
61 m_staticTextUnits =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"Units:"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
71 m_staticTextXpos =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"X position:"), wxDefaultPosition, wxDefaultSize, 0 );
75 m_STEP_Xorg =
new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
84 fgSizer1->Add(
m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
86 m_staticTextYpos =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
90 m_STEP_Yorg =
new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
99 fgSizer1->Add(
m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
102 sbUserDefinedOrigin->Add( fgSizer1, 1, wxEXPAND, 5 );
105 bSizer2->Add( sbUserDefinedOrigin, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
107 wxStaticBoxSizer* sbOtherOptions;
108 sbOtherOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Other Options") ), wxVERTICAL );
110 m_cbRemoveVirtual =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Ignore not mounted components"), wxDefaultPosition, wxDefaultSize, 0 );
111 m_cbRemoveVirtual->SetToolTip(
_(
"Do not show components not in BOM and not in place file") );
115 m_cbSubstModels =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Substitute similarly named models"), wxDefaultPosition, wxDefaultSize, 0 );
116 m_cbSubstModels->SetToolTip(
_(
"Replace VRML models with STEP models of the same name") );
120 m_cbOverwriteFile =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Overwrite old file"), wxDefaultPosition, wxDefaultSize, 0 );
123 m_cbExportTracks =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Export tracks (time consuming)"), wxDefaultPosition, wxDefaultSize, 0 );
124 m_cbExportTracks->SetToolTip(
_(
"Export tracks and vias on external copper layers.\nWarning: this is *extremely* time consuming.") );
128 m_staticTextTolerance =
new wxStaticText( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Board outline chaining tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
132 wxString m_choiceToleranceChoices[] = {
_(
"Tight (0.001 mm)"),
_(
"Standard (0.01 mm)"),
_(
"Loose (0.1 mm)") };
133 int m_choiceToleranceNChoices =
sizeof( m_choiceToleranceChoices ) /
sizeof( wxString );
134 m_choiceTolerance =
new wxChoice( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceToleranceNChoices, m_choiceToleranceChoices, 0 );
136 m_choiceTolerance->SetToolTip(
_(
"Tolerance sets the distance between two points that are considered joined when building the board outlines.") );
141 bSizer2->Add( sbOtherOptions, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
146 wxBoxSizer* bSizer81;
147 bSizer81 =
new wxBoxSizer( wxHORIZONTAL );
150 bSizerSTEPFile->Add( bSizer81, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
166 this->Centre( wxBOTH );
wxStdDialogButtonSizer * m_sdbSizer
virtual void onUpdateUnits(wxUpdateUIEvent &event)
wxCheckBox * m_cbExportTracks
wxCheckBox * m_cbSubstModels
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)
TEXT_CTRL_EVAL * m_STEP_Xorg
TEXT_CTRL_EVAL * m_STEP_Yorg
wxRadioButton * m_rbGridOrigin
wxStaticText * m_txtBrdFile
wxCheckBox * m_cbOverwriteFile
wxFilePickerCtrl * m_filePickerSTEP
wxStaticText * m_staticTextYpos
wxStaticText * m_staticTextUnits
wxBoxSizer * bSizerSTEPFile
wxStaticText * m_staticTextTolerance
wxStaticText * m_staticTextXpos
wxRadioButton * m_rbBoardCenterOrigin
wxChoice * m_choiceTolerance
wxChoice * m_STEP_OrgUnitChoice
wxCheckBox * m_cbRemoveVirtual
virtual void onExportButton(wxCommandEvent &event)
wxButton * m_sdbSizerCancel
virtual void onUpdateXPos(wxUpdateUIEvent &event)
virtual void onUpdateYPos(wxUpdateUIEvent &event)
wxRadioButton * m_rbUserDefinedOrigin
~DIALOG_EXPORT_STEP_BASE()
wxRadioButton * m_rbDrillAndPlotOrigin
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
wxTextCtrl wrapper to handle math expression evaluation.