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.

207 lines
11 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "widgets/std_bitmap_button.h"
  8. #include "widgets/wx_html_report_panel.h"
  9. #include "dialog_plot_schematic_base.h"
  10. ///////////////////////////////////////////////////////////////////////////
  11. DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
  12. {
  13. this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
  14. wxBoxSizer* bMainSizer;
  15. bMainSizer = new wxBoxSizer( wxVERTICAL );
  16. wxBoxSizer* bSizerDir;
  17. bSizerDir = new wxBoxSizer( wxHORIZONTAL );
  18. m_outputPathLabel = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
  19. m_outputPathLabel->Wrap( -1 );
  20. bSizerDir->Add( m_outputPathLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
  21. m_outputPath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
  22. m_outputPath->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the schematic main file location.") );
  23. bSizerDir->Add( m_outputPath, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 4 );
  24. m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  25. bSizerDir->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
  26. bMainSizer->Add( bSizerDir, 0, wxALL|wxEXPAND, 7 );
  27. m_optionsSizer = new wxBoxSizer( wxHORIZONTAL );
  28. wxString m_plotFormatOptChoices[] = { _("Postscript"), _("PDF"), _("SVG"), _("DXF") };
  29. int m_plotFormatOptNChoices = sizeof( m_plotFormatOptChoices ) / sizeof( wxString );
  30. m_plotFormatOpt = new wxRadioBox( this, wxID_ANY, _("Output Format"), wxDefaultPosition, wxDefaultSize, m_plotFormatOptNChoices, m_plotFormatOptChoices, 1, wxRA_SPECIFY_COLS );
  31. m_plotFormatOpt->SetSelection( 1 );
  32. m_optionsSizer->Add( m_plotFormatOpt, 0, wxALIGN_TOP|wxEXPAND|wxLEFT|wxRIGHT, 5 );
  33. wxStaticBoxSizer* sbOptions;
  34. sbOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
  35. wxGridBagSizer* gbSizer1;
  36. gbSizer1 = new wxGridBagSizer( 5, 3 );
  37. gbSizer1->SetFlexibleDirection( wxBOTH );
  38. gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  39. gbSizer1->SetEmptyCellSize( wxSize( -1,10 ) );
  40. m_staticText4 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Page size:"), wxDefaultPosition, wxDefaultSize, 0 );
  41. m_staticText4->Wrap( -1 );
  42. gbSizer1->Add( m_staticText4, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
  43. wxString m_paperSizeOptionChoices[] = { _("Schematic size"), _("A4"), _("A") };
  44. int m_paperSizeOptionNChoices = sizeof( m_paperSizeOptionChoices ) / sizeof( wxString );
  45. m_paperSizeOption = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_paperSizeOptionNChoices, m_paperSizeOptionChoices, 0 );
  46. m_paperSizeOption->SetSelection( 0 );
  47. gbSizer1->Add( m_paperSizeOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
  48. m_plotDrawingSheet = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
  49. m_plotDrawingSheet->SetValue(true);
  50. m_plotDrawingSheet->SetToolTip( _("Plot the drawing sheet border and title block") );
  51. gbSizer1->Add( m_plotDrawingSheet, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
  52. wxStaticText* bOutputModeLabel;
  53. bOutputModeLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
  54. bOutputModeLabel->Wrap( -1 );
  55. gbSizer1->Add( bOutputModeLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
  56. wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and White") };
  57. int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
  58. m_ModeColorOption = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 0 );
  59. m_ModeColorOption->SetSelection( 0 );
  60. gbSizer1->Add( m_ModeColorOption, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
  61. m_staticText9 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
  62. m_staticText9->Wrap( -1 );
  63. gbSizer1->Add( m_staticText9, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
  64. wxArrayString m_colorThemeChoices;
  65. m_colorTheme = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
  66. m_colorTheme->SetSelection( 0 );
  67. m_colorTheme->SetToolTip( _("Select the color theme to use for plotting") );
  68. gbSizer1->Add( m_colorTheme, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
  69. m_plotBackgroundColor = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot background color"), wxDefaultPosition, wxDefaultSize, 0 );
  70. m_plotBackgroundColor->SetToolTip( _("Plot the background color if the output format supports it") );
  71. gbSizer1->Add( m_plotBackgroundColor, wxGBPosition( 5, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
  72. m_lineWidthLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Minimum line width:"), wxDefaultPosition, wxDefaultSize, 0 );
  73. m_lineWidthLabel->Wrap( -1 );
  74. gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
  75. m_lineWidthCtrl = new wxTextCtrl( sbOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
  76. m_lineWidthCtrl->SetToolTip( _("Selection of the default pen thickness used to draw items, when their thickness is set to 0.") );
  77. gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
  78. m_lineWidthUnits = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
  79. m_lineWidthUnits->Wrap( -1 );
  80. gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
  81. gbSizer1->AddGrowableCol( 1 );
  82. sbOptions->Add( gbSizer1, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
  83. m_optionsSizer->Add( sbOptions, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  84. wxBoxSizer* bOptionsRight;
  85. bOptionsRight = new wxBoxSizer( wxVERTICAL );
  86. wxStaticBoxSizer* sbSizer4;
  87. sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("PDF Options") ), wxVERTICAL );
  88. m_plotPDFPropertyPopups = new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY, _("Generate property popups"), wxDefaultPosition, wxDefaultSize, 0 );
  89. m_plotPDFPropertyPopups->SetValue(true);
  90. sbSizer4->Add( m_plotPDFPropertyPopups, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
  91. m_plotPDFHierarchicalLinks = new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY, _("Generate clickable links for hierarchical elements"), wxDefaultPosition, wxDefaultSize, 0 );
  92. m_plotPDFHierarchicalLinks->SetValue(true);
  93. sbSizer4->Add( m_plotPDFHierarchicalLinks, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
  94. m_plotPDFMetadata = new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY, _("Generate metadata from AUTHOR && SUBJECT variables"), wxDefaultPosition, wxDefaultSize, 0 );
  95. m_plotPDFMetadata->SetToolTip( _("Generate PDF document properties from AUTHOR and SUBJECT text variables") );
  96. sbSizer4->Add( m_plotPDFMetadata, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
  97. bOptionsRight->Add( sbSizer4, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  98. m_otherOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Other Options") ), wxVERTICAL );
  99. m_openFileAfterPlot = new wxCheckBox( m_otherOptions->GetStaticBox(), wxID_ANY, _("Open file after plot"), wxDefaultPosition, wxDefaultSize, 0 );
  100. m_openFileAfterPlot->SetToolTip( _("Open output file with associated application after successful plot") );
  101. m_otherOptions->Add( m_openFileAfterPlot, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
  102. bOptionsRight->Add( m_otherOptions, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  103. m_optionsSizer->Add( bOptionsRight, 1, wxEXPAND, 5 );
  104. bMainSizer->Add( m_optionsSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  105. wxBoxSizer* bSizerMsgPanel;
  106. bSizerMsgPanel = new wxBoxSizer( wxVERTICAL );
  107. m_MessagesBox = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
  108. m_MessagesBox->SetMinSize( wxSize( 300,150 ) );
  109. bSizerMsgPanel->Add( m_MessagesBox, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  110. bMainSizer->Add( bSizerMsgPanel, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  111. m_sdbSizer1 = new wxStdDialogButtonSizer();
  112. m_sdbSizer1OK = new wxButton( this, wxID_OK );
  113. m_sdbSizer1->AddButton( m_sdbSizer1OK );
  114. m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
  115. m_sdbSizer1->AddButton( m_sdbSizer1Apply );
  116. m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
  117. m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
  118. m_sdbSizer1->Realize();
  119. bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
  120. this->SetSizer( bMainSizer );
  121. this->Layout();
  122. bMainSizer->Fit( this );
  123. // Connect Events
  124. this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ) );
  125. this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnUpdateUI ) );
  126. m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
  127. m_plotFormatOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotFormatSelection ), NULL, this );
  128. m_paperSizeOption->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPageSizeSelected ), NULL, this );
  129. m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotCurrent ), NULL, this );
  130. m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotAll ), NULL, this );
  131. }
  132. DIALOG_PLOT_SCHEMATIC_BASE::~DIALOG_PLOT_SCHEMATIC_BASE()
  133. {
  134. // Disconnect Events
  135. this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ) );
  136. this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnUpdateUI ) );
  137. m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
  138. m_plotFormatOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotFormatSelection ), NULL, this );
  139. m_paperSizeOption->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPageSizeSelected ), NULL, this );
  140. m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotCurrent ), NULL, this );
  141. m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotAll ), NULL, this );
  142. }