You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

264 lines
14 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version 3.10.0)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "dialog_gendrill_base.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
  10. {
  11. this->SetSizeHints( wxDefaultSize, wxDefaultSize );
  12. wxBoxSizer* bMainSizer;
  13. bMainSizer = new wxBoxSizer( wxVERTICAL );
  14. wxBoxSizer* bupperSizer;
  15. bupperSizer = new wxBoxSizer( wxHORIZONTAL );
  16. staticTextOutputDir = new wxStaticText( this, wxID_ANY, _("Output folder:"), wxDefaultPosition, wxDefaultSize, 0 );
  17. staticTextOutputDir->Wrap( -1 );
  18. bupperSizer->Add( staticTextOutputDir, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 10 );
  19. m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
  20. bupperSizer->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 0 );
  21. m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  22. bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 7 );
  23. bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP, 10 );
  24. wxBoxSizer* bmiddlerSizer;
  25. bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL );
  26. wxBoxSizer* bMiddleSizer;
  27. bMiddleSizer = new wxBoxSizer( wxVERTICAL );
  28. wxStaticBoxSizer* sbSizer6;
  29. sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drill File Format") ), wxVERTICAL );
  30. m_rbExcellon = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
  31. sbSizer6->Add( m_rbExcellon, 0, wxBOTTOM|wxRIGHT, 5 );
  32. wxBoxSizer* bSizerExcellonOptions;
  33. bSizerExcellonOptions = new wxBoxSizer( wxVERTICAL );
  34. m_Check_Mirror = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
  35. m_Check_Mirror->SetToolTip( _("Not recommended.\nUsed mostly by users who make the boards themselves.") );
  36. bSizerExcellonOptions->Add( m_Check_Mirror, 0, wxLEFT, 5 );
  37. m_Check_Minimal = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
  38. m_Check_Minimal->SetToolTip( _("Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
  39. bSizerExcellonOptions->Add( m_Check_Minimal, 0, wxRIGHT|wxLEFT, 5 );
  40. m_Check_Merge_PTH_NPTH = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
  41. m_Check_Merge_PTH_NPTH->SetToolTip( _("Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
  42. bSizerExcellonOptions->Add( m_Check_Merge_PTH_NPTH, 0, wxLEFT, 5 );
  43. wxString m_radioBoxOvalHoleModeChoices[] = { _("Use route command (recommended)"), _("Use alternate drill mode") };
  44. int m_radioBoxOvalHoleModeNChoices = sizeof( m_radioBoxOvalHoleModeChoices ) / sizeof( wxString );
  45. m_radioBoxOvalHoleMode = new wxRadioBox( sbSizer6->GetStaticBox(), wxID_ANY, _("Oval Holes Drill Mode"), wxDefaultPosition, wxDefaultSize, m_radioBoxOvalHoleModeNChoices, m_radioBoxOvalHoleModeChoices, 1, wxRA_SPECIFY_COLS );
  46. m_radioBoxOvalHoleMode->SetSelection( 0 );
  47. m_radioBoxOvalHoleMode->SetToolTip( _("Oval holes frequently create problems for board houses.\n\"Use route command\" uses the usual G00 route command (recommended)\n \"Use alternate mode\" uses another drill/ route command (G85)\n(Use it only if the recommended command does not work)") );
  48. bSizerExcellonOptions->Add( m_radioBoxOvalHoleMode, 0, wxALL|wxEXPAND, 5 );
  49. sbSizer6->Add( bSizerExcellonOptions, 1, wxEXPAND|wxLEFT, 12 );
  50. m_rbGerberX2 = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
  51. sbSizer6->Add( m_rbGerberX2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
  52. bMiddleSizer->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
  53. wxString m_Choice_Drill_MapChoices[] = { _("PostScript"), _("Gerber X2"), _("DXF"), _("SVG"), _("PDF") };
  54. int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString );
  55. m_Choice_Drill_Map = new wxRadioBox( this, wxID_ANY, _("Map File Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapNChoices, m_Choice_Drill_MapChoices, 1, wxRA_SPECIFY_COLS );
  56. m_Choice_Drill_Map->SetSelection( 4 );
  57. m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PDF or other formats") );
  58. bMiddleSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 );
  59. bmiddlerSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
  60. wxBoxSizer* bLeftSizer;
  61. bLeftSizer = new wxBoxSizer( wxVERTICAL );
  62. wxString m_Choice_Drill_OffsetChoices[] = { _("Absolute"), _("Drill/place file origin") };
  63. int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString );
  64. m_Choice_Drill_Offset = new wxRadioBox( this, wxID_ANY, _("Drill Origin"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetNChoices, m_Choice_Drill_OffsetChoices, 1, wxRA_SPECIFY_COLS );
  65. m_Choice_Drill_Offset->SetSelection( 0 );
  66. m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the drill/place file origin") );
  67. bLeftSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 );
  68. wxString m_Choice_UnitChoices[] = { _("Millimeters"), _("Inches") };
  69. int m_Choice_UnitNChoices = sizeof( m_Choice_UnitChoices ) / sizeof( wxString );
  70. m_Choice_Unit = new wxRadioBox( this, wxID_ANY, _("Drill Units"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
  71. m_Choice_Unit->SetSelection( 0 );
  72. bLeftSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 );
  73. wxString m_Choice_Zeros_FormatChoices[] = { _("Decimal format (recommended)"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") };
  74. int m_Choice_Zeros_FormatNChoices = sizeof( m_Choice_Zeros_FormatChoices ) / sizeof( wxString );
  75. m_Choice_Zeros_Format = new wxRadioBox( this, wxID_ANY, _("Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatNChoices, m_Choice_Zeros_FormatChoices, 1, wxRA_SPECIFY_COLS );
  76. m_Choice_Zeros_Format->SetSelection( 0 );
  77. m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") );
  78. bLeftSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 );
  79. wxFlexGridSizer* fgSizer1;
  80. fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
  81. fgSizer1->AddGrowableCol( 1 );
  82. fgSizer1->SetFlexibleDirection( wxBOTH );
  83. fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  84. m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
  85. m_staticTextTitle->Wrap( -1 );
  86. fgSizer1->Add( m_staticTextTitle, 0, wxALL, 10 );
  87. m_staticTextPrecision = new wxStaticText( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, 0 );
  88. m_staticTextPrecision->Wrap( -1 );
  89. fgSizer1->Add( m_staticTextPrecision, 0, wxALL, 10 );
  90. bLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
  91. bmiddlerSizer->Add( bLeftSizer, 0, wxEXPAND, 5 );
  92. wxBoxSizer* bRightBoxSizer;
  93. bRightBoxSizer = new wxBoxSizer( wxVERTICAL );
  94. wxStaticBoxSizer* sbSizerHoles;
  95. sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Hole Counts") ), wxVERTICAL );
  96. wxFlexGridSizer* fgSizer2;
  97. fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
  98. fgSizer2->SetFlexibleDirection( wxBOTH );
  99. fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  100. staticTextPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
  101. staticTextPlatedPads->Wrap( -1 );
  102. fgSizer2->Add( staticTextPlatedPads, 0, wxLEFT|wxRIGHT, 5 );
  103. m_PlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  104. m_PlatedPadsCountInfoMsg->Wrap( -1 );
  105. fgSizer2->Add( m_PlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
  106. staticTextNonPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Non-plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
  107. staticTextNonPlatedPads->Wrap( -1 );
  108. fgSizer2->Add( staticTextNonPlatedPads, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
  109. m_NotPlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  110. m_NotPlatedPadsCountInfoMsg->Wrap( -1 );
  111. fgSizer2->Add( m_NotPlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
  112. staticTextThroughVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Through vias:"), wxDefaultPosition, wxDefaultSize, 0 );
  113. staticTextThroughVias->Wrap( -1 );
  114. fgSizer2->Add( staticTextThroughVias, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
  115. m_ThroughViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  116. m_ThroughViasInfoMsg->Wrap( -1 );
  117. fgSizer2->Add( m_ThroughViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
  118. staticTextMicroVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Micro vias:"), wxDefaultPosition, wxDefaultSize, 0 );
  119. staticTextMicroVias->Wrap( -1 );
  120. fgSizer2->Add( staticTextMicroVias, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
  121. m_MicroViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  122. m_MicroViasInfoMsg->Wrap( -1 );
  123. fgSizer2->Add( m_MicroViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
  124. staticTextBuriedVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Buried vias:"), wxDefaultPosition, wxDefaultSize, 0 );
  125. staticTextBuriedVias->Wrap( -1 );
  126. fgSizer2->Add( staticTextBuriedVias, 0, wxALL, 5 );
  127. m_BuriedViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  128. m_BuriedViasInfoMsg->Wrap( -1 );
  129. fgSizer2->Add( m_BuriedViasInfoMsg, 0, wxALIGN_RIGHT|wxALL, 5 );
  130. sbSizerHoles->Add( fgSizer2, 1, wxEXPAND, 5 );
  131. bRightBoxSizer->Add( sbSizerHoles, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
  132. bmiddlerSizer->Add( bRightBoxSizer, 0, wxEXPAND|wxTOP, 5 );
  133. bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 2 );
  134. wxStaticBoxSizer* bMsgSizer;
  135. bMsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages") ), wxVERTICAL );
  136. m_messagesBox = new wxTextCtrl( bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
  137. m_messagesBox->SetMinSize( wxSize( -1,90 ) );
  138. bMsgSizer->Add( m_messagesBox, 1, wxALL|wxEXPAND, 5 );
  139. bMainSizer->Add( bMsgSizer, 1, wxALL|wxEXPAND, 5 );
  140. m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
  141. m_buttonReport = new wxButton( this, wxID_ANY, _("Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
  142. m_buttonsSizer->Add( m_buttonReport, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
  143. m_sdbSizer = new wxStdDialogButtonSizer();
  144. m_sdbSizerOK = new wxButton( this, wxID_OK );
  145. m_sdbSizer->AddButton( m_sdbSizerOK );
  146. m_sdbSizerApply = new wxButton( this, wxID_APPLY );
  147. m_sdbSizer->AddButton( m_sdbSizerApply );
  148. m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
  149. m_sdbSizer->AddButton( m_sdbSizerCancel );
  150. m_sdbSizer->Realize();
  151. m_buttonsSizer->Add( m_sdbSizer, 1, wxEXPAND, 5 );
  152. bMainSizer->Add( m_buttonsSizer, 0, wxALL|wxEXPAND, 5 );
  153. this->SetSizer( bMainSizer );
  154. this->Layout();
  155. this->Centre( wxBOTH );
  156. // Connect Events
  157. this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
  158. m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
  159. m_rbExcellon->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
  160. m_rbGerberX2->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
  161. m_Choice_Unit->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
  162. m_Choice_Zeros_Format->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
  163. m_buttonReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
  164. m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
  165. m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onQuitDlg ), NULL, this );
  166. m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
  167. }
  168. DIALOG_GENDRILL_BASE::~DIALOG_GENDRILL_BASE()
  169. {
  170. // Disconnect Events
  171. this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
  172. m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
  173. m_rbExcellon->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
  174. m_rbGerberX2->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
  175. m_Choice_Unit->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
  176. m_Choice_Zeros_Format->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
  177. m_buttonReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
  178. m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
  179. m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onQuitDlg ), NULL, this );
  180. m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
  181. }