KiCad PCB EDA Suite
dialog_export_step_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Aug 4 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 #include "wx_html_report_panel.h"
10 
12 
14 
15 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 )
16 {
17  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18 
19  wxBoxSizer* bSizerSTEPFile;
20  bSizerSTEPFile = new wxBoxSizer( wxVERTICAL );
21 
22  m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("File name:"), wxDefaultPosition, wxDefaultSize, 0 );
23  m_txtBrdFile->Wrap( -1 );
24  bSizerSTEPFile->Add( m_txtBrdFile, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
25 
26  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 );
27  bSizerSTEPFile->Add( m_filePickerSTEP, 0, wxEXPAND|wxALL, 5 );
28 
29  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
30  bSizerSTEPFile->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
31 
32  wxBoxSizer* bSizer2;
33  bSizer2 = new wxBoxSizer( wxHORIZONTAL );
34 
35  wxBoxSizer* bSizer7;
36  bSizer7 = new wxBoxSizer( wxVERTICAL );
37 
38  m_staticText6 = new wxStaticText( this, wxID_ANY, _("Coordinate origin options:"), wxDefaultPosition, wxDefaultSize, 0 );
39  m_staticText6->Wrap( -1 );
40  m_staticText6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
41 
42  bSizer7->Add( m_staticText6, 0, wxALL, 5 );
43 
44  m_rbDrillAndPlotOrigin = new wxRadioButton( this, wxID_ANY, _("Drill and plot origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
45  bSizer7->Add( m_rbDrillAndPlotOrigin, 0, wxALL, 5 );
46 
47  m_rbGridOrigin = new wxRadioButton( this, wxID_ANY, _("Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
48  bSizer7->Add( m_rbGridOrigin, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
49 
50  m_rbUserDefinedOrigin = new wxRadioButton( this, wxID_ANY, _("User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
51  bSizer7->Add( m_rbUserDefinedOrigin, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
52 
53  m_rbBoardCenterOrigin = new wxRadioButton( this, wxID_ANY, _("Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
54  bSizer7->Add( m_rbBoardCenterOrigin, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
55 
56 
57  bSizer2->Add( bSizer7, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
58 
59  wxBoxSizer* bSizer3;
60  bSizer3 = new wxBoxSizer( wxVERTICAL );
61 
62  m_staticText2 = new wxStaticText( this, wxID_ANY, _("User defined origin:"), wxDefaultPosition, wxDefaultSize, 0 );
63  m_staticText2->Wrap( -1 );
64  m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
65 
66  bSizer3->Add( m_staticText2, 0, wxALL, 5 );
67 
68  wxFlexGridSizer* fgSizer1;
69  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
70  fgSizer1->SetFlexibleDirection( wxBOTH );
71  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
72 
73 
74  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
75 
76  m_staticText5 = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
77  m_staticText5->Wrap( -1 );
78  fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
79 
80  wxString m_STEP_OrgUnitChoiceChoices[] = { _("mm"), _("inch") };
81  int m_STEP_OrgUnitChoiceNChoices = sizeof( m_STEP_OrgUnitChoiceChoices ) / sizeof( wxString );
82  m_STEP_OrgUnitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_STEP_OrgUnitChoiceNChoices, m_STEP_OrgUnitChoiceChoices, 0 );
83  m_STEP_OrgUnitChoice->SetSelection( 0 );
84  fgSizer1->Add( m_STEP_OrgUnitChoice, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
85 
86 
87  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
88 
89  m_staticText3 = new wxStaticText( this, wxID_ANY, _("X position:"), wxDefaultPosition, wxDefaultSize, 0 );
90  m_staticText3->Wrap( -1 );
91  fgSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
92 
93  m_STEP_Xorg = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
94  #ifdef __WXGTK__
95  if ( !m_STEP_Xorg->HasFlag( wxTE_MULTILINE ) )
96  {
97  m_STEP_Xorg->SetMaxLength( 8 );
98  }
99  #else
100  m_STEP_Xorg->SetMaxLength( 8 );
101  #endif
102  fgSizer1->Add( m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
103 
104 
105  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
106 
107  m_staticText4 = new wxStaticText( this, wxID_ANY, _("Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
108  m_staticText4->Wrap( -1 );
109  fgSizer1->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
110 
111  m_STEP_Yorg = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
112  #ifdef __WXGTK__
113  if ( !m_STEP_Yorg->HasFlag( wxTE_MULTILINE ) )
114  {
115  m_STEP_Yorg->SetMaxLength( 8 );
116  }
117  #else
118  m_STEP_Yorg->SetMaxLength( 8 );
119  #endif
120  fgSizer1->Add( m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
121 
122 
123  bSizer3->Add( fgSizer1, 1, wxEXPAND, 5 );
124 
125 
126  bSizer2->Add( bSizer3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
127 
128  wxBoxSizer* bSizer8;
129  bSizer8 = new wxBoxSizer( wxVERTICAL );
130 
131  m_staticText7 = new wxStaticText( this, wxID_ANY, _("Other options:"), wxDefaultPosition, wxDefaultSize, 0 );
132  m_staticText7->Wrap( -1 );
133  m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
134 
135  bSizer8->Add( m_staticText7, 0, wxALL, 5 );
136 
137  wxFlexGridSizer* fgSizer3;
138  fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
139  fgSizer3->SetFlexibleDirection( wxBOTH );
140  fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
141 
142 
143  fgSizer3->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
144 
145  m_cbRemoveVirtual = new wxCheckBox( this, wxID_ANY, _("Ignore virtual components"), wxDefaultPosition, wxDefaultSize, 0 );
146  fgSizer3->Add( m_cbRemoveVirtual, 0, wxALL, 5 );
147 
148 
149  bSizer8->Add( fgSizer3, 1, wxEXPAND, 5 );
150 
151 
152  bSizer2->Add( bSizer8, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
153 
154 
155  bSizerSTEPFile->Add( bSizer2, 0, wxEXPAND, 5 );
156 
157  m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
158  bSizerSTEPFile->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 );
159 
160  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
161  bSizerSTEPFile->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
162 
163  m_sdbSizer = new wxStdDialogButtonSizer();
164  m_sdbSizerOK = new wxButton( this, wxID_OK );
165  m_sdbSizer->AddButton( m_sdbSizerOK );
166  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
167  m_sdbSizer->AddButton( m_sdbSizerCancel );
168  m_sdbSizer->Realize();
169 
170  bSizerSTEPFile->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxRIGHT, 5 );
171 
172 
173  this->SetSizer( bSizerSTEPFile );
174  this->Layout();
175 
176  this->Centre( wxBOTH );
177 
178  // Connect Events
179  m_STEP_OrgUnitChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
180  m_STEP_Xorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
181  m_STEP_Yorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
182  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this );
183 }
184 
186 {
187  // Disconnect Events
188  m_STEP_OrgUnitChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
189  m_STEP_Xorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
190  m_STEP_Yorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
191  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this );
192 
193 }
virtual void onExportButton(wxCommandEvent &event)
virtual void onUpdateXPos(wxUpdateUIEvent &event)
wxRadioButton * m_rbDrillAndPlotOrigin
virtual void onUpdateYPos(wxUpdateUIEvent &event)
virtual void onUpdateUnits(wxUpdateUIEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
wxFilePickerCtrl * m_filePickerSTEP
WX_HTML_REPORT_PANEL * m_messagesPanel
wxStdDialogButtonSizer * m_sdbSizer
wxTextCtrl wrapper to handle math expression evaluation.
Class WX_HTML_REPORT_PANEL.
DIALOG_EXPORT_STEP_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export STEP"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(552, 361), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)