KiCad PCB EDA Suite
dialog_export_svg_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "wx_html_report_panel.h"
9 
10 #include "dialog_export_svg_base.h"
11 
13 
14 DIALOG_EXPORT_SVG_BASE::DIALOG_EXPORT_SVG_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15 {
16  this->SetSizeHints( wxSize( -1,350 ), wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxBoxSizer* bSizer4;
22  bSizer4 = new wxBoxSizer( wxHORIZONTAL );
23 
24  m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
25  m_staticTextDir->Wrap( -1 );
26  bSizer4->Add( m_staticTextDir, 0, wxALL, 5 );
27 
28  m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
29  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") );
30  m_outputDirectoryName->SetMinSize( wxSize( 450,-1 ) );
31 
32  bSizer4->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
33 
34  m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
35  m_browseButton->SetMinSize( wxSize( 30,30 ) );
36 
37  bSizer4->Add( m_browseButton, 0, 0, 5 );
38 
39 
40  bMainSizer->Add( bSizer4, 0, wxEXPAND|wxALL, 10 );
41 
42  wxBoxSizer* bUpperSizer;
43  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
44 
45  wxStaticBoxSizer* sbLayersSizer;
46  sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL );
47 
48  wxBoxSizer* bSizerCopper;
49  bSizerCopper = new wxBoxSizer( wxVERTICAL );
50 
51  m_staticTextCopperLayers = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Copper layers:"), wxDefaultPosition, wxDefaultSize, 0 );
52  m_staticTextCopperLayers->Wrap( -1 );
53  bSizerCopper->Add( m_staticTextCopperLayers, 0, wxRIGHT|wxLEFT, 5 );
54 
55  wxArrayString m_CopperLayersListChoices;
56  m_CopperLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersListChoices, 0 );
57  bSizerCopper->Add( m_CopperLayersList, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
58 
59 
60  sbLayersSizer->Add( bSizerCopper, 1, wxEXPAND, 5 );
61 
62  wxBoxSizer* bSizerTech;
63  bSizerTech = new wxBoxSizer( wxVERTICAL );
64 
65  m_staticTextTechLayers = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Technical layers:"), wxDefaultPosition, wxDefaultSize, 0 );
66  m_staticTextTechLayers->Wrap( -1 );
67  bSizerTech->Add( m_staticTextTechLayers, 0, wxRIGHT|wxLEFT, 5 );
68 
69  wxArrayString m_TechnicalLayersListChoices;
70  m_TechnicalLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TechnicalLayersListChoices, 0 );
71  bSizerTech->Add( m_TechnicalLayersList, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
72 
73 
74  sbLayersSizer->Add( bSizerTech, 1, wxEXPAND, 5 );
75 
76 
77  bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
78 
79  wxStaticBoxSizer* sbOptionsSizer;
80  sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
81 
82  wxBoxSizer* bSizer8;
83  bSizer8 = new wxBoxSizer( wxHORIZONTAL );
84 
85  m_penWidthLabel = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size:"), wxDefaultPosition, wxDefaultSize, 0 );
86  m_penWidthLabel->Wrap( -1 );
87  m_penWidthLabel->SetToolTip( _("Selection of the pen size used to draw items which have no pen size specified.") );
88 
89  bSizer8->Add( m_penWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
90 
91  m_penWidthCtrl = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
92  bSizer8->Add( m_penWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
93 
94  m_penWidthUnits = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
95  m_penWidthUnits->Wrap( -1 );
96  bSizer8->Add( m_penWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
97 
98 
99  sbOptionsSizer->Add( bSizer8, 1, wxEXPAND, 5 );
100 
101  wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
102  int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
103  m_ModeColorOption = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
104  m_ModeColorOption->SetSelection( 1 );
105  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") );
106 
107  sbOptionsSizer->Add( m_ModeColorOption, 0, wxEXPAND|wxALL, 5 );
108 
109  wxString m_rbSvgPageSizeOptChoices[] = { _("Page with frame and title block"), _("Current page size"), _("Board area only") };
110  int m_rbSvgPageSizeOptNChoices = sizeof( m_rbSvgPageSizeOptChoices ) / sizeof( wxString );
111  m_rbSvgPageSizeOpt = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("SVG Page Size"), wxDefaultPosition, wxDefaultSize, m_rbSvgPageSizeOptNChoices, m_rbSvgPageSizeOptChoices, 1, wxRA_SPECIFY_COLS );
112  m_rbSvgPageSizeOpt->SetSelection( 0 );
113  sbOptionsSizer->Add( m_rbSvgPageSizeOpt, 0, wxEXPAND|wxALL, 5 );
114 
115  m_PrintBoardEdgesCtrl = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print board edges"), wxDefaultPosition, wxDefaultSize, 0 );
116  m_PrintBoardEdgesCtrl->SetValue(true);
117  m_PrintBoardEdgesCtrl->SetToolTip( _("Print (or not) the edges layer on others layers") );
118 
119  sbOptionsSizer->Add( m_PrintBoardEdgesCtrl, 0, wxALL, 5 );
120 
121  m_printMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print mirrored"), wxDefaultPosition, wxDefaultSize, 0 );
122  m_printMirrorOpt->SetToolTip( _("Print the layer(s) horizontally mirrored") );
123 
124  sbOptionsSizer->Add( m_printMirrorOpt, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
125 
126  wxString m_rbFileOptChoices[] = { _("One file per layer"), _("All layers in a single file") };
127  int m_rbFileOptNChoices = sizeof( m_rbFileOptChoices ) / sizeof( wxString );
128  m_rbFileOpt = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Pagination"), wxDefaultPosition, wxDefaultSize, m_rbFileOptNChoices, m_rbFileOptChoices, 1, wxRA_SPECIFY_COLS );
129  m_rbFileOpt->SetSelection( 0 );
130  sbOptionsSizer->Add( m_rbFileOpt, 0, wxALL|wxEXPAND, 5 );
131 
132 
133  bUpperSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
134 
135 
136  bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
137 
138  wxBoxSizer* bSizer5;
139  bSizer5 = new wxBoxSizer( wxVERTICAL );
140 
141  m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
142  m_messagesPanel->SetMinSize( wxSize( 300,150 ) );
143 
144  bSizer5->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 );
145 
146 
147  bMainSizer->Add( bSizer5, 1, wxEXPAND, 5 );
148 
149  m_sdbSizer1 = new wxStdDialogButtonSizer();
150  m_sdbSizer1OK = new wxButton( this, wxID_OK );
151  m_sdbSizer1->AddButton( m_sdbSizer1OK );
152  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
153  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
154  m_sdbSizer1->Realize();
155 
156  bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
157 
158 
159  this->SetSizer( bMainSizer );
160  this->Layout();
161  bMainSizer->Fit( this );
162 
163  // Connect Events
164  m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
165  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnButtonPlot ), NULL, this );
166 }
167 
169 {
170  // Disconnect Events
171  m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
172  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnButtonPlot ), NULL, this );
173 
174 }
wxStaticText * m_staticTextCopperLayers
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
wxCheckListBox * m_CopperLayersList
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
virtual void OnButtonPlot(wxCommandEvent &event)
wxCheckListBox * m_TechnicalLayersList
DIALOG_EXPORT_SVG_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export SVG File"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStdDialogButtonSizer * m_sdbSizer1
WX_HTML_REPORT_PANEL * m_messagesPanel
wxStaticText * m_staticTextTechLayers
Class WX_HTML_REPORT_PANEL.