KiCad PCB EDA Suite
dialog_global_edit_text_and_graphics_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 1 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
13 
14 DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_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( wxDefaultSize, wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxStaticBoxSizer* sbScope;
22  sbScope = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scope") ), wxVERTICAL );
23 
24  wxFlexGridSizer* fgSizer3;
25  fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
26  fgSizer3->AddGrowableCol( 0 );
27  fgSizer3->AddGrowableCol( 1 );
28  fgSizer3->SetFlexibleDirection( wxBOTH );
29  fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
30 
31  m_references = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Footprint references"), wxDefaultPosition, wxDefaultSize, 0 );
32  fgSizer3->Add( m_references, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
33 
34  m_boardText = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("PCB text items"), wxDefaultPosition, wxDefaultSize, 0 );
35  fgSizer3->Add( m_boardText, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
36 
37  m_values = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Footprint values"), wxDefaultPosition, wxDefaultSize, 0 );
38  fgSizer3->Add( m_values, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
39 
40  m_boardGraphics = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("PCB graphic items"), wxDefaultPosition, wxDefaultSize, 0 );
41  fgSizer3->Add( m_boardGraphics, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
42 
43  m_otherFields = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Other footprint fields"), wxDefaultPosition, wxDefaultSize, 0 );
44  fgSizer3->Add( m_otherFields, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
45 
46 
47  fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
48 
49  m_footprintGraphics = new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY, _("Footprint graphic items"), wxDefaultPosition, wxDefaultSize, 0 );
50  fgSizer3->Add( m_footprintGraphics, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
51 
52 
53  sbScope->Add( fgSizer3, 0, wxEXPAND, 5 );
54 
55 
56  bMainSizer->Add( sbScope, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
57 
58 
59  bMainSizer->Add( 0, 0, 0, wxTOP, 5 );
60 
61  wxStaticBoxSizer* sbFilters;
62  sbFilters = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Filters") ), wxVERTICAL );
63 
64  wxFlexGridSizer* fgSizer2;
65  fgSizer2 = new wxFlexGridSizer( 0, 3, 1, 0 );
66  fgSizer2->AddGrowableCol( 1 );
67  fgSizer2->SetFlexibleDirection( wxBOTH );
68  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
69 
70  m_layerFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by layer:"), wxDefaultPosition, wxDefaultSize, 0 );
71  fgSizer2->Add( m_layerFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
72 
73  m_layerFilter = new PCB_LAYER_BOX_SELECTOR( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
74  fgSizer2->Add( m_layerFilter, 0, wxEXPAND|wxLEFT, 5 );
75 
76 
77  fgSizer2->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 60 );
78 
79  m_referenceFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by parent footprint reference:"), wxDefaultPosition, wxDefaultSize, 0 );
80  fgSizer2->Add( m_referenceFilterOpt, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
81 
82  m_referenceFilter = new wxTextCtrl( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
83  fgSizer2->Add( m_referenceFilter, 0, wxEXPAND|wxLEFT, 5 );
84 
85 
86  fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
87 
88  m_footprintFilterOpt = new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY, _("Filter items by parent footprint identifier:"), wxDefaultPosition, wxDefaultSize, 0 );
89  fgSizer2->Add( m_footprintFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
90 
91  m_footprintFilter = new wxTextCtrl( sbFilters->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
92  fgSizer2->Add( m_footprintFilter, 0, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
93 
94 
95  fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
96 
97 
98  sbFilters->Add( fgSizer2, 0, wxEXPAND|wxRIGHT, 5 );
99 
100 
101  bMainSizer->Add( sbFilters, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
102 
103 
104  bMainSizer->Add( 0, 0, 0, wxTOP, 5 );
105 
106  wxStaticBoxSizer* sbAction;
107  sbAction = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Action") ), wxVERTICAL );
108 
109  m_setToSpecifiedValues = new wxRadioButton( sbAction->GetStaticBox(), ID_SPECIFIED_NET_TO_NETCLASS_VALUES, _("Set to specified values:"), wxDefaultPosition, wxDefaultSize, 0 );
110  m_setToSpecifiedValues->SetValue( true );
111  sbAction->Add( m_setToSpecifiedValues, 0, wxRIGHT, 5 );
112 
113  m_specifiedValues = new wxPanel( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
114  wxBoxSizer* bSizer2;
115  bSizer2 = new wxBoxSizer( wxVERTICAL );
116 
117  wxFlexGridSizer* fgSizer1;
118  fgSizer1 = new wxFlexGridSizer( 0, 5, 2, 0 );
119  fgSizer1->SetFlexibleDirection( wxBOTH );
120  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
121 
122  m_LayerLabel = new wxStaticText( m_specifiedValues, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
123  m_LayerLabel->Wrap( -1 );
124  fgSizer1->Add( m_LayerLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
125 
126  m_LayerCtrl = new PCB_LAYER_BOX_SELECTOR( m_specifiedValues, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
127  fgSizer1->Add( m_LayerCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
128 
129 
130  fgSizer1->Add( 0, 0, 0, wxEXPAND, 5 );
131 
132 
133  fgSizer1->Add( 55, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
134 
135  m_Visible = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Visible"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
136  m_Visible->SetValue(true);
137  fgSizer1->Add( m_Visible, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
138 
139  m_lineWidthLabel = new wxStaticText( m_specifiedValues, wxID_ANY, _("Line thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
140  m_lineWidthLabel->Wrap( -1 );
141  fgSizer1->Add( m_lineWidthLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
142 
143  m_LineWidthCtrl = new wxTextCtrl( m_specifiedValues, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
144  fgSizer1->Add( m_LineWidthCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
145 
146  m_lineWidthUnits = new wxStaticText( m_specifiedValues, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
147  m_lineWidthUnits->Wrap( -1 );
148  fgSizer1->Add( m_lineWidthUnits, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
149 
150 
151  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
152 
153 
154  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
155 
156 
157  fgSizer1->Add( 0, 0, 1, wxEXPAND|wxTOP, 5 );
158 
159 
160  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
161 
162 
163  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
164 
165 
166  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
167 
168 
169  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
170 
171  m_SizeXlabel = new wxStaticText( m_specifiedValues, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 );
172  m_SizeXlabel->Wrap( -1 );
173  fgSizer1->Add( m_SizeXlabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
174 
175  m_SizeXCtrl = new wxTextCtrl( m_specifiedValues, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
176  m_SizeXCtrl->SetMinSize( wxSize( 120,-1 ) );
177 
178  fgSizer1->Add( m_SizeXCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
179 
180  m_SizeXunit = new wxStaticText( m_specifiedValues, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
181  m_SizeXunit->Wrap( -1 );
182  fgSizer1->Add( m_SizeXunit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
183 
184 
185  fgSizer1->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 20 );
186 
187  m_Italic = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Italic"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
188  fgSizer1->Add( m_Italic, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
189 
190  m_SizeYlabel = new wxStaticText( m_specifiedValues, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
191  m_SizeYlabel->Wrap( -1 );
192  fgSizer1->Add( m_SizeYlabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
193 
194  m_SizeYCtrl = new wxTextCtrl( m_specifiedValues, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
195  fgSizer1->Add( m_SizeYCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
196 
197  m_SizeYunit = new wxStaticText( m_specifiedValues, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
198  m_SizeYunit->Wrap( -1 );
199  fgSizer1->Add( m_SizeYunit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
200 
201 
202  fgSizer1->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 20 );
203 
204  m_keepUpright = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Keep upright"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
205  m_keepUpright->SetValue(true);
206  fgSizer1->Add( m_keepUpright, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
207 
208  m_ThicknessLabel = new wxStaticText( m_specifiedValues, wxID_ANY, _("Text thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
209  m_ThicknessLabel->Wrap( -1 );
210  fgSizer1->Add( m_ThicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
211 
212  m_ThicknessCtrl = new wxTextCtrl( m_specifiedValues, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
213  fgSizer1->Add( m_ThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
214 
215  m_ThicknessUnit = new wxStaticText( m_specifiedValues, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
216  m_ThicknessUnit->Wrap( -1 );
217  fgSizer1->Add( m_ThicknessUnit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
218 
219 
220  bSizer2->Add( fgSizer1, 1, wxEXPAND|wxTOP, 2 );
221 
222 
223  m_specifiedValues->SetSizer( bSizer2 );
224  m_specifiedValues->Layout();
225  bSizer2->Fit( m_specifiedValues );
226  sbAction->Add( m_specifiedValues, 1, wxEXPAND|wxBOTTOM|wxLEFT, 12 );
227 
228  m_setToLayerDefaults = new wxRadioButton( sbAction->GetStaticBox(), ID_ALL_TRACKS_VIAS, _("Set to layer default values:"), wxDefaultPosition, wxDefaultSize, 0 );
229  sbAction->Add( m_setToLayerDefaults, 0, wxBOTTOM, 5 );
230 
231  m_grid = new wxGrid( sbAction->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE );
232 
233  // Grid
234  m_grid->CreateGrid( 6, 7 );
235  m_grid->EnableEditing( false );
236  m_grid->EnableGridLines( true );
237  m_grid->EnableDragGridSize( false );
238  m_grid->SetMargins( 0, 0 );
239 
240  // Columns
241  m_grid->SetColSize( 0, 120 );
242  m_grid->SetColSize( 1, 110 );
243  m_grid->SetColSize( 2, 110 );
244  m_grid->SetColSize( 3, 110 );
245  m_grid->SetColSize( 4, 110 );
246  m_grid->SetColSize( 5, 60 );
247  m_grid->SetColSize( 6, 80 );
248  m_grid->EnableDragColMove( false );
249  m_grid->EnableDragColSize( false );
250  m_grid->SetColLabelSize( 0 );
251  m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
252 
253  // Rows
254  m_grid->EnableDragRowSize( false );
255  m_grid->SetRowLabelSize( 0 );
256  m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
257 
258  // Label Appearance
259 
260  // Cell Defaults
261  m_grid->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
262  m_grid->SetDefaultCellFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
263  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
264  sbAction->Add( m_grid, 0, wxEXPAND|wxLEFT, 15 );
265 
266 
267  sbAction->Add( 0, 0, 0, wxEXPAND|wxBOTTOM, 5 );
268 
269 
270  bMainSizer->Add( sbAction, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
271 
272  m_sdbSizerButtons = new wxStdDialogButtonSizer();
273  m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
275  m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
277  m_sdbSizerButtons->Realize();
278 
279  bMainSizer->Add( m_sdbSizerButtons, 0, wxALL|wxEXPAND, 5 );
280 
281 
282  this->SetSizer( bMainSizer );
283  this->Layout();
284  bMainSizer->Fit( this );
285 
286  // Connect Events
287  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnUpdateUI ) );
288  m_layerFilter->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnLayerFilterSelect ), NULL, this );
289  m_referenceFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnReferenceFilterText ), NULL, this );
290  m_footprintFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnFootprintFilterText ), NULL, this );
291  m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnSizeNetclassGrid ), NULL, this );
292 }
293 
295 {
296  // Disconnect Events
297  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnUpdateUI ) );
298  m_layerFilter->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnLayerFilterSelect ), NULL, this );
299  m_referenceFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnReferenceFilterText ), NULL, this );
300  m_footprintFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnFootprintFilterText ), NULL, this );
301  m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnSizeNetclassGrid ), NULL, this );
302 
303 }
DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Edit Text and Graphic Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Class to display a pcb layer list in a wxBitmapComboBox.
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:83
#define ID_SPECIFIED_NET_TO_NETCLASS_VALUES