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