KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_display_options_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_DISPLAY_OPTIONS_BASE::PANEL_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bMainSizer;
18 bMainSizer = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* bupperSizer;
21 bupperSizer = new wxBoxSizer( wxHORIZONTAL );
22
23 wxBoxSizer* bSizer11;
24 bSizer11 = new wxBoxSizer( wxVERTICAL );
25
26 m_galOptionsSizer = new wxBoxSizer( wxVERTICAL );
27
28
29 bSizer11->Add( m_galOptionsSizer, 0, wxEXPAND|wxRIGHT, 10 );
30
31
32 bSizer11->Add( 0, 8, 0, 0, 5 );
33
34 wxBoxSizer* bSizerPads;
35 bSizerPads = new wxBoxSizer( wxVERTICAL );
36
37 m_padsLabel = new wxStaticText( this, wxID_ANY, _("Pads"), wxDefaultPosition, wxDefaultSize, 0 );
38 m_padsLabel->Wrap( -1 );
39 bSizerPads->Add( m_padsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
40
41 m_staticlinePads = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
42 bSizerPads->Add( m_staticlinePads, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
43
44 m_OptUseViaColorForNormalTHPadstacks = new wxCheckBox( this, wxID_ANY, _("Use via color for normal through hole padstacks"), wxDefaultPosition, wxDefaultSize, 0 );
45 bSizerPads->Add( m_OptUseViaColorForNormalTHPadstacks, 0, wxALL, 5 );
46
47
48 bSizerPads->Add( 0, 8, 0, wxEXPAND, 5 );
49
50 m_clearanceLabel = new wxStaticText( this, wxID_ANY, _("Clearance Outlines"), wxDefaultPosition, wxDefaultSize, 0 );
51 m_clearanceLabel->Wrap( -1 );
52 bSizerPads->Add( m_clearanceLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
53
54 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
55 bSizerPads->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
56
57 wxGridBagSizer* gbSizer2;
58 gbSizer2 = new wxGridBagSizer( 2, 0 );
59 gbSizer2->SetFlexibleDirection( wxBOTH );
60 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
61
62 m_trackClearancesLabel = new wxStaticText( this, wxID_ANY, _("Tracks:"), wxDefaultPosition, wxDefaultSize, 0 );
63 m_trackClearancesLabel->Wrap( -1 );
64 gbSizer2->Add( m_trackClearancesLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
65
66 wxString m_OptDisplayTracksClearanceChoices[] = { _("Do not show clearances"), _("Show when routing"), _("Show when routing w/ via clearance at end"), _("Show when routing and editing"), _("Show always") };
67 int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString );
68 m_OptDisplayTracksClearance = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 0 );
69 m_OptDisplayTracksClearance->SetSelection( 0 );
70 gbSizer2->Add( m_OptDisplayTracksClearance, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
71
72 m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
73 gbSizer2->Add( m_OptDisplayPadClearence, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
74
75
76 bSizerPads->Add( gbSizer2, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
77
78
79 bSizerPads->Add( 0, 0, 1, wxEXPAND, 5 );
80
81
82 bSizer11->Add( bSizerPads, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
83
84
85 bupperSizer->Add( bSizer11, 1, wxEXPAND, 5 );
86
87
88 bupperSizer->Add( 15, 0, 0, 0, 5 );
89
90 m_optionsBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
91 wxPanel* fpEditorPage;
92 fpEditorPage = new wxPanel( m_optionsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
93 wxBoxSizer* fpEditorOptionsSizer;
94 fpEditorOptionsSizer = new wxBoxSizer( wxVERTICAL );
95
96 m_layerNamesLabel = new wxStaticText( fpEditorPage, wxID_ANY, _("Layer Names"), wxDefaultPosition, wxDefaultSize, 0 );
97 m_layerNamesLabel->Wrap( -1 );
98 fpEditorOptionsSizer->Add( m_layerNamesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
99
100
101 fpEditorOptionsSizer->Add( 0, 3, 0, 0, 5 );
102
103 m_layerNameitemsGrid = new WX_GRID( fpEditorPage, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
104
105 // Grid
106 m_layerNameitemsGrid->CreateGrid( 0, 2 );
107 m_layerNameitemsGrid->EnableEditing( true );
108 m_layerNameitemsGrid->EnableGridLines( true );
109 m_layerNameitemsGrid->EnableDragGridSize( false );
110 m_layerNameitemsGrid->SetMargins( 0, 0 );
111
112 // Columns
113 m_layerNameitemsGrid->SetColSize( 0, 200 );
114 m_layerNameitemsGrid->SetColSize( 1, 220 );
115 m_layerNameitemsGrid->EnableDragColMove( false );
116 m_layerNameitemsGrid->EnableDragColSize( true );
117 m_layerNameitemsGrid->SetColLabelValue( 0, _("Layer") );
118 m_layerNameitemsGrid->SetColLabelValue( 1, _("Name") );
119 m_layerNameitemsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
120 m_layerNameitemsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
121
122 // Rows
123 m_layerNameitemsGrid->EnableDragRowSize( false );
124 m_layerNameitemsGrid->SetRowLabelSize( 0 );
125 m_layerNameitemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
126
127 // Label Appearance
128
129 // Cell Defaults
130 m_layerNameitemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
131 m_layerNameitemsGrid->SetMinSize( wxSize( -1,140 ) );
132
133 fpEditorOptionsSizer->Add( m_layerNameitemsGrid, 0, wxEXPAND|wxLEFT, 10 );
134
135 wxBoxSizer* bButtonSize1;
136 bButtonSize1 = new wxBoxSizer( wxHORIZONTAL );
137
138 m_bpAddLayer = new STD_BITMAP_BUTTON( fpEditorPage, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
139 bButtonSize1->Add( m_bpAddLayer, 0, wxBOTTOM|wxLEFT|wxTOP, 5 );
140
141
142 bButtonSize1->Add( 20, 0, 0, 0, 5 );
143
144 m_bpDeleteLayer = new STD_BITMAP_BUTTON( fpEditorPage, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
145 bButtonSize1->Add( m_bpDeleteLayer, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 );
146
147
148 fpEditorOptionsSizer->Add( bButtonSize1, 0, wxLEFT, 5 );
149
150
151 fpEditorPage->SetSizer( fpEditorOptionsSizer );
152 fpEditorPage->Layout();
153 fpEditorOptionsSizer->Fit( fpEditorPage );
154 m_optionsBook->AddPage( fpEditorPage, _("Footprint Editor"), false );
155 wxPanel* pcbPage;
156 pcbPage = new wxPanel( m_optionsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
157 wxBoxSizer* pcbOptionsSizer;
158 pcbOptionsSizer = new wxBoxSizer( wxVERTICAL );
159
160 wxBoxSizer* bMargins;
161 bMargins = new wxBoxSizer( wxVERTICAL );
162
163 m_annotationsLabel = new wxStaticText( pcbPage, wxID_ANY, _("Annotations"), wxDefaultPosition, wxDefaultSize, 0 );
164 m_annotationsLabel->Wrap( -1 );
165 bMargins->Add( m_annotationsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
166
167 m_staticline1 = new wxStaticLine( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
168 bMargins->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
169
170 wxGridBagSizer* gbSizer1;
171 gbSizer1 = new wxGridBagSizer( 2, 0 );
172 gbSizer1->SetFlexibleDirection( wxBOTH );
173 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
174
175 m_netNamesLabel = new wxStaticText( pcbPage, wxID_ANY, _("Net names:"), wxDefaultPosition, wxDefaultSize, 0 );
176 m_netNamesLabel->Wrap( -1 );
177 gbSizer1->Add( m_netNamesLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
178
179 wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("Show on pads"), _("Show on tracks"), _("Show on pads & tracks") };
180 int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString );
181 m_ShowNetNamesOption = new wxChoice( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 0 );
182 m_ShowNetNamesOption->SetSelection( 0 );
183 gbSizer1->Add( m_ShowNetNamesOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
184
185 m_OptDisplayPadNumber = new wxCheckBox( pcbPage, wxID_ANY, _("Show pad numbers"), wxDefaultPosition, wxDefaultSize, 0 );
186 m_OptDisplayPadNumber->SetValue(true);
187 gbSizer1->Add( m_OptDisplayPadNumber, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
188
189
190 bMargins->Add( gbSizer1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
191
192
193 bMargins->Add( 0, 8, 0, 0, 5 );
194
195 m_staticText4 = new wxStaticText( pcbPage, wxID_ANY, _("Selection && Highlighting"), wxDefaultPosition, wxDefaultSize, 0 );
196 m_staticText4->Wrap( -1 );
197 bMargins->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
198
199 m_staticline4 = new wxStaticLine( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
200 bMargins->Add( m_staticline4, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
201
202 wxBoxSizer* bSizer9;
203 bSizer9 = new wxBoxSizer( wxVERTICAL );
204
205 m_checkForceShowFieldsWhenFPSelected = new wxCheckBox( pcbPage, wxID_ANY, _("Show all fields when parent footprint is selected"), wxDefaultPosition, wxDefaultSize, 0 );
207 bSizer9->Add( m_checkForceShowFieldsWhenFPSelected, 0, wxALL, 5 );
208
209
210 bMargins->Add( bSizer9, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
211
212
213 bMargins->Add( 0, 8, 0, 0, 5 );
214
215 m_crossProbingLabel = new wxStaticText( pcbPage, wxID_ANY, _("Cross-probing"), wxDefaultPosition, wxDefaultSize, 0 );
216 m_crossProbingLabel->Wrap( -1 );
217 bMargins->Add( m_crossProbingLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
218
219 m_staticline3 = new wxStaticLine( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
220 bMargins->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
221
222 wxBoxSizer* bSizer8;
223 bSizer8 = new wxBoxSizer( wxVERTICAL );
224
225 m_checkCrossProbeOnSelection = new wxCheckBox( pcbPage, wxID_ANY, _("Select/highlight objects corresponding to schematic selection"), wxDefaultPosition, wxDefaultSize, 0 );
226 m_checkCrossProbeOnSelection->SetValue(true);
227 m_checkCrossProbeOnSelection->SetToolTip( _("Highlight footprints corresponding to selected symbols") );
228
229 bSizer8->Add( m_checkCrossProbeOnSelection, 0, wxALL, 5 );
230
231 m_checkCrossProbeCenter = new wxCheckBox( pcbPage, wxID_ANY, _("Center view on cross-probed items"), wxDefaultPosition, wxDefaultSize, 0 );
232 m_checkCrossProbeCenter->SetValue(true);
233 m_checkCrossProbeCenter->SetToolTip( _("Ensures that cross-probed footprints are visible in the current view") );
234
235 bSizer8->Add( m_checkCrossProbeCenter, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
236
237 m_checkCrossProbeZoom = new wxCheckBox( pcbPage, wxID_ANY, _("Zoom to fit cross-probed items"), wxDefaultPosition, wxDefaultSize, 0 );
238 m_checkCrossProbeZoom->SetValue(true);
239 bSizer8->Add( m_checkCrossProbeZoom, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
240
241 m_checkCrossProbeAutoHighlight = new wxCheckBox( pcbPage, wxID_ANY, _("Highlight cross-probed nets"), wxDefaultPosition, wxDefaultSize, 0 );
242 m_checkCrossProbeAutoHighlight->SetValue(true);
243 m_checkCrossProbeAutoHighlight->SetToolTip( _("Highlight nets when they are highlighted in the schematic editor") );
244
245 bSizer8->Add( m_checkCrossProbeAutoHighlight, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
246
247 m_checkCrossProbeFlash = new wxCheckBox( pcbPage, wxID_ANY, _("Flash cross-probed selection"), wxDefaultPosition, wxDefaultSize, 0 );
248 m_checkCrossProbeFlash->SetToolTip( _("Temporarily flash the newly cross-probed selection 3 times") );
249 bSizer8->Add( m_checkCrossProbeFlash, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
250
251 m_live3Drefresh = new wxCheckBox( pcbPage, wxID_ANY, _("Refresh 3D view automatically"), wxDefaultPosition, wxDefaultSize, 0 );
252 m_live3Drefresh->SetToolTip( _("When enabled, edits to the board will cause the 3D view to refresh (may be slow with larger boards)") );
253
254 bSizer8->Add( m_live3Drefresh, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
255
256
257 bMargins->Add( bSizer8, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
258
259
260 bMargins->Add( 0, 8, 1, wxEXPAND, 5 );
261
262
263 pcbOptionsSizer->Add( bMargins, 0, wxEXPAND, 5 );
264
265
266 pcbPage->SetSizer( pcbOptionsSizer );
267 pcbPage->Layout();
268 pcbOptionsSizer->Fit( pcbPage );
269 m_optionsBook->AddPage( pcbPage, _("PCB Editor"), true );
270
271 bupperSizer->Add( m_optionsBook, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
272
273
274 bMainSizer->Add( bupperSizer, 0, wxEXPAND, 5 );
275
276
277 this->SetSizer( bMainSizer );
278 this->Layout();
279 bMainSizer->Fit( this );
280
281 // Connect Events
282 m_layerNameitemsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_DISPLAY_OPTIONS_BASE::onLayerChange ), NULL, this );
283 m_layerNameitemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnGridSize ), NULL, this );
284 m_bpAddLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnAddLayerItem ), NULL, this );
285 m_bpDeleteLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnDeleteLayerItem ), NULL, this );
286}
287
289{
290 // Disconnect Events
291 m_layerNameitemsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_DISPLAY_OPTIONS_BASE::onLayerChange ), NULL, this );
292 m_layerNameitemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnGridSize ), NULL, this );
293 m_bpAddLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnAddLayerItem ), NULL, this );
294 m_bpDeleteLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnDeleteLayerItem ), NULL, this );
295
296}
const char * name
virtual void OnAddLayerItem(wxCommandEvent &event)
virtual void OnDeleteLayerItem(wxCommandEvent &event)
PANEL_DISPLAY_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void onLayerChange(wxGridEvent &event)
virtual void OnGridSize(wxSizeEvent &event)
RESETTABLE_PANEL(wxWindow *aParent, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxSize(-1,-1), long aStyle=wxTAB_TRAVERSAL, const wxString &aName=wxEmptyString)
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)