KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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 m_galOptionsSizer = new wxBoxSizer( wxVERTICAL );
24
25
26 bupperSizer->Add( m_galOptionsSizer, 0, wxEXPAND|wxRIGHT, 10 );
27
28 m_optionsBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
29 wxPanel* fpEditorPage;
30 fpEditorPage = new wxPanel( m_optionsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
31 wxBoxSizer* fpEditorOptionsSizer;
32 fpEditorOptionsSizer = new wxBoxSizer( wxVERTICAL );
33
34 m_layerNamesLabel = new wxStaticText( fpEditorPage, wxID_ANY, _("Layer Names"), wxDefaultPosition, wxDefaultSize, 0 );
35 m_layerNamesLabel->Wrap( -1 );
36 fpEditorOptionsSizer->Add( m_layerNamesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
37
38
39 fpEditorOptionsSizer->Add( 0, 3, 0, 0, 5 );
40
41 m_layerNameitemsGrid = new WX_GRID( fpEditorPage, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
42
43 // Grid
44 m_layerNameitemsGrid->CreateGrid( 0, 2 );
45 m_layerNameitemsGrid->EnableEditing( true );
46 m_layerNameitemsGrid->EnableGridLines( true );
47 m_layerNameitemsGrid->EnableDragGridSize( false );
48 m_layerNameitemsGrid->SetMargins( 0, 0 );
49
50 // Columns
51 m_layerNameitemsGrid->SetColSize( 0, 200 );
52 m_layerNameitemsGrid->SetColSize( 1, 220 );
53 m_layerNameitemsGrid->EnableDragColMove( false );
54 m_layerNameitemsGrid->EnableDragColSize( true );
55 m_layerNameitemsGrid->SetColLabelValue( 0, _("Layer") );
56 m_layerNameitemsGrid->SetColLabelValue( 1, _("Name") );
57 m_layerNameitemsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
58 m_layerNameitemsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
59
60 // Rows
61 m_layerNameitemsGrid->EnableDragRowSize( false );
62 m_layerNameitemsGrid->SetRowLabelSize( 0 );
63 m_layerNameitemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
64
65 // Label Appearance
66
67 // Cell Defaults
68 m_layerNameitemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
69 m_layerNameitemsGrid->SetMinSize( wxSize( -1,140 ) );
70
71 fpEditorOptionsSizer->Add( m_layerNameitemsGrid, 0, wxEXPAND|wxLEFT, 10 );
72
73 wxBoxSizer* bButtonSize1;
74 bButtonSize1 = new wxBoxSizer( wxHORIZONTAL );
75
76 m_bpAddLayer = new STD_BITMAP_BUTTON( fpEditorPage, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
77 bButtonSize1->Add( m_bpAddLayer, 0, wxBOTTOM|wxLEFT|wxTOP, 5 );
78
79
80 bButtonSize1->Add( 20, 0, 0, 0, 5 );
81
82 m_bpDeleteLayer = new STD_BITMAP_BUTTON( fpEditorPage, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
83 bButtonSize1->Add( m_bpDeleteLayer, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 );
84
85
86 fpEditorOptionsSizer->Add( bButtonSize1, 0, wxLEFT, 5 );
87
88
89 fpEditorPage->SetSizer( fpEditorOptionsSizer );
90 fpEditorPage->Layout();
91 fpEditorOptionsSizer->Fit( fpEditorPage );
92 m_optionsBook->AddPage( fpEditorPage, _("a page"), false );
93 wxPanel* pcbPage;
94 pcbPage = new wxPanel( m_optionsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
95 wxBoxSizer* pcbOptionsSizer;
96 pcbOptionsSizer = new wxBoxSizer( wxVERTICAL );
97
98 wxBoxSizer* bMargins;
99 bMargins = new wxBoxSizer( wxVERTICAL );
100
101 m_annotationsLabel = new wxStaticText( pcbPage, wxID_ANY, _("Annotations"), wxDefaultPosition, wxDefaultSize, 0 );
102 m_annotationsLabel->Wrap( -1 );
103 bMargins->Add( m_annotationsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
104
105 m_staticline1 = new wxStaticLine( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
106 bMargins->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 5 );
107
108 wxGridBagSizer* gbSizer1;
109 gbSizer1 = new wxGridBagSizer( 2, 0 );
110 gbSizer1->SetFlexibleDirection( wxBOTH );
111 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
112
113 m_netNamesLabel = new wxStaticText( pcbPage, wxID_ANY, _("Net names:"), wxDefaultPosition, wxDefaultSize, 0 );
114 m_netNamesLabel->Wrap( -1 );
115 gbSizer1->Add( m_netNamesLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
116
117 wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("Show on pads"), _("Show on tracks"), _("Show on pads & tracks") };
118 int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString );
119 m_ShowNetNamesOption = new wxChoice( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 0 );
120 m_ShowNetNamesOption->SetSelection( 0 );
121 gbSizer1->Add( m_ShowNetNamesOption, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
122
123 m_OptDisplayPadNumber = new wxCheckBox( pcbPage, wxID_ANY, _("Show pad numbers"), wxDefaultPosition, wxDefaultSize, 0 );
124 m_OptDisplayPadNumber->SetValue(true);
125 gbSizer1->Add( m_OptDisplayPadNumber, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
126
127
128 bMargins->Add( gbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
129
130
131 bMargins->Add( 0, 10, 0, wxEXPAND, 5 );
132
133 m_clearanceLabel = new wxStaticText( pcbPage, wxID_ANY, _("Clearance Outlines"), wxDefaultPosition, wxDefaultSize, 0 );
134 m_clearanceLabel->Wrap( -1 );
135 bMargins->Add( m_clearanceLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
136
137 m_staticline2 = new wxStaticLine( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
138 bMargins->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM, 5 );
139
140 wxGridBagSizer* gbSizer2;
141 gbSizer2 = new wxGridBagSizer( 2, 0 );
142 gbSizer2->SetFlexibleDirection( wxBOTH );
143 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
144
145 m_trackClearancesLabel = new wxStaticText( pcbPage, wxID_ANY, _("Tracks:"), wxDefaultPosition, wxDefaultSize, 0 );
146 m_trackClearancesLabel->Wrap( -1 );
147 gbSizer2->Add( m_trackClearancesLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
148
149 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") };
150 int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString );
151 m_OptDisplayTracksClearance = new wxChoice( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 0 );
152 m_OptDisplayTracksClearance->SetSelection( 0 );
153 gbSizer2->Add( m_OptDisplayTracksClearance, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
154
155 m_OptDisplayPadClearence = new wxCheckBox( pcbPage, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
156 gbSizer2->Add( m_OptDisplayPadClearence, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
157
158
159 bMargins->Add( gbSizer2, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
160
161
162 bMargins->Add( 0, 10, 0, wxEXPAND, 5 );
163
164 m_staticText4 = new wxStaticText( pcbPage, wxID_ANY, _("Selection && Highlighting"), wxDefaultPosition, wxDefaultSize, 0 );
165 m_staticText4->Wrap( -1 );
166 bMargins->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
167
168 m_staticline4 = new wxStaticLine( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
169 bMargins->Add( m_staticline4, 0, wxEXPAND|wxBOTTOM, 5 );
170
171 wxBoxSizer* bSizer9;
172 bSizer9 = new wxBoxSizer( wxVERTICAL );
173
174 m_checkForceShowFieldsWhenFPSelected = new wxCheckBox( pcbPage, wxID_ANY, _("Show all fields when parent footprint is selected"), wxDefaultPosition, wxDefaultSize, 0 );
176 bSizer9->Add( m_checkForceShowFieldsWhenFPSelected, 0, wxALL, 5 );
177
178
179 bMargins->Add( bSizer9, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
180
181
182 bMargins->Add( 0, 10, 0, wxEXPAND, 5 );
183
184 m_crossProbingLabel = new wxStaticText( pcbPage, wxID_ANY, _("Cross-probing"), wxDefaultPosition, wxDefaultSize, 0 );
185 m_crossProbingLabel->Wrap( -1 );
186 bMargins->Add( m_crossProbingLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
187
188 m_staticline3 = new wxStaticLine( pcbPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
189 bMargins->Add( m_staticline3, 0, wxEXPAND|wxBOTTOM, 5 );
190
191 wxBoxSizer* bSizer8;
192 bSizer8 = new wxBoxSizer( wxVERTICAL );
193
194 m_checkCrossProbeOnSelection = new wxCheckBox( pcbPage, wxID_ANY, _("Select/highlight objects corresponding to schematic selection"), wxDefaultPosition, wxDefaultSize, 0 );
195 m_checkCrossProbeOnSelection->SetValue(true);
196 m_checkCrossProbeOnSelection->SetToolTip( _("Highlight footprints corresponding to selected symbols") );
197
198 bSizer8->Add( m_checkCrossProbeOnSelection, 0, wxALL, 5 );
199
200 m_checkCrossProbeCenter = new wxCheckBox( pcbPage, wxID_ANY, _("Center view on cross-probed items"), wxDefaultPosition, wxDefaultSize, 0 );
201 m_checkCrossProbeCenter->SetValue(true);
202 m_checkCrossProbeCenter->SetToolTip( _("Ensures that cross-probed footprints are visible in the current view") );
203
204 bSizer8->Add( m_checkCrossProbeCenter, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
205
206 m_checkCrossProbeZoom = new wxCheckBox( pcbPage, wxID_ANY, _("Zoom to fit cross-probed items"), wxDefaultPosition, wxDefaultSize, 0 );
207 m_checkCrossProbeZoom->SetValue(true);
208 bSizer8->Add( m_checkCrossProbeZoom, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
209
210 m_checkCrossProbeAutoHighlight = new wxCheckBox( pcbPage, wxID_ANY, _("Highlight cross-probed nets"), wxDefaultPosition, wxDefaultSize, 0 );
211 m_checkCrossProbeAutoHighlight->SetValue(true);
212 m_checkCrossProbeAutoHighlight->SetToolTip( _("Highlight nets when they are highlighted in the schematic editor") );
213
214 bSizer8->Add( m_checkCrossProbeAutoHighlight, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
215
216 m_live3Drefresh = new wxCheckBox( pcbPage, wxID_ANY, _("Refresh 3D view automatically"), wxDefaultPosition, wxDefaultSize, 0 );
217 m_live3Drefresh->SetToolTip( _("When enabled, edits to the board will cause the 3D view to refresh (may be slow with larger boards)") );
218
219 bSizer8->Add( m_live3Drefresh, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
220
221
222 bMargins->Add( bSizer8, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
223
224
225 pcbOptionsSizer->Add( bMargins, 1, wxEXPAND, 5 );
226
227
228 pcbPage->SetSizer( pcbOptionsSizer );
229 pcbPage->Layout();
230 pcbOptionsSizer->Fit( pcbPage );
231 m_optionsBook->AddPage( pcbPage, _("a page"), false );
232
233 bupperSizer->Add( m_optionsBook, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
234
235
236 bMainSizer->Add( bupperSizer, 0, wxEXPAND, 5 );
237
238
239 this->SetSizer( bMainSizer );
240 this->Layout();
241 bMainSizer->Fit( this );
242
243 // Connect Events
244 m_layerNameitemsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_DISPLAY_OPTIONS_BASE::onLayerChange ), NULL, this );
245 m_layerNameitemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnGridSize ), NULL, this );
246 m_bpAddLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnAddLayerItem ), NULL, this );
247 m_bpDeleteLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnDeleteLayerItem ), NULL, this );
248}
249
251{
252 // Disconnect Events
253 m_layerNameitemsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_DISPLAY_OPTIONS_BASE::onLayerChange ), NULL, this );
254 m_layerNameitemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnGridSize ), NULL, this );
255 m_bpAddLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnAddLayerItem ), NULL, this );
256 m_bpDeleteLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DISPLAY_OPTIONS_BASE::OnDeleteLayerItem ), NULL, this );
257
258}
const char * name
Definition: DXF_plotter.cpp:59
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)
A wxPanel that is designed to be reset in a standard manner.
A bitmap button widget that behaves like a standard dialog button except with an icon.
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:254
#define _(s)