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.

144 lines
6.4 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Dec 30 2017)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "wx_html_report_panel.h"
  8. #include "dialog_gen_footprint_position_file_base.h"
  9. ///////////////////////////////////////////////////////////////////////////
  10. DIALOG_GEN_FOOTPRINT_POSITION_BASE::DIALOG_GEN_FOOTPRINT_POSITION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
  11. {
  12. this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
  13. m_MainSizer = new wxBoxSizer( wxVERTICAL );
  14. wxBoxSizer* bUpperSizer;
  15. bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
  16. wxBoxSizer* bDirSizer;
  17. bDirSizer = new wxBoxSizer( wxVERTICAL );
  18. m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
  19. m_staticTextDir->Wrap( -1 );
  20. bDirSizer->Add( m_staticTextDir, 0, wxEXPAND, 10 );
  21. wxBoxSizer* bSizerdirBrowse;
  22. bSizerdirBrowse = new wxBoxSizer( wxHORIZONTAL );
  23. m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
  24. m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") );
  25. m_outputDirectoryName->SetMinSize( wxSize( 350,-1 ) );
  26. bSizerdirBrowse->Add( m_outputDirectoryName, 1, wxBOTTOM|wxEXPAND|wxTOP, 4 );
  27. m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
  28. bSizerdirBrowse->Add( m_browseButton, 0, wxRIGHT, 1 );
  29. bDirSizer->Add( bSizerdirBrowse, 1, wxEXPAND, 5 );
  30. bUpperSizer->Add( bDirSizer, 1, wxALL, 10 );
  31. m_MainSizer->Add( bUpperSizer, 0, wxEXPAND|wxLEFT|wxRIGHT, 2 );
  32. wxGridBagSizer* gbSizer1;
  33. gbSizer1 = new wxGridBagSizer( 0, 0 );
  34. gbSizer1->SetFlexibleDirection( wxBOTH );
  35. gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  36. wxBoxSizer* bOptionsSizer;
  37. bOptionsSizer = new wxBoxSizer( wxHORIZONTAL );
  38. wxString m_rbFormatChoices[] = { _("ASCII"), _("CSV") };
  39. int m_rbFormatNChoices = sizeof( m_rbFormatChoices ) / sizeof( wxString );
  40. m_rbFormat = new wxRadioBox( this, wxID_ANY, _("Format:"), wxDefaultPosition, wxDefaultSize, m_rbFormatNChoices, m_rbFormatChoices, 1, wxRA_SPECIFY_COLS );
  41. m_rbFormat->SetSelection( 0 );
  42. m_rbFormat->SetMinSize( wxSize( 90,-1 ) );
  43. bOptionsSizer->Add( m_rbFormat, 0, wxALL, 5 );
  44. wxString m_radioBoxUnitsChoices[] = { _("Inches"), _("mm") };
  45. int m_radioBoxUnitsNChoices = sizeof( m_radioBoxUnitsChoices ) / sizeof( wxString );
  46. m_radioBoxUnits = new wxRadioBox( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, m_radioBoxUnitsNChoices, m_radioBoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
  47. m_radioBoxUnits->SetSelection( 0 );
  48. m_radioBoxUnits->SetMinSize( wxSize( 90,-1 ) );
  49. bOptionsSizer->Add( m_radioBoxUnits, 0, wxALL|wxEXPAND, 5 );
  50. wxString m_radioBoxFilesCountChoices[] = { _("One file per side"), _("Single file for board") };
  51. int m_radioBoxFilesCountNChoices = sizeof( m_radioBoxFilesCountChoices ) / sizeof( wxString );
  52. m_radioBoxFilesCount = new wxRadioBox( this, wxID_ANY, _("Files:"), wxDefaultPosition, wxDefaultSize, m_radioBoxFilesCountNChoices, m_radioBoxFilesCountChoices, 1, wxRA_SPECIFY_COLS );
  53. m_radioBoxFilesCount->SetSelection( 1 );
  54. m_radioBoxFilesCount->SetToolTip( _("Creates 2 files: one for each board side or\nCreates only one file containing all footprints to place\n") );
  55. bOptionsSizer->Add( m_radioBoxFilesCount, 1, wxALL, 5 );
  56. gbSizer1->Add( bOptionsSizer, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
  57. wxString m_radioBoxForceSmdChoices[] = { _("With INSERT attribute set"), _("Force INSERT attribute for all SMD footprints") };
  58. int m_radioBoxForceSmdNChoices = sizeof( m_radioBoxForceSmdChoices ) / sizeof( wxString );
  59. m_radioBoxForceSmd = new wxRadioBox( this, wxID_ANY, _("Footprints Selection:"), wxDefaultPosition, wxDefaultSize, m_radioBoxForceSmdNChoices, m_radioBoxForceSmdChoices, 1, wxRA_SPECIFY_COLS );
  60. m_radioBoxForceSmd->SetSelection( 0 );
  61. m_radioBoxForceSmd->SetToolTip( _("Only footprints with option INSERT are listed in placement file.\nThis option can force this option for all footprints having only SMD pads.\nWarning: this options will modify the board.") );
  62. gbSizer1->Add( m_radioBoxForceSmd, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
  63. gbSizer1->Add( 0, 0, wxGBPosition( 0, 1 ), wxGBSpan( 2, 1 ), wxEXPAND, 5 );
  64. wxBoxSizer* bButtonsSizer;
  65. bButtonsSizer = new wxBoxSizer( wxVERTICAL );
  66. bButtonsSizer->SetMinSize( wxSize( 140,-1 ) );
  67. m_generateButton = new wxButton( this, wxID_ANY, _("Generate File"), wxDefaultPosition, wxDefaultSize, 0 );
  68. bButtonsSizer->Add( m_generateButton, 0, wxALL|wxEXPAND, 5 );
  69. m_closeButton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
  70. bButtonsSizer->Add( m_closeButton, 0, wxALL|wxEXPAND|wxTOP, 5 );
  71. gbSizer1->Add( bButtonsSizer, wxGBPosition( 0, 2 ), wxGBSpan( 2, 1 ), wxEXPAND|wxLEFT|wxTOP, 25 );
  72. gbSizer1->AddGrowableCol( 1 );
  73. m_MainSizer->Add( gbSizer1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
  74. wxBoxSizer* bSizer7;
  75. bSizer7 = new wxBoxSizer( wxVERTICAL );
  76. m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
  77. m_messagesPanel->SetMinSize( wxSize( 300,150 ) );
  78. bSizer7->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 );
  79. m_MainSizer->Add( bSizer7, 1, wxEXPAND, 5 );
  80. this->SetSizer( m_MainSizer );
  81. this->Layout();
  82. m_MainSizer->Fit( this );
  83. this->Centre( wxBOTH );
  84. // Connect Events
  85. m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
  86. m_generateButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
  87. }
  88. DIALOG_GEN_FOOTPRINT_POSITION_BASE::~DIALOG_GEN_FOOTPRINT_POSITION_BASE()
  89. {
  90. // Disconnect Events
  91. m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
  92. m_generateButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
  93. }