14DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_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 )
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18 wxBoxSizer* bMainSizer;
19 bMainSizer =
new wxBoxSizer( wxVERTICAL );
21 m_notebookShapeDefs =
new wxNotebook(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
22 m_rectangleByCorners =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
24 bSizer18 =
new wxBoxSizer( wxVERTICAL );
26 m_gbsRectangleByCorners =
new wxGridBagSizer( 0, 0 );
27 m_gbsRectangleByCorners->SetFlexibleDirection( wxBOTH );
28 m_gbsRectangleByCorners->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31 bSizer18->Add( m_gbsRectangleByCorners, 1, wxALL|wxEXPAND, 5 );
34 m_rectangleByCorners->SetSizer( bSizer18 );
35 m_rectangleByCorners->Layout();
36 bSizer18->Fit( m_rectangleByCorners );
37 m_notebookShapeDefs->AddPage( m_rectangleByCorners,
_(
"By Corners"),
false );
38 m_rectangleByCornerSize =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
40 bSizer19 =
new wxBoxSizer( wxVERTICAL );
42 m_gbsRectangleByCornerSize =
new wxGridBagSizer( 0, 0 );
43 m_gbsRectangleByCornerSize->SetFlexibleDirection( wxBOTH );
44 m_gbsRectangleByCornerSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
47 bSizer19->Add( m_gbsRectangleByCornerSize, 1, wxALL|wxEXPAND, 5 );
50 m_rectangleByCornerSize->SetSizer( bSizer19 );
51 m_rectangleByCornerSize->Layout();
52 bSizer19->Fit( m_rectangleByCornerSize );
53 m_notebookShapeDefs->AddPage( m_rectangleByCornerSize,
_(
"By Corner and Size"),
false );
54 m_rectangleByCenterSize =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
56 bSizer20 =
new wxBoxSizer( wxVERTICAL );
58 m_gbsRectangleByCenterSize =
new wxGridBagSizer( 0, 0 );
59 m_gbsRectangleByCenterSize->SetFlexibleDirection( wxBOTH );
60 m_gbsRectangleByCenterSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
63 bSizer20->Add( m_gbsRectangleByCenterSize, 1, wxALL|wxEXPAND, 5 );
66 m_rectangleByCenterSize->SetSizer( bSizer20 );
67 m_rectangleByCenterSize->Layout();
68 bSizer20->Fit( m_rectangleByCenterSize );
69 m_notebookShapeDefs->AddPage( m_rectangleByCenterSize,
_(
"By Center and Size"),
true );
70 m_lineByEnds =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
72 bSizer6 =
new wxBoxSizer( wxVERTICAL );
74 m_gbsLineByEnds =
new wxGridBagSizer( 0, 0 );
75 m_gbsLineByEnds->SetFlexibleDirection( wxBOTH );
76 m_gbsLineByEnds->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
79 bSizer6->Add( m_gbsLineByEnds, 1, wxALL|wxEXPAND, 5 );
82 m_lineByEnds->SetSizer( bSizer6 );
83 m_lineByEnds->Layout();
84 bSizer6->Fit( m_lineByEnds );
85 m_notebookShapeDefs->AddPage( m_lineByEnds,
_(
"By Endpoints"),
false );
86 m_lineByLengthAngle =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
88 bSizer7 =
new wxBoxSizer( wxVERTICAL );
90 m_gbsLineByLengthAngle =
new wxGridBagSizer( 0, 0 );
91 m_gbsLineByLengthAngle->SetFlexibleDirection( wxBOTH );
92 m_gbsLineByLengthAngle->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
95 bSizer7->Add( m_gbsLineByLengthAngle, 1, wxALL|wxEXPAND, 5 );
98 m_lineByLengthAngle->SetSizer( bSizer7 );
99 m_lineByLengthAngle->Layout();
100 bSizer7->Fit( m_lineByLengthAngle );
101 m_notebookShapeDefs->AddPage( m_lineByLengthAngle,
_(
"By Length and Angle"),
false );
102 m_lineByStartMid =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
103 wxBoxSizer* bSizer71;
104 bSizer71 =
new wxBoxSizer( wxVERTICAL );
106 m_gbsLineByStartMid =
new wxGridBagSizer( 0, 0 );
107 m_gbsLineByStartMid->SetFlexibleDirection( wxBOTH );
108 m_gbsLineByStartMid->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
111 bSizer71->Add( m_gbsLineByStartMid, 1, wxALL|wxEXPAND, 5 );
114 m_lineByStartMid->SetSizer( bSizer71 );
115 m_lineByStartMid->Layout();
116 bSizer71->Fit( m_lineByStartMid );
117 m_notebookShapeDefs->AddPage( m_lineByStartMid,
_(
"By Start/Midpoint"),
false );
118 m_arcByCSA =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
120 bSizer8 =
new wxBoxSizer( wxVERTICAL );
122 m_gbsArcByCSA =
new wxGridBagSizer( 0, 0 );
123 m_gbsArcByCSA->SetFlexibleDirection( wxBOTH );
124 m_gbsArcByCSA->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
127 bSizer8->Add( m_gbsArcByCSA, 1, wxALL|wxEXPAND, 5 );
130 m_arcByCSA->SetSizer( bSizer8 );
131 m_arcByCSA->Layout();
132 bSizer8->Fit( m_arcByCSA );
133 m_notebookShapeDefs->AddPage( m_arcByCSA,
_(
"By Center/Start/Angle"),
false );
134 m_arcBySME =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
136 bSizer9 =
new wxBoxSizer( wxVERTICAL );
138 m_gbsArcBySME =
new wxGridBagSizer( 0, 0 );
139 m_gbsArcBySME->SetFlexibleDirection( wxBOTH );
140 m_gbsArcBySME->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
143 bSizer9->Add( m_gbsArcBySME, 1, wxALL|wxEXPAND, 5 );
146 m_arcBySME->SetSizer( bSizer9 );
147 m_arcBySME->Layout();
148 bSizer9->Fit( m_arcBySME );
149 m_notebookShapeDefs->AddPage( m_arcBySME,
_(
"By Start/Mid/End"),
false );
150 m_circle =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
151 wxBoxSizer* bSizer10;
152 bSizer10 =
new wxBoxSizer( wxVERTICAL );
154 m_gbsCircleCenterRadius =
new wxGridBagSizer( 0, 0 );
155 m_gbsCircleCenterRadius->SetFlexibleDirection( wxBOTH );
156 m_gbsCircleCenterRadius->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
159 bSizer10->Add( m_gbsCircleCenterRadius, 1, wxALL|wxEXPAND, 5 );
162 m_circle->SetSizer( bSizer10 );
164 bSizer10->Fit( m_circle );
165 m_notebookShapeDefs->AddPage( m_circle,
_(
"By Center/Radius"),
false );
166 m_circleCenterPoint =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
167 wxBoxSizer* bSizer11;
168 bSizer11 =
new wxBoxSizer( wxVERTICAL );
170 m_gbsCircleCenterPoint =
new wxGridBagSizer( 0, 0 );
171 m_gbsCircleCenterPoint->SetFlexibleDirection( wxBOTH );
172 m_gbsCircleCenterPoint->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
175 bSizer11->Add( m_gbsCircleCenterPoint, 1, wxALL|wxEXPAND, 5 );
178 m_circleCenterPoint->SetSizer( bSizer11 );
179 m_circleCenterPoint->Layout();
180 bSizer11->Fit( m_circleCenterPoint );
181 m_notebookShapeDefs->AddPage( m_circleCenterPoint,
_(
"By Center/Point"),
false );
182 m_bezier =
new wxPanel( m_notebookShapeDefs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
184 bSizer4 =
new wxBoxSizer( wxVERTICAL );
186 m_gbsBezier =
new wxGridBagSizer( 0, 0 );
187 m_gbsBezier->SetFlexibleDirection( wxBOTH );
188 m_gbsBezier->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
191 bSizer4->Add( m_gbsBezier, 1, wxALL|wxEXPAND, 5 );
194 m_bezier->SetSizer( bSizer4 );
196 bSizer4->Fit( m_bezier );
197 m_notebookShapeDefs->AddPage( m_bezier,
_(
"Bezier Control Points"),
false );
199 bMainSizer->Add( m_notebookShapeDefs, 0, wxEXPAND | wxALL, 5 );
201 m_upperSizer =
new wxBoxSizer( wxVERTICAL );
203 wxGridBagSizer* gbSizer2;
204 gbSizer2 =
new wxGridBagSizer( 5, 5 );
205 gbSizer2->SetFlexibleDirection( wxBOTH );
206 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
207 gbSizer2->SetEmptyCellSize( wxSize( -1,4 ) );
209 m_locked =
new wxCheckBox(
this, wxID_ANY,
_(
"Locked"), wxDefaultPosition, wxDefaultSize, 0 );
210 gbSizer2->Add( m_locked, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxLEFT, 5 );
212 m_filledCtrl =
new wxCheckBox(
this, wxID_ANY,
_(
"Filled shape"), wxDefaultPosition, wxDefaultSize, 0 );
213 gbSizer2->Add( m_filledCtrl, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxLEFT, 5 );
215 m_thicknessLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Line width:"), wxDefaultPosition, wxDefaultSize, 0 );
216 m_thicknessLabel->Wrap( -1 );
217 gbSizer2->Add( m_thicknessLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
219 m_thicknessCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
220 m_thicknessCtrl->SetMinSize( wxSize( 140,-1 ) );
222 gbSizer2->Add( m_thicknessCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
224 m_thicknessUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
225 m_thicknessUnits->Wrap( -1 );
226 gbSizer2->Add( m_thicknessUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
228 m_lineStyleLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Line style:"), wxDefaultPosition, wxDefaultSize, 0 );
229 m_lineStyleLabel->Wrap( -1 );
230 gbSizer2->Add( m_lineStyleLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
232 m_lineStyleCombo =
new wxBitmapComboBox(
this, wxID_ANY,
_(
"Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
233 m_lineStyleCombo->SetMinSize( wxSize( 210,-1 ) );
235 gbSizer2->Add( m_lineStyleCombo, wxGBPosition( 4, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
237 m_LayerLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
238 m_LayerLabel->Wrap( -1 );
239 gbSizer2->Add( m_LayerLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
241 m_LayerSelectionCtrl =
new PCB_LAYER_BOX_SELECTOR(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
242 gbSizer2->Add( m_LayerSelectionCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
244 m_techLayersLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Technical Layers:"), wxDefaultPosition, wxDefaultSize, 0 );
245 m_techLayersLabel->Wrap( -1 );
246 gbSizer2->Add( m_techLayersLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxLEFT, 5 );
248 wxFlexGridSizer* fgSizer2;
249 fgSizer2 =
new wxFlexGridSizer( 0, 4, 0, 0 );
250 fgSizer2->AddGrowableCol( 2 );
251 fgSizer2->SetFlexibleDirection( wxBOTH );
252 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
254 m_hasSolderMask =
new wxCheckBox(
this, wxID_ANY,
_(
"Solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
255 fgSizer2->Add( m_hasSolderMask, 0, wxALL, 5 );
257 m_solderMaskMarginLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Expansion:"), wxDefaultPosition, wxDefaultSize, 0 );
258 m_solderMaskMarginLabel->Wrap( -1 );
259 fgSizer2->Add( m_solderMaskMarginLabel, 0, wxALL, 5 );
261 m_solderMaskMarginCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
262 m_solderMaskMarginCtrl->SetToolTip(
_(
"This is the local clearance between the shape and the solder mask opening.\nLeave blank to use the value defined in the Board Setup.") );
264 fgSizer2->Add( m_solderMaskMarginCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
266 m_solderMaskMarginUnit =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
267 m_solderMaskMarginUnit->Wrap( -1 );
268 fgSizer2->Add( m_solderMaskMarginUnit, 0, wxALL, 5 );
271 gbSizer2->Add( fgSizer2, wxGBPosition( 8, 0 ), wxGBSpan( 1, 3 ), wxEXPAND, 5 );
273 m_netLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Net:"), wxDefaultPosition, wxDefaultSize, 0 );
274 m_netLabel->Wrap( -1 );
275 gbSizer2->Add( m_netLabel, wxGBPosition( 9, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
277 m_netSelector =
new NET_SELECTOR(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
278 gbSizer2->Add( m_netSelector, wxGBPosition( 9, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
281 gbSizer2->AddGrowableCol( 1 );
283 m_upperSizer->Add( gbSizer2, 0, wxEXPAND, 5 );
286 bMainSizer->Add( m_upperSizer, 1, wxALL|wxEXPAND, 5 );
288 m_StandardButtonsSizer =
new wxStdDialogButtonSizer();
289 m_StandardButtonsSizerOK =
new wxButton(
this, wxID_OK );
290 m_StandardButtonsSizer->AddButton( m_StandardButtonsSizerOK );
291 m_StandardButtonsSizerCancel =
new wxButton(
this, wxID_CANCEL );
292 m_StandardButtonsSizer->AddButton( m_StandardButtonsSizerCancel );
293 m_StandardButtonsSizer->Realize();
295 bMainSizer->Add( m_StandardButtonsSizer, 0, wxALL|wxEXPAND, 5 );
298 this->SetSizer( bMainSizer );
300 bMainSizer->Fit(
this );
~DIALOG_SHAPE_PROPERTIES_BASE()
virtual void onFilledCheckbox(wxCommandEvent &event)
wxCheckBox * m_hasSolderMask
virtual void onLayerSelection(wxCommandEvent &event)
PCB_LAYER_BOX_SELECTOR * m_LayerSelectionCtrl
virtual void onTechLayersChanged(wxCommandEvent &event)
wxCheckBox * m_filledCtrl
DIALOG_SHAPE_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("%s Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Class to display a pcb layer list in a wxBitmapComboBox.