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.

168 lines
8.2 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version May 6 2016)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO "NOT" EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "wx_html_report_panel.h"
  8. #include "dialog_SVG_print_base.h"
  9. ///////////////////////////////////////////////////////////////////////////
  10. DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_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,350 ), wxDefaultSize );
  13. wxBoxSizer* bMainSizer;
  14. bMainSizer = new wxBoxSizer( wxVERTICAL );
  15. m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
  16. m_staticTextDir->Wrap( -1 );
  17. bMainSizer->Add( m_staticTextDir, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
  18. wxBoxSizer* bSizer4;
  19. bSizer4 = new wxBoxSizer( wxHORIZONTAL );
  20. m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
  21. m_outputDirectoryName->SetToolTip( _("Enter a filename if you do not want to use default file names\nCan be used only when printing the current sheet") );
  22. m_outputDirectoryName->SetMinSize( wxSize( 450,-1 ) );
  23. bSizer4->Add( m_outputDirectoryName, 1, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
  24. m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
  25. bSizer4->Add( m_browseButton, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
  26. bMainSizer->Add( bSizer4, 0, wxEXPAND|wxBOTTOM, 5 );
  27. wxBoxSizer* bUpperSizer;
  28. bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
  29. wxStaticBoxSizer* sbLayersSizer;
  30. sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers:") ), wxHORIZONTAL );
  31. wxBoxSizer* bSizerCopper;
  32. bSizerCopper = new wxBoxSizer( wxVERTICAL );
  33. m_staticTextCopperLayers = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Copper Layers:"), wxDefaultPosition, wxDefaultSize, 0 );
  34. m_staticTextCopperLayers->Wrap( -1 );
  35. bSizerCopper->Add( m_staticTextCopperLayers, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
  36. wxArrayString m_CopperLayersListChoices;
  37. m_CopperLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersListChoices, 0 );
  38. bSizerCopper->Add( m_CopperLayersList, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
  39. sbLayersSizer->Add( bSizerCopper, 1, wxEXPAND, 5 );
  40. wxBoxSizer* bSizerTech;
  41. bSizerTech = new wxBoxSizer( wxVERTICAL );
  42. m_staticTextTechLayers = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Technical Layers:"), wxDefaultPosition, wxDefaultSize, 0 );
  43. m_staticTextTechLayers->Wrap( -1 );
  44. bSizerTech->Add( m_staticTextTechLayers, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
  45. wxArrayString m_TechnicalLayersListChoices;
  46. m_TechnicalLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TechnicalLayersListChoices, 0 );
  47. bSizerTech->Add( m_TechnicalLayersList, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
  48. sbLayersSizer->Add( bSizerTech, 1, wxEXPAND, 5 );
  49. bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND, 5 );
  50. wxStaticBoxSizer* sbOptionsSizer;
  51. sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG options:") ), wxVERTICAL );
  52. m_TextPenWidth = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 );
  53. m_TextPenWidth->Wrap( -1 );
  54. m_TextPenWidth->SetToolTip( _("Selection of the pen size used to draw items which have no pen size specified.") );
  55. sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
  56. m_DialogDefaultPenSize = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
  57. sbOptionsSizer->Add( m_DialogDefaultPenSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
  58. wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
  59. int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
  60. m_ModeColorOption = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
  61. m_ModeColorOption->SetSelection( 1 );
  62. m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
  63. sbOptionsSizer->Add( m_ModeColorOption, 0, wxEXPAND|wxALL, 5 );
  64. wxString m_rbSvgPageSizeOptChoices[] = { _("Full page with frame ref"), _("Current page size"), _("Board area only") };
  65. int m_rbSvgPageSizeOptNChoices = sizeof( m_rbSvgPageSizeOptChoices ) / sizeof( wxString );
  66. m_rbSvgPageSizeOpt = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("SVG Page Size"), wxDefaultPosition, wxDefaultSize, m_rbSvgPageSizeOptNChoices, m_rbSvgPageSizeOptChoices, 1, wxRA_SPECIFY_COLS );
  67. m_rbSvgPageSizeOpt->SetSelection( 0 );
  68. sbOptionsSizer->Add( m_rbSvgPageSizeOpt, 0, wxEXPAND|wxALL, 5 );
  69. m_PrintBoardEdgesCtrl = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print board edges"), wxDefaultPosition, wxDefaultSize, 0 );
  70. m_PrintBoardEdgesCtrl->SetValue(true);
  71. m_PrintBoardEdgesCtrl->SetToolTip( _("Print (or not) the edges layer on others layers") );
  72. sbOptionsSizer->Add( m_PrintBoardEdgesCtrl, 0, wxALL, 5 );
  73. m_printMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print mirrored"), wxDefaultPosition, wxDefaultSize, 0 );
  74. m_printMirrorOpt->SetToolTip( _("Print the layer(s) horizontally mirrored") );
  75. sbOptionsSizer->Add( m_printMirrorOpt, 0, wxALL, 5 );
  76. bUpperSizer->Add( sbOptionsSizer, 0, wxEXPAND, 5 );
  77. wxBoxSizer* bButtonsSizer;
  78. bButtonsSizer = new wxBoxSizer( wxVERTICAL );
  79. wxString m_rbFileOptChoices[] = { _("One file per layer"), _("All in one file") };
  80. int m_rbFileOptNChoices = sizeof( m_rbFileOptChoices ) / sizeof( wxString );
  81. m_rbFileOpt = new wxRadioBox( this, wxID_ANY, _("File option:"), wxDefaultPosition, wxDefaultSize, m_rbFileOptNChoices, m_rbFileOptChoices, 1, wxRA_SPECIFY_COLS );
  82. m_rbFileOpt->SetSelection( 0 );
  83. bButtonsSizer->Add( m_rbFileOpt, 0, wxALL, 5 );
  84. m_buttonCreateFile = new wxButton( this, wxID_PRINT_BOARD, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 );
  85. bButtonsSizer->Add( m_buttonCreateFile, 0, wxALL|wxEXPAND, 5 );
  86. m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
  87. bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxEXPAND, 5 );
  88. bUpperSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
  89. bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
  90. wxBoxSizer* bSizer5;
  91. bSizer5 = new wxBoxSizer( wxVERTICAL );
  92. m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
  93. m_messagesPanel->SetMinSize( wxSize( 300,150 ) );
  94. bSizer5->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 );
  95. bMainSizer->Add( bSizer5, 1, wxEXPAND, 5 );
  96. this->SetSizer( bMainSizer );
  97. this->Layout();
  98. // Connect Events
  99. this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
  100. m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this );
  101. m_buttonCreateFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this );
  102. m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this );
  103. }
  104. DIALOG_SVG_PRINT_base::~DIALOG_SVG_PRINT_base()
  105. {
  106. // Disconnect Events
  107. this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
  108. m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this );
  109. m_buttonCreateFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this );
  110. m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this );
  111. }