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