KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_sheet_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10#include "widgets/wx_infobar.h"
11
13
15
16DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
17{
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19
20 wxBoxSizer* mainSizer;
21 mainSizer = new wxBoxSizer( wxVERTICAL );
22
23 m_infoBar = new WX_INFOBAR( this );
24 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
25 m_infoBar->SetEffectDuration( 500 );
26 m_infoBar->Hide();
27
28 mainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
29
30 m_longForm = new wxBoxSizer( wxVERTICAL );
31
32 wxStaticBoxSizer* sbFields;
33 sbFields = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxVERTICAL );
34
35 m_grid = new WX_GRID( sbFields->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
36
37 // Grid
38 m_grid->CreateGrid( 4, 13 );
39 m_grid->EnableEditing( true );
40 m_grid->EnableGridLines( true );
41 m_grid->EnableDragGridSize( false );
42 m_grid->SetMargins( 0, 0 );
43
44 // Columns
45 m_grid->SetColSize( 0, 72 );
46 m_grid->SetColSize( 1, 72 );
47 m_grid->SetColSize( 2, 48 );
48 m_grid->SetColSize( 3, 72 );
49 m_grid->SetColSize( 4, 72 );
50 m_grid->SetColSize( 5, 48 );
51 m_grid->SetColSize( 6, 48 );
52 m_grid->SetColSize( 7, 84 );
53 m_grid->SetColSize( 8, 84 );
54 m_grid->SetColSize( 9, 84 );
55 m_grid->SetColSize( 10, 84 );
56 m_grid->SetColSize( 11, 60 );
57 m_grid->SetColSize( 12, 48 );
58 m_grid->EnableDragColMove( false );
59 m_grid->EnableDragColSize( true );
60 m_grid->SetColLabelValue( 0, _("Name") );
61 m_grid->SetColLabelValue( 1, _("Value") );
62 m_grid->SetColLabelValue( 2, _("Show") );
63 m_grid->SetColLabelValue( 3, _("H Align") );
64 m_grid->SetColLabelValue( 4, _("V Align") );
65 m_grid->SetColLabelValue( 5, _("Italic") );
66 m_grid->SetColLabelValue( 6, _("Bold") );
67 m_grid->SetColLabelValue( 7, _("Text Size") );
68 m_grid->SetColLabelValue( 8, _("Orientation") );
69 m_grid->SetColLabelValue( 9, _("X Position") );
70 m_grid->SetColLabelValue( 10, _("Y Position") );
71 m_grid->SetColLabelValue( 11, _("Font") );
72 m_grid->SetColLabelValue( 12, _("Color") );
73 m_grid->SetColLabelSize( 22 );
74 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
75
76 // Rows
77 m_grid->EnableDragRowSize( true );
78 m_grid->SetRowLabelSize( 0 );
79 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
80
81 // Label Appearance
82
83 // Cell Defaults
84 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
85 m_grid->SetMinSize( wxSize( -1,120 ) );
86
87 sbFields->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
88
89 wxBoxSizer* bButtonSize;
90 bButtonSize = new wxBoxSizer( wxHORIZONTAL );
91
92 m_bpAdd = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
93 m_bpAdd->SetToolTip( _("Add field") );
94
95 bButtonSize->Add( m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
96
97 m_bpMoveUp = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
98 m_bpMoveUp->SetToolTip( _("Move up") );
99
100 bButtonSize->Add( m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
101
102 m_bpMoveDown = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
103 m_bpMoveDown->SetToolTip( _("Move down") );
104
105 bButtonSize->Add( m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
106
107
108 bButtonSize->Add( 20, 0, 0, wxEXPAND, 10 );
109
110 m_bpDelete = new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
111 m_bpDelete->SetToolTip( _("Delete field") );
112
113 bButtonSize->Add( m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
114
115
116 bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
117
118
119 sbFields->Add( bButtonSize, 0, wxALL|wxEXPAND, 5 );
120
121
122 m_longForm->Add( sbFields, 1, wxALL|wxEXPAND, 5 );
123
124 wxBoxSizer* bSizer5;
125 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
126
127 wxStaticBoxSizer* sbAttributes;
128 sbAttributes = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Attributes") ), wxVERTICAL );
129
130 wxBoxSizer* bSizer6;
131 bSizer6 = new wxBoxSizer( wxHORIZONTAL );
132
133 m_pageNumberStaticText = new wxStaticText( sbAttributes->GetStaticBox(), wxID_ANY, _("Page number:"), wxDefaultPosition, wxDefaultSize, 0 );
134 m_pageNumberStaticText->Wrap( -1 );
135 bSizer6->Add( m_pageNumberStaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
136
137 m_pageNumberTextCtrl = new wxTextCtrl( sbAttributes->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
138 bSizer6->Add( m_pageNumberTextCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
139
140
141 bSizer6->Add( 0, 0, 3, wxEXPAND, 5 );
142
143
144 sbAttributes->Add( bSizer6, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 10 );
145
146 wxBoxSizer* bSizerFullSuffix;
147 bSizerFullSuffix = new wxBoxSizer( wxHORIZONTAL );
148
149 m_fullSuffixLabel = new wxStaticText( sbAttributes->GetStaticBox(), wxID_ANY, _("Full reference suffix:"), wxDefaultPosition, wxDefaultSize, 0 );
150 m_fullSuffixLabel->Wrap( -1 );
151 bSizerFullSuffix->Add( m_fullSuffixLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
152
153 m_fullSuffixCtrl = new wxTextCtrl( sbAttributes->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
154 bSizerFullSuffix->Add( m_fullSuffixCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
155
156
157 bSizerFullSuffix->Add( 0, 0, 3, wxEXPAND, 5 );
158
159
160 sbAttributes->Add( bSizerFullSuffix, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 10 );
161
162 m_cbExcludeFromSim = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
163 sbAttributes->Add( m_cbExcludeFromSim, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
164
165
166 sbAttributes->Add( 0, 10, 0, wxEXPAND, 5 );
167
168 m_cbExcludeFromBoard = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
169 m_cbExcludeFromBoard->SetToolTip( _("This is useful for adding symbols that only get exported to the bill of materials but\nnot required to layout the board such as mechanical fasteners and enclosures") );
170
171 sbAttributes->Add( m_cbExcludeFromBoard, 0, wxALL, 5 );
172
173 m_cbDNP = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Do not populate"), wxDefaultPosition, wxDefaultSize, 0 );
174 sbAttributes->Add( m_cbDNP, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
175
176 m_cbExcludeFromBom = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
177 m_cbExcludeFromBom->SetToolTip( _("This is useful for adding symbols for board footprints such as fiducials\nand logos that you do not want to appear in the bill of materials export") );
178
179 sbAttributes->Add( m_cbExcludeFromBom, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
180
181
182 bSizer5->Add( sbAttributes, 0, wxEXPAND|wxRIGHT, 5 );
183
184 wxStaticBoxSizer* sbSizer2;
185 sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Style") ), wxVERTICAL );
186
187 wxBoxSizer* bStyleColumns;
188 bStyleColumns = new wxBoxSizer( wxHORIZONTAL );
189
190 wxBoxSizer* bBorderSizer;
191 bBorderSizer = new wxBoxSizer( wxVERTICAL );
192
193 m_borderLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Border"), wxDefaultPosition, wxDefaultSize, 0 );
194 m_borderLabel->Wrap( -1 );
195 bBorderSizer->Add( m_borderLabel, 0, wxBOTTOM|wxLEFT, 5 );
196
197 wxBoxSizer* bSizer10;
198 bSizer10 = new wxBoxSizer( wxHORIZONTAL );
199
200 m_borderWidthLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
201 m_borderWidthLabel->Wrap( -1 );
202 bSizer10->Add( m_borderWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
203
204 m_borderWidthCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
205 bSizer10->Add( m_borderWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
206
207 m_borderWidthUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
208 m_borderWidthUnits->Wrap( -1 );
209 bSizer10->Add( m_borderWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
210
211
212 bSizer10->Add( 20, 0, 0, wxEXPAND, 5 );
213
214 m_borderColorLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
215 m_borderColorLabel->Wrap( -1 );
216 bSizer10->Add( m_borderColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
217
218 m_borderSwatch = new COLOR_SWATCH( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
219 m_borderSwatch->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
220 m_borderSwatch->SetMinSize( wxSize( 48,24 ) );
221
222 bSizer10->Add( m_borderSwatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
223
224
225 bBorderSizer->Add( bSizer10, 1, wxEXPAND, 5 );
226
227
228 bStyleColumns->Add( bBorderSizer, 2, wxEXPAND, 5 );
229
230 wxBoxSizer* bFillSizer;
231 bFillSizer = new wxBoxSizer( wxVERTICAL );
232
233 m_fillLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Fill"), wxDefaultPosition, wxDefaultSize, 0 );
234 m_fillLabel->Wrap( -1 );
235 bFillSizer->Add( m_fillLabel, 0, wxBOTTOM, 5 );
236
237 wxBoxSizer* bSizer11;
238 bSizer11 = new wxBoxSizer( wxHORIZONTAL );
239
240 m_backgroundColorLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
241 m_backgroundColorLabel->Wrap( -1 );
242 bSizer11->Add( m_backgroundColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
243
244 m_backgroundSwatch = new COLOR_SWATCH( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
245 m_backgroundSwatch->SetMinSize( wxSize( 48,24 ) );
246
247 bSizer11->Add( m_backgroundSwatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
248
249
250 bFillSizer->Add( bSizer11, 1, wxEXPAND, 5 );
251
252
253 bStyleColumns->Add( bFillSizer, 1, wxEXPAND, 5 );
254
255
256 sbSizer2->Add( bStyleColumns, 0, wxEXPAND, 5 );
257
258
259 bSizer5->Add( sbSizer2, 1, wxEXPAND|wxLEFT, 10 );
260
261
262 m_longForm->Add( bSizer5, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
263
264
265 mainSizer->Add( m_longForm, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
266
267 m_sizerBottom = new wxBoxSizer( wxHORIZONTAL );
268
269 m_hierarchicalPathLabel = new wxStaticText( this, wxID_ANY, _("Hierarchical path:"), wxDefaultPosition, wxDefaultSize, 0 );
270 m_hierarchicalPathLabel->Wrap( -1 );
271 m_sizerBottom->Add( m_hierarchicalPathLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 10 );
272
273 m_hierarchicalPath = new wxStaticText( this, wxID_ANY, _("path"), wxDefaultPosition, wxDefaultSize, 0 );
274 m_hierarchicalPath->Wrap( -1 );
275 m_sizerBottom->Add( m_hierarchicalPath, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
276
277 m_stdDialogButtonSizer = new wxStdDialogButtonSizer();
278 m_stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
280 m_stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
282 m_stdDialogButtonSizer->Realize();
283
284 m_sizerBottom->Add( m_stdDialogButtonSizer, 0, wxEXPAND|wxALL, 5 );
285
286
287 mainSizer->Add( m_sizerBottom, 0, wxEXPAND|wxLEFT, 5 );
288
289
290 this->SetSizer( mainSizer );
291 this->Layout();
292 mainSizer->Fit( this );
293
294 // Connect Events
295 this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnInitDlg ) );
296 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnUpdateUI ) );
297 m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnAddField ), NULL, this );
298 m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveUp ), NULL, this );
299 m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveDown ), NULL, this );
300 m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnDeleteField ), NULL, this );
301 m_cbExcludeFromSim->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
302 m_cbExcludeFromBoard->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
303 m_cbExcludeFromBom->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
304}
305
307{
308 // Disconnect Events
309 this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnInitDlg ) );
310 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnUpdateUI ) );
311 m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnAddField ), NULL, this );
312 m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveUp ), NULL, this );
313 m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveDown ), NULL, this );
314 m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnDeleteField ), NULL, this );
315 m_cbExcludeFromSim->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
316 m_cbExcludeFromBoard->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
317 m_cbExcludeFromBom->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
318
319}
A simple color swatch of the kind used to set layer colors.
virtual void OnDeleteField(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnAddField(wxCommandEvent &event)
virtual void OnMoveUp(wxCommandEvent &event)
virtual void OnMoveDown(wxCommandEvent &event)
wxStdDialogButtonSizer * m_stdDialogButtonSizer
virtual void OnCheckBox(wxCommandEvent &event)
virtual void OnInitDlg(wxInitDialogEvent &event)
DIALOG_SHEET_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Sheet Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
A bitmap button widget that behaves like a standard dialog button except with an icon.
A modified version of the wxInfoBar class that allows us to:
Definition wx_infobar.h:77
#define _(s)