KiCad PCB EDA Suite
dialog_SVG_print_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version May 6 2016)
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_SVG_print_base.h"
11 
13 
14 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 )
15 {
16  this->SetSizeHints( wxSize( -1,350 ), wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
22  m_staticTextDir->Wrap( -1 );
23  bMainSizer->Add( m_staticTextDir, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
24 
25  wxBoxSizer* bSizer4;
26  bSizer4 = new wxBoxSizer( wxHORIZONTAL );
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, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
33 
34  m_browseButton = new wxButton( this, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
35  bSizer4->Add( m_browseButton, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
36 
37 
38  bMainSizer->Add( bSizer4, 0, wxEXPAND|wxBOTTOM, 5 );
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, wxTOP|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, wxTOP|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, 5 );
76 
77  wxStaticBoxSizer* sbOptionsSizer;
78  sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Print SVG options:") ), wxVERTICAL );
79 
80  m_TextPenWidth = new wxStaticText( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Default pen size"), wxDefaultPosition, wxDefaultSize, 0 );
81  m_TextPenWidth->Wrap( -1 );
82  m_TextPenWidth->SetToolTip( _("Selection of the pen size used to draw items which have no pen size specified.") );
83 
84  sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
85 
86  m_DialogDefaultPenSize = new wxTextCtrl( sbOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
87  sbOptionsSizer->Add( m_DialogDefaultPenSize, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
88 
89  wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
90  int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
91  m_ModeColorOption = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
92  m_ModeColorOption->SetSelection( 1 );
93  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") );
94 
95  sbOptionsSizer->Add( m_ModeColorOption, 0, wxEXPAND|wxALL, 5 );
96 
97  wxString m_rbSvgPageSizeOptChoices[] = { _("Full page with frame ref"), _("Current page size"), _("Board area only") };
98  int m_rbSvgPageSizeOptNChoices = sizeof( m_rbSvgPageSizeOptChoices ) / sizeof( wxString );
99  m_rbSvgPageSizeOpt = new wxRadioBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("SVG Page Size"), wxDefaultPosition, wxDefaultSize, m_rbSvgPageSizeOptNChoices, m_rbSvgPageSizeOptChoices, 1, wxRA_SPECIFY_COLS );
100  m_rbSvgPageSizeOpt->SetSelection( 0 );
101  sbOptionsSizer->Add( m_rbSvgPageSizeOpt, 0, wxEXPAND|wxALL, 5 );
102 
103  m_PrintBoardEdgesCtrl = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print board edges"), wxDefaultPosition, wxDefaultSize, 0 );
104  m_PrintBoardEdgesCtrl->SetValue(true);
105  m_PrintBoardEdgesCtrl->SetToolTip( _("Print (or not) the edges layer on others layers") );
106 
107  sbOptionsSizer->Add( m_PrintBoardEdgesCtrl, 0, wxALL, 5 );
108 
109  m_printMirrorOpt = new wxCheckBox( sbOptionsSizer->GetStaticBox(), wxID_ANY, _("Print mirrored"), wxDefaultPosition, wxDefaultSize, 0 );
110  m_printMirrorOpt->SetToolTip( _("Print the layer(s) horizontally mirrored") );
111 
112  sbOptionsSizer->Add( m_printMirrorOpt, 0, wxALL, 5 );
113 
114 
115  bUpperSizer->Add( sbOptionsSizer, 0, wxEXPAND, 5 );
116 
117  wxBoxSizer* bButtonsSizer;
118  bButtonsSizer = new wxBoxSizer( wxVERTICAL );
119 
120  wxString m_rbFileOptChoices[] = { _("One file per layer"), _("All in one file") };
121  int m_rbFileOptNChoices = sizeof( m_rbFileOptChoices ) / sizeof( wxString );
122  m_rbFileOpt = new wxRadioBox( this, wxID_ANY, _("File option:"), wxDefaultPosition, wxDefaultSize, m_rbFileOptNChoices, m_rbFileOptChoices, 1, wxRA_SPECIFY_COLS );
123  m_rbFileOpt->SetSelection( 0 );
124  bButtonsSizer->Add( m_rbFileOpt, 0, wxALL, 5 );
125 
126  m_buttonCreateFile = new wxButton( this, wxID_PRINT_BOARD, _("Plot"), wxDefaultPosition, wxDefaultSize, 0 );
127  bButtonsSizer->Add( m_buttonCreateFile, 0, wxALL|wxEXPAND, 5 );
128 
129  m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
130  bButtonsSizer->Add( m_buttonQuit, 0, wxALL|wxEXPAND, 5 );
131 
132 
133  bUpperSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
134 
135 
136  bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 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 
150  this->SetSizer( bMainSizer );
151  this->Layout();
152 
153  // Connect Events
154  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
155  m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this );
156  m_buttonCreateFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this );
157  m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this );
158 }
159 
161 {
162  // Disconnect Events
163  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SVG_PRINT_base::OnCloseWindow ) );
164  m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnOutputDirectoryBrowseClicked ), NULL, this );
165  m_buttonCreateFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonPlot ), NULL, this );
166  m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SVG_PRINT_base::OnButtonCloseClick ), NULL, this );
167 
168 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
wxCheckListBox * m_CopperLayersList
wxCheckListBox * m_TechnicalLayersList
WX_HTML_REPORT_PANEL * m_messagesPanel
virtual void OnButtonCloseClick(wxCommandEvent &event)
wxStaticText * m_staticTextTechLayers
virtual void OnButtonPlot(wxCommandEvent &event)
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
virtual void OnCloseWindow(wxCloseEvent &event)
DIALOG_SVG_PRINT_base(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export SVG file"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(637, 454), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStaticText * m_staticTextCopperLayers
Class WX_HTML_REPORT_PANEL.