KiCad PCB EDA Suite
dialog_export_svg_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
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,-1 ), 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, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 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|0 );
35  bSizer4->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
36 
37 
38  bMainSizer->Add( bSizer4, 0, wxEXPAND|wxALL, 10 );
39 
40  wxBoxSizer* bUpperSizer;
41  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
42 
43  wxStaticBoxSizer* sbLayersSizer;
44  sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxHORIZONTAL );
45 
46  wxBoxSizer* bSizerCopper;
47  bSizerCopper = new wxBoxSizer( wxVERTICAL );
48 
49  m_staticTextCopperLayers = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Copper layers:"), wxDefaultPosition, wxDefaultSize, 0 );
50  m_staticTextCopperLayers->Wrap( -1 );
51  bSizerCopper->Add( m_staticTextCopperLayers, 0, wxRIGHT|wxLEFT, 5 );
52 
53  wxArrayString m_CopperLayersListChoices;
54  m_CopperLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersListChoices, 0 );
55  bSizerCopper->Add( m_CopperLayersList, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
56 
57 
58  sbLayersSizer->Add( bSizerCopper, 1, wxEXPAND, 5 );
59 
60  wxBoxSizer* bSizerTech;
61  bSizerTech = new wxBoxSizer( wxVERTICAL );
62 
63  m_staticTextTechLayers = new wxStaticText( sbLayersSizer->GetStaticBox(), wxID_ANY, _("Technical layers:"), wxDefaultPosition, wxDefaultSize, 0 );
64  m_staticTextTechLayers->Wrap( -1 );
65  bSizerTech->Add( m_staticTextTechLayers, 0, wxRIGHT|wxLEFT, 5 );
66 
67  wxArrayString m_TechnicalLayersListChoices;
68  m_TechnicalLayersList = new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TechnicalLayersListChoices, 0 );
69  bSizerTech->Add( m_TechnicalLayersList, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
70 
71 
72  sbLayersSizer->Add( bSizerTech, 1, wxEXPAND, 5 );
73 
74 
75  bUpperSizer->Add( sbLayersSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
76 
77  wxStaticBoxSizer* sbOptionsSizer;
78  sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
79 
80  wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
81  int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
82  m_ModeColorOption = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
83  m_ModeColorOption->SetSelection( 1 );
84  m_ModeColorOption->SetToolTip( _("Export as black elements on a white background") );
85 
86  sbOptionsSizer->Add( m_ModeColorOption, 0, wxEXPAND|wxALL, 5 );
87 
88  wxString m_rbSvgPageSizeOptChoices[] = { _("Page with frame and title block"), _("Current page size"), _("Board area only") };
89  int m_rbSvgPageSizeOptNChoices = sizeof( m_rbSvgPageSizeOptChoices ) / sizeof( wxString );
90  m_rbSvgPageSizeOpt = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("SVG Page Size"), wxDefaultPosition, wxDefaultSize, m_rbSvgPageSizeOptNChoices, m_rbSvgPageSizeOptChoices, 1, wxRA_SPECIFY_COLS );
91  m_rbSvgPageSizeOpt->SetSelection( 0 );
92  sbOptionsSizer->Add( m_rbSvgPageSizeOpt, 0, wxEXPAND|wxALL, 5 );
93 
94  m_printMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print mirrored"), wxDefaultPosition, wxDefaultSize, 0 );
95  m_printMirrorOpt->SetToolTip( _("Print the layer(s) horizontally mirrored") );
96 
97  sbOptionsSizer->Add( m_printMirrorOpt, 0, wxALL, 5 );
98 
99  m_checkboxPagePerLayer = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print one page per layer"), wxDefaultPosition, wxDefaultSize, 0 );
100  sbOptionsSizer->Add( m_checkboxPagePerLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
101 
102 
103  sbOptionsSizer->Add( 0, 3, 0, wxEXPAND, 5 );
104 
105  m_checkboxEdgesOnAllPages = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print board edges on all pages"), wxDefaultPosition, wxDefaultSize, 0 );
106  sbOptionsSizer->Add( m_checkboxEdgesOnAllPages, 0, wxRIGHT|wxLEFT, 28 );
107 
108 
109  sbOptionsSizer->Add( 0, 0, 0, wxEXPAND|wxBOTTOM, 5 );
110 
111 
112  bUpperSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
113 
114 
115  bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
116 
117  wxBoxSizer* bSizer5;
118  bSizer5 = new wxBoxSizer( wxVERTICAL );
119 
120  m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
121  m_messagesPanel->SetMinSize( wxSize( 300,150 ) );
122 
123  bSizer5->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 );
124 
125 
126  bMainSizer->Add( bSizer5, 1, wxEXPAND, 5 );
127 
128  m_sdbSizer1 = new wxStdDialogButtonSizer();
129  m_sdbSizer1OK = new wxButton( this, wxID_OK );
130  m_sdbSizer1->AddButton( m_sdbSizer1OK );
131  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
132  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
133  m_sdbSizer1->Realize();
134 
135  bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
136 
137 
138  this->SetSizer( bMainSizer );
139  this->Layout();
140  bMainSizer->Fit( this );
141 
142  // Connect Events
143  m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
144  m_checkboxPagePerLayer->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::onPagePerLayerClicked ), NULL, this );
145  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnButtonPlot ), NULL, this );
146 }
147 
149 {
150  // Disconnect Events
151  m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
152  m_checkboxPagePerLayer->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::onPagePerLayerClicked ), NULL, this );
153  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_SVG_BASE::OnButtonPlot ), NULL, this );
154 
155 }
wxStaticText * m_staticTextCopperLayers
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
wxCheckListBox * m_CopperLayersList
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
virtual void OnButtonPlot(wxCommandEvent &event)
wxCheckListBox * m_TechnicalLayersList
virtual void onPagePerLayerClicked(wxCommandEvent &event)
#define _(s)
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
A widget for browsing a rich text error/status report.