KiCad PCB EDA Suite
dialog_non_copper_zones_properties_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 1 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_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 )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* m_MainSizer;
17  m_MainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* m_UpperSizer;
20  m_UpperSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxBoxSizer* bSizerLeft;
23  bSizerLeft = new wxBoxSizer( wxVERTICAL );
24 
25  m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_staticTextLayerSelection->Wrap( -1 );
27  bSizerLeft->Add( m_staticTextLayerSelection, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
28 
29  m_layers = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER|wxBORDER_SIMPLE );
30  m_layers->SetMinSize( wxSize( -1,200 ) );
31 
32  bSizerLeft->Add( m_layers, 1, wxALL|wxEXPAND, 5 );
33 
34 
35  m_UpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
36 
37  wxBoxSizer* bSizerMiddle;
38  bSizerMiddle = new wxBoxSizer( wxVERTICAL );
39 
40  wxGridBagSizer* gbSizer1;
41  gbSizer1 = new wxGridBagSizer( 0, 0 );
42  gbSizer1->SetFlexibleDirection( wxBOTH );
43  gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
44 
45  m_ConstrainOpt = new wxCheckBox( this, wxID_ANY, _("Constrain outline to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
46  gbSizer1->Add( m_ConstrainOpt, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxALL, 5 );
47 
48  m_staticTextStyle = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
49  m_staticTextStyle->Wrap( -1 );
50  gbSizer1->Add( m_staticTextStyle, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
51 
52  wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
53  int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
54  m_OutlineAppearanceCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
55  m_OutlineAppearanceCtrl->SetSelection( 0 );
56  gbSizer1->Add( m_OutlineAppearanceCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
57 
58  m_MinWidthLabel = new wxStaticText( this, wxID_ANY, _("Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 );
59  m_MinWidthLabel->Wrap( -1 );
60  gbSizer1->Add( m_MinWidthLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
61 
62  m_MinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
63  gbSizer1->Add( m_MinWidthCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
64 
65  m_MinWidthUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
66  m_MinWidthUnits->Wrap( -1 );
67  gbSizer1->Add( m_MinWidthUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
68 
69 
70  bSizerMiddle->Add( gbSizer1, 0, wxEXPAND, 5 );
71 
72  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
73  bSizerMiddle->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
74 
75  m_staticTextGridStyle = new wxStaticText( this, wxID_ANY, _("Grid Style:"), wxDefaultPosition, wxDefaultSize, 0 );
76  m_staticTextGridStyle->Wrap( -1 );
77  m_staticTextGridStyle->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
78 
79  bSizerMiddle->Add( m_staticTextGridStyle, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
80 
81  wxFlexGridSizer* fgSizer1;
82  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
83  fgSizer1->AddGrowableCol( 1 );
84  fgSizer1->SetFlexibleDirection( wxBOTH );
85  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
86 
87  m_staticTextGridFillType = new wxStaticText( this, wxID_ANY, _("Fill type:"), wxDefaultPosition, wxDefaultSize, 0 );
88  m_staticTextGridFillType->Wrap( -1 );
89  fgSizer1->Add( m_staticTextGridFillType, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
90 
91  wxString m_GridStyleCtrlChoices[] = { _("Solid shape"), _("Hatch pattern") };
92  int m_GridStyleCtrlNChoices = sizeof( m_GridStyleCtrlChoices ) / sizeof( wxString );
93  m_GridStyleCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_GridStyleCtrlNChoices, m_GridStyleCtrlChoices, 0 );
94  m_GridStyleCtrl->SetSelection( 0 );
95  fgSizer1->Add( m_GridStyleCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
96 
97 
98  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
99 
100  m_staticTextGrindOrient = new wxStaticText( this, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
101  m_staticTextGrindOrient->Wrap( -1 );
102  fgSizer1->Add( m_staticTextGrindOrient, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
103 
104  m_tcGridStyleOrientation = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
105  fgSizer1->Add( m_tcGridStyleOrientation, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
106 
107  m_staticTextRotUnits = new wxStaticText( this, wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 );
108  m_staticTextRotUnits->Wrap( -1 );
109  fgSizer1->Add( m_staticTextRotUnits, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
110 
111  m_staticTextStyleThickness = new wxStaticText( this, wxID_ANY, _("Hatch width:"), wxDefaultPosition, wxDefaultSize, 0 );
112  m_staticTextStyleThickness->Wrap( -1 );
113  fgSizer1->Add( m_staticTextStyleThickness, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
114 
115  m_tcGridStyleThickness = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
116  fgSizer1->Add( m_tcGridStyleThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
117 
118  m_GridStyleThicknessUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
119  m_GridStyleThicknessUnits->Wrap( -1 );
120  fgSizer1->Add( m_GridStyleThicknessUnits, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
121 
122  m_staticTextGridGap = new wxStaticText( this, wxID_ANY, _("Hatch gap:"), wxDefaultPosition, wxDefaultSize, 0 );
123  m_staticTextGridGap->Wrap( -1 );
124  fgSizer1->Add( m_staticTextGridGap, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
125 
126  m_tcGridStyleGap = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
127  fgSizer1->Add( m_tcGridStyleGap, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
128 
129  m_GridStyleGapUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
130  m_GridStyleGapUnits->Wrap( -1 );
131  fgSizer1->Add( m_GridStyleGapUnits, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
132 
133  m_staticTextGridSmoothingLevel = new wxStaticText( this, wxID_ANY, _("Smoothing effort:"), wxDefaultPosition, wxDefaultSize, 0 );
134  m_staticTextGridSmoothingLevel->Wrap( -1 );
135  m_staticTextGridSmoothingLevel->SetToolTip( _("Value of smoothing effort\n0 = no smoothing\n1 = chamfer\n2 = round corners\n3 = round corners (finer shape)") );
136 
137  fgSizer1->Add( m_staticTextGridSmoothingLevel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
138 
139  m_spinCtrlSmoothLevel = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 3, 0 );
140  fgSizer1->Add( m_spinCtrlSmoothLevel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
141 
142 
143  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
144 
145  m_staticTextGridSmootingVal = new wxStaticText( this, wxID_ANY, _("Smooth value (0..1):"), wxDefaultPosition, wxDefaultSize, 0 );
146  m_staticTextGridSmootingVal->Wrap( -1 );
147  m_staticTextGridSmootingVal->SetToolTip( _("Ratio between smoothed corners size and the gap between lines\n0 = no smoothing\n1.0 = max radius/chamfer size (half gap value)") );
148 
149  fgSizer1->Add( m_staticTextGridSmootingVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
150 
151  m_spinCtrlSmoothValue = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1, 0.1, 0.1 );
152  m_spinCtrlSmoothValue->SetDigits( 2 );
153  fgSizer1->Add( m_spinCtrlSmoothValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
154 
155 
156  bSizerMiddle->Add( fgSizer1, 0, wxEXPAND, 5 );
157 
158  m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
159  bSizerMiddle->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
160 
161  m_staticTextOutlineSmooth = new wxStaticText( this, wxID_ANY, _("Zone Outline Smooth:"), wxDefaultPosition, wxDefaultSize, 0 );
162  m_staticTextOutlineSmooth->Wrap( -1 );
163  m_staticTextOutlineSmooth->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
164 
165  bSizerMiddle->Add( m_staticTextOutlineSmooth, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
166 
167  wxFlexGridSizer* fgSizerOutlineSettings;
168  fgSizerOutlineSettings = new wxFlexGridSizer( 0, 3, 0, 0 );
169  fgSizerOutlineSettings->AddGrowableCol( 1 );
170  fgSizerOutlineSettings->SetFlexibleDirection( wxBOTH );
171  fgSizerOutlineSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
172 
173  m_staticTextSmoothing = new wxStaticText( this, wxID_ANY, _("Outline smooth:"), wxDefaultPosition, wxDefaultSize, 0 );
174  m_staticTextSmoothing->Wrap( -1 );
175  fgSizerOutlineSettings->Add( m_staticTextSmoothing, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
176 
177  wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
178  int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
179  m_cornerSmoothingChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
180  m_cornerSmoothingChoice->SetSelection( 0 );
181  fgSizerOutlineSettings->Add( m_cornerSmoothingChoice, 0, wxALL|wxEXPAND, 5 );
182 
183 
184  fgSizerOutlineSettings->Add( 0, 0, 0, 0, 5 );
185 
186  m_cornerRadiusLabel = new wxStaticText( this, wxID_ANY, _("Chamfer distance:"), wxDefaultPosition, wxDefaultSize, 0 );
187  m_cornerRadiusLabel->Wrap( -1 );
188  fgSizerOutlineSettings->Add( m_cornerRadiusLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
189 
190  m_cornerRadiusCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
191  fgSizerOutlineSettings->Add( m_cornerRadiusCtrl, 0, wxALL|wxEXPAND, 5 );
192 
193  m_cornerRadiusUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
194  m_cornerRadiusUnits->Wrap( -1 );
195  fgSizerOutlineSettings->Add( m_cornerRadiusUnits, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
196 
197 
198  fgSizerOutlineSettings->Add( 0, 0, 0, 0, 5 );
199 
200 
201  bSizerMiddle->Add( fgSizerOutlineSettings, 0, wxEXPAND, 5 );
202 
203 
204  m_UpperSizer->Add( bSizerMiddle, 0, wxEXPAND|wxALL, 10 );
205 
206 
207  m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALL, 5 );
208 
209  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
210  m_MainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
211 
212  m_sdbSizerButtons = new wxStdDialogButtonSizer();
213  m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
215  m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
217  m_sdbSizerButtons->Realize();
218 
219  m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALL, 5 );
220 
221 
222  this->SetSizer( m_MainSizer );
223  this->Layout();
224 
225  this->Centre( wxBOTH );
226 
227  // Connect Events
228  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnUpdateUI ) );
229  m_layers->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this );
230  m_GridStyleCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnStyleSelection ), NULL, this );
231 }
232 
234 {
235  // Disconnect Events
236  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnUpdateUI ) );
237  m_layers->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this );
238  m_GridStyleCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnStyleSelection ), NULL, this );
239 
240 }
DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Non Copper Zones Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(595, 491), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:84
#define NULL
#define _(s)
Definition: 3d_actions.cpp:31