14DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::DIALOG_GLOBAL_EDIT_TEARDROPS_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 wxBoxSizer* bSizerTop;
22 bSizerTop =
new wxBoxSizer( wxHORIZONTAL );
24 wxStaticBoxSizer* sbScope;
25 sbScope =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Scope") ), wxVERTICAL );
27 m_pthPads =
new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY,
_(
"PTH pads"), wxDefaultPosition, wxDefaultSize, 0 );
29 sbScope->Add(
m_pthPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
31 m_smdPads =
new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY,
_(
"SMD pads"), wxDefaultPosition, wxDefaultSize, 0 );
33 sbScope->Add(
m_smdPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
35 m_vias =
new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY,
_(
"Vias"), wxDefaultPosition, wxDefaultSize, 0 );
37 sbScope->Add(
m_vias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
39 m_trackToTrack =
new wxCheckBox( sbScope->GetStaticBox(), wxID_ANY,
_(
"Track to track"), wxDefaultPosition, wxDefaultSize, 0 );
43 bSizerTop->Add( sbScope, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
45 wxStaticBoxSizer* sbFilters;
46 sbFilters =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Filter Items") ), wxVERTICAL );
48 wxFlexGridSizer* fgSizer3;
49 fgSizer3 =
new wxFlexGridSizer( 0, 2, 5, 0 );
50 fgSizer3->AddGrowableCol( 1 );
51 fgSizer3->AddGrowableRow( 0 );
52 fgSizer3->AddGrowableRow( 1 );
53 fgSizer3->AddGrowableRow( 2 );
54 fgSizer3->AddGrowableRow( 3 );
55 fgSizer3->SetFlexibleDirection( wxBOTH );
56 fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
58 m_netFilterOpt =
new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY,
_(
"Filter items by net:"), wxDefaultPosition, wxDefaultSize, 0 );
59 fgSizer3->Add(
m_netFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
62 fgSizer3->Add(
m_netFilter, 1, wxEXPAND|wxRIGHT, 5 );
64 m_netclassFilterOpt =
new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY,
_(
"Filter items by net class:"), wxDefaultPosition, wxDefaultSize, 0 );
67 wxArrayString m_netclassFilterChoices;
68 m_netclassFilter =
new wxChoice( sbFilters->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_netclassFilterChoices, 0 );
70 fgSizer3->Add(
m_netclassFilter, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
73 fgSizer3->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 3 );
76 fgSizer3->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 3 );
78 m_layerFilterOpt =
new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY,
_(
"Filter items by layer:"), wxDefaultPosition, wxDefaultSize, 0 );
79 fgSizer3->Add(
m_layerFilterOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
82 fgSizer3->Add(
m_layerFilter, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
85 fgSizer3->Add( 0, 5, 1, wxEXPAND, 5 );
88 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
91 sbFilters->Add( fgSizer3, 1, wxEXPAND, 5 );
94 sbFilters->Add( 0, 5, 0, 0, 5 );
96 m_roundPadsFilter =
new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY,
_(
"Round pads only"), wxDefaultPosition, wxDefaultSize, 0 );
99 m_existingFilter =
new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY,
_(
"Existing teardrops only"), wxDefaultPosition, wxDefaultSize, 0 );
102 m_selectedItemsFilter =
new wxCheckBox( sbFilters->GetStaticBox(), wxID_ANY,
_(
"Selected items only"), wxDefaultPosition, wxDefaultSize, 0 );
106 bSizerTop->Add( sbFilters, 2, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
109 bMainSizer->Add( bSizerTop, 0, wxEXPAND, 5 );
111 wxStaticBoxSizer* sbAction;
112 sbAction =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Action") ), wxVERTICAL );
114 m_removeTeardrops =
new wxRadioButton( sbAction->GetStaticBox(), wxID_ANY,
_(
"Remove teardrops"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
115 m_removeTeardrops->SetToolTip(
_(
"Remove teardrops according to filtering options") );
119 m_removeAllTeardrops =
new wxRadioButton( sbAction->GetStaticBox(), wxID_ANY,
_(
"Remove all teardrops"), wxDefaultPosition, wxDefaultSize, 0 );
124 wxBoxSizer* bSizer12;
125 bSizer12 =
new wxBoxSizer( wxHORIZONTAL );
127 m_addTeardrops =
new wxRadioButton( sbAction->GetStaticBox(), wxID_ANY,
_(
"Add teardrops with default values for shape"), wxDefaultPosition, wxDefaultSize, 0 );
128 bSizer12->Add(
m_addTeardrops, 1, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
130 m_boardSetupLink =
new wxHyperlinkCtrl( sbAction->GetStaticBox(), wxID_ANY,
_(
"Edit default values in Board Setup"), wxT(
"#teardrops"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
131 bSizer12->Add(
m_boardSetupLink, 1, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 10 );
134 sbAction->Add( bSizer12, 0, wxEXPAND|wxBOTTOM, 15 );
136 m_specifiedValues =
new wxRadioButton( sbAction->GetStaticBox(), wxID_ANY,
_(
"Add teardrops with specified values:"), wxDefaultPosition, wxDefaultSize, 0 );
139 wxBoxSizer* bSizerSpecifiedValues;
140 bSizerSpecifiedValues =
new wxBoxSizer( wxVERTICAL );
142 wxBoxSizer* bSizerCols11;
143 bSizerCols11 =
new wxBoxSizer( wxHORIZONTAL );
145 wxBoxSizer* bSizerLeftCol11;
146 bSizerLeftCol11 =
new wxBoxSizer( wxVERTICAL );
148 m_cbPreferZoneConnection =
new wxCheckBox( sbAction->GetStaticBox(), wxID_ANY,
_(
"Prefer zone connection"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
149 m_cbPreferZoneConnection->SetToolTip(
_(
"Do not create teardrops on tracks connected to pads that are also connected to a copper zone.") );
153 m_cbTeardropsUseNextTrack =
new wxCheckBox( sbAction->GetStaticBox(), wxID_ANY,
_(
"Allow teardrops to span two track segments"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
154 m_cbTeardropsUseNextTrack->SetToolTip(
_(
"Allows a teardrop to extend over the first 2 connected track segments if the first track segment is too short to accommodate the best length.") );
159 bSizerCols11->Add( bSizerLeftCol11, 1, wxEXPAND|wxTOP, 3 );
162 bSizerCols11->Add( 25, 0, 0, wxEXPAND, 5 );
164 wxBoxSizer* bSizerRightCol11;
165 bSizerRightCol11 =
new wxBoxSizer( wxVERTICAL );
167 wxBoxSizer* bSizer39;
168 bSizer39 =
new wxBoxSizer( wxHORIZONTAL );
170 m_stHDRatio =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"Maximum track width:"), wxDefaultPosition, wxDefaultSize, 0 );
172 m_stHDRatio->SetToolTip(
_(
"Max pad/via size to track width ratio to create a teardrop.\n100 always creates a teardrop.") );
174 bSizer39->Add(
m_stHDRatio, 0, wxALIGN_CENTER_VERTICAL, 5 );
176 m_tcHDRatio =
new wxTextCtrl( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
177 m_tcHDRatio->SetToolTip(
_(
"Tracks which are similar in size to the pad or via do not need teardrops.") );
179 bSizer39->Add(
m_tcHDRatio, 0, wxRIGHT|wxLEFT, 5 );
181 m_stHDRatioUnits =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"%"), wxDefaultPosition, wxDefaultSize, 0 );
186 bSizerRightCol11->Add( bSizer39, 0, wxEXPAND, 3 );
188 m_minTrackWidthHint =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"(as a percentage of pad/via minor dimension)"), wxDefaultPosition, wxDefaultSize, 0 );
193 bSizerCols11->Add( bSizerRightCol11, 1, wxEXPAND|wxLEFT, 10 );
196 bSizerSpecifiedValues->Add( bSizerCols11, 0, wxEXPAND|wxTOP, 3 );
199 bSizerSpecifiedValues->Add( 0, 5, 0, wxEXPAND, 5 );
201 wxBoxSizer* bSizerShapeColumns;
202 bSizerShapeColumns =
new wxBoxSizer( wxHORIZONTAL );
204 wxBoxSizer* bSizerLeftCol;
205 bSizerLeftCol =
new wxBoxSizer( wxVERTICAL );
207 m_bitmapTeardrop =
new wxStaticBitmap( sbAction->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
208 bSizerLeftCol->Add(
m_bitmapTeardrop, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
210 wxBoxSizer* bSizer41;
211 bSizer41 =
new wxBoxSizer( wxHORIZONTAL );
214 bSizerLeftCol->Add( bSizer41, 0, wxEXPAND|wxBOTTOM, 5 );
217 bSizerShapeColumns->Add( bSizerLeftCol, 1, wxEXPAND|wxRIGHT, 10 );
220 bSizerShapeColumns->Add( 25, 0, 0, wxEXPAND, 5 );
222 wxBoxSizer* bSizer121;
223 bSizer121 =
new wxBoxSizer( wxVERTICAL );
225 wxFlexGridSizer* fgSizerRightCol;
226 fgSizerRightCol =
new wxFlexGridSizer( 0, 3, 5, 0 );
227 fgSizerRightCol->AddGrowableCol( 1 );
228 fgSizerRightCol->SetFlexibleDirection( wxBOTH );
229 fgSizerRightCol->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
231 m_stLenPercentLabel =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"Best length (L):"), wxDefaultPosition, wxDefaultSize, 0 );
235 m_tcLenPercent =
new wxTextCtrl( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
236 fgSizerRightCol->Add(
m_tcLenPercent, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
238 wxBoxSizer* bSizer131;
239 bSizer131 =
new wxBoxSizer( wxHORIZONTAL );
241 m_lengthUnitsPrefix =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"%("), wxDefaultPosition, wxDefaultSize, 0 );
245 m_lengthUnitsHint =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"d"), wxDefaultPosition, wxDefaultSize, 0 );
247 m_lengthUnitsHint->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL,
false, wxEmptyString ) );
251 m_lengthUnitsSuffix =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
" )"), wxDefaultPosition, wxDefaultSize, 0 );
256 fgSizerRightCol->Add( bSizer131, 0, wxALIGN_CENTER_VERTICAL, 5 );
258 m_stMaxLen =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"Maximum length (L):"), wxDefaultPosition, wxDefaultSize, 0 );
260 fgSizerRightCol->Add(
m_stMaxLen, 0, wxALIGN_CENTER_VERTICAL, 5 );
262 m_tcTdMaxLen =
new wxTextCtrl( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
263 fgSizerRightCol->Add(
m_tcTdMaxLen, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
265 m_stMaxLenUnits =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
267 fgSizerRightCol->Add(
m_stMaxLenUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
270 fgSizerRightCol->Add( 0, 5, 1, wxEXPAND, 5 );
273 fgSizerRightCol->Add( 0, 0, 1, wxEXPAND, 5 );
276 fgSizerRightCol->Add( 0, 0, 1, wxEXPAND, 5 );
278 m_stHeightPercentLabel =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"Best width (W):"), wxDefaultPosition, wxDefaultSize, 0 );
282 m_tcHeightPercent =
new wxTextCtrl( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
283 fgSizerRightCol->Add(
m_tcHeightPercent, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
285 wxBoxSizer* bSizer1311;
286 bSizer1311 =
new wxBoxSizer( wxHORIZONTAL );
288 m_widthUnitsPrefix =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"%("), wxDefaultPosition, wxDefaultSize, 0 );
292 m_widthUnitsHint =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"d"), wxDefaultPosition, wxDefaultSize, 0 );
294 m_widthUnitsHint->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL,
false, wxEmptyString ) );
298 m_widthUnitsSuffix =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
" )"), wxDefaultPosition, wxDefaultSize, 0 );
303 fgSizerRightCol->Add( bSizer1311, 0, wxALIGN_CENTER_VERTICAL, 5 );
305 m_stMaxHeight =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"Maximum width (W):"), wxDefaultPosition, wxDefaultSize, 0 );
307 fgSizerRightCol->Add(
m_stMaxHeight, 0, wxALIGN_CENTER_VERTICAL, 10 );
309 m_tcMaxHeight =
new wxTextCtrl( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
310 fgSizerRightCol->Add(
m_tcMaxHeight, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
312 m_stMaxHeightUnits =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
317 bSizer121->Add( fgSizerRightCol, 1, wxEXPAND|wxLEFT, 10 );
320 bSizer121->Add( 0, 8, 0, wxEXPAND, 5 );
322 wxBoxSizer* bSizer44;
323 bSizer44 =
new wxBoxSizer( wxHORIZONTAL );
325 m_curvedEdges =
new wxCheckBox( sbAction->GetStaticBox(), wxID_ANY,
_(
"Curved edges"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
326 bSizer44->Add(
m_curvedEdges, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
329 bSizer44->Add( 30, 0, 0, 0, 5 );
331 m_curvePointsLabel =
new wxStaticText( sbAction->GetStaticBox(), wxID_ANY,
_(
"Points:"), wxDefaultPosition, wxDefaultSize, 0 );
335 m_curvePointsCtrl =
new wxSpinCtrl( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 10, 5 );
336 bSizer44->Add(
m_curvePointsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
339 bSizer121->Add( bSizer44, 0, wxBOTTOM|wxEXPAND|wxLEFT, 3 );
342 bSizerShapeColumns->Add( bSizer121, 1, wxEXPAND|wxTOP, 5 );
345 bSizerSpecifiedValues->Add( bSizerShapeColumns, 1, wxEXPAND|wxBOTTOM, 3 );
348 sbAction->Add( bSizerSpecifiedValues, 0, wxEXPAND|wxLEFT, 25 );
351 bMainSizer->Add( sbAction, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
362 bMainSizer->Add(
m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
365 this->SetSizer( bMainSizer );
367 bMainSizer->Fit(
this );
wxStaticText * m_stHDRatioUnits
virtual void onShowBoardSetup(wxHyperlinkEvent &event)
wxCheckBox * m_netFilterOpt
wxStaticText * m_stLenPercentLabel
wxStaticText * m_lengthUnitsHint
wxCheckBox * m_cbPreferZoneConnection
wxStdDialogButtonSizer * m_sdbSizer
wxStaticText * m_stHeightPercentLabel
wxStaticBitmap * m_bitmapTeardrop
wxHyperlinkCtrl * m_boardSetupLink
wxRadioButton * m_specifiedValues
wxStaticText * m_lengthUnitsSuffix
wxRadioButton * m_removeTeardrops
DIALOG_GLOBAL_EDIT_TEARDROPS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Set Teardrops"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxCheckBox * m_roundPadsFilter
wxCheckBox * m_layerFilterOpt
wxStaticText * m_stMaxHeightUnits
wxCheckBox * m_curvedEdges
virtual void onFilterUpdateUi(wxUpdateUIEvent &event)
wxStaticText * m_minTrackWidthHint
wxStaticText * m_lengthUnitsPrefix
wxStaticText * m_stMaxLenUnits
wxStaticText * m_widthUnitsSuffix
wxButton * m_sdbSizerCancel
virtual void OnExistingFilterSelect(wxCommandEvent &event)
wxCheckBox * m_selectedItemsFilter
virtual void onTrackToTrack(wxCommandEvent &event)
virtual void onCurvedEdgesUpdateUi(wxUpdateUIEvent &event)
virtual void OnNetclassFilterSelect(wxCommandEvent &event)
wxStaticText * m_widthUnitsHint
NET_SELECTOR * m_netFilter
wxStaticText * m_curvePointsLabel
wxCheckBox * m_existingFilter
wxTextCtrl * m_tcTdMaxLen
PCB_LAYER_BOX_SELECTOR * m_layerFilter
wxTextCtrl * m_tcHeightPercent
wxTextCtrl * m_tcLenPercent
wxRadioButton * m_removeAllTeardrops
wxChoice * m_netclassFilter
wxSpinCtrl * m_curvePointsCtrl
wxStaticText * m_widthUnitsPrefix
wxRadioButton * m_addTeardrops
wxCheckBox * m_trackToTrack
wxStaticText * m_stMaxHeight
wxTextCtrl * m_tcMaxHeight
wxStaticText * m_stHDRatio
wxCheckBox * m_cbTeardropsUseNextTrack
wxStaticText * m_stMaxLen
virtual void onSpecifiedValuesUpdateUi(wxUpdateUIEvent &event)
virtual void OnLayerFilterSelect(wxCommandEvent &event)
wxButton * m_sdbSizerApply
~DIALOG_GLOBAL_EDIT_TEARDROPS_BASE()
wxCheckBox * m_netclassFilterOpt
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.