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.0.0-0-g0efcecf)
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, 120 );
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, 140 );
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") );
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 m_cbExcludeFromSim = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
147 sbAttributes->Add( m_cbExcludeFromSim, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
148
149
150 sbAttributes->Add( 0, 10, 0, wxEXPAND, 5 );
151
152 m_cbExcludeFromBom = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
153 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") );
154
155 sbAttributes->Add( m_cbExcludeFromBom, 0, wxALL, 5 );
156
157 m_cbExcludeFromBoard = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
158 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") );
159
160 sbAttributes->Add( m_cbExcludeFromBoard, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
161
162 m_cbDNP = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Do not populate"), wxDefaultPosition, wxDefaultSize, 0 );
163 sbAttributes->Add( m_cbDNP, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
164
165
166 bSizer5->Add( sbAttributes, 0, wxEXPAND|wxRIGHT, 5 );
167
168 wxStaticBoxSizer* sbSizer2;
169 sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Style") ), wxVERTICAL );
170
171 wxBoxSizer* bStyleColumns;
172 bStyleColumns = new wxBoxSizer( wxHORIZONTAL );
173
174 wxBoxSizer* bBorderSizer;
175 bBorderSizer = new wxBoxSizer( wxVERTICAL );
176
177 m_borderLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Border"), wxDefaultPosition, wxDefaultSize, 0 );
178 m_borderLabel->Wrap( -1 );
179 bBorderSizer->Add( m_borderLabel, 0, wxBOTTOM|wxLEFT, 5 );
180
181 wxBoxSizer* bSizer10;
182 bSizer10 = new wxBoxSizer( wxHORIZONTAL );
183
184 m_borderWidthLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
185 m_borderWidthLabel->Wrap( -1 );
186 bSizer10->Add( m_borderWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
187
188 m_borderWidthCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
189 bSizer10->Add( m_borderWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
190
191 m_borderWidthUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
192 m_borderWidthUnits->Wrap( -1 );
193 bSizer10->Add( m_borderWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
194
195
196 bSizer10->Add( 20, 0, 0, wxEXPAND, 5 );
197
198 m_borderColorLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
199 m_borderColorLabel->Wrap( -1 );
200 bSizer10->Add( m_borderColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
201
202 m_borderSwatch = new COLOR_SWATCH( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
203 m_borderSwatch->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
204 m_borderSwatch->SetMinSize( wxSize( 48,24 ) );
205
206 bSizer10->Add( m_borderSwatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
207
208
209 bBorderSizer->Add( bSizer10, 1, wxEXPAND, 5 );
210
211
212 bStyleColumns->Add( bBorderSizer, 2, wxEXPAND, 5 );
213
214 wxBoxSizer* bFillSizer;
215 bFillSizer = new wxBoxSizer( wxVERTICAL );
216
217 m_fillLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Fill"), wxDefaultPosition, wxDefaultSize, 0 );
218 m_fillLabel->Wrap( -1 );
219 bFillSizer->Add( m_fillLabel, 0, wxBOTTOM, 5 );
220
221 wxBoxSizer* bSizer11;
222 bSizer11 = new wxBoxSizer( wxHORIZONTAL );
223
224 m_backgroundColorLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
225 m_backgroundColorLabel->Wrap( -1 );
226 bSizer11->Add( m_backgroundColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
227
228 m_backgroundSwatch = new COLOR_SWATCH( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
229 m_backgroundSwatch->SetMinSize( wxSize( 48,24 ) );
230
231 bSizer11->Add( m_backgroundSwatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
232
233
234 bFillSizer->Add( bSizer11, 1, wxEXPAND, 5 );
235
236
237 bStyleColumns->Add( bFillSizer, 1, wxEXPAND, 5 );
238
239
240 sbSizer2->Add( bStyleColumns, 0, wxEXPAND, 5 );
241
242
243 bSizer5->Add( sbSizer2, 1, wxEXPAND|wxLEFT, 10 );
244
245
246 m_longForm->Add( bSizer5, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
247
248
249 mainSizer->Add( m_longForm, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
250
251 m_sizerBottom = new wxBoxSizer( wxHORIZONTAL );
252
253 m_hierarchicalPathLabel = new wxStaticText( this, wxID_ANY, _("Hierarchical path:"), wxDefaultPosition, wxDefaultSize, 0 );
254 m_hierarchicalPathLabel->Wrap( -1 );
255 m_sizerBottom->Add( m_hierarchicalPathLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 10 );
256
257 m_hierarchicalPath = new wxStaticText( this, wxID_ANY, _("path"), wxDefaultPosition, wxDefaultSize, 0 );
258 m_hierarchicalPath->Wrap( -1 );
259 m_sizerBottom->Add( m_hierarchicalPath, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
260
261 m_stdDialogButtonSizer = new wxStdDialogButtonSizer();
262 m_stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
264 m_stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
266 m_stdDialogButtonSizer->Realize();
267
268 m_sizerBottom->Add( m_stdDialogButtonSizer, 0, wxEXPAND|wxALL, 5 );
269
270
271 mainSizer->Add( m_sizerBottom, 0, wxEXPAND|wxLEFT, 5 );
272
273
274 this->SetSizer( mainSizer );
275 this->Layout();
276 mainSizer->Fit( this );
277
278 // Connect Events
279 this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnInitDlg ) );
280 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnUpdateUI ) );
281 m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnSizeGrid ), NULL, this );
282 m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnAddField ), NULL, this );
283 m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveUp ), NULL, this );
284 m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveDown ), NULL, this );
285 m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnDeleteField ), NULL, this );
286 m_cbExcludeFromSim->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
287 m_cbExcludeFromBom->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
288 m_cbExcludeFromBoard->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
289}
290
292{
293 // Disconnect Events
294 this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnInitDlg ) );
295 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnUpdateUI ) );
296 m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnSizeGrid ), NULL, this );
297 m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnAddField ), NULL, this );
298 m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveUp ), NULL, this );
299 m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveDown ), NULL, this );
300 m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnDeleteField ), NULL, this );
301 m_cbExcludeFromSim->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
302 m_cbExcludeFromBom->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
303 m_cbExcludeFromBoard->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnCheckBox ), NULL, this );
304
305}
A simple color swatch of the kind used to set layer colors.
Definition: color_swatch.h:57
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)
virtual void OnSizeGrid(wxSizeEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
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:249
A modified version of the wxInfoBar class that allows us to:
Definition: wx_infobar.h:76
#define _(s)