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 Oct 26 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( 100,-1 ) );
31 
32  bSizerLeft->Add( m_layers, 1, wxALL|wxEXPAND, 5 );
33 
34 
35  bSizerLeft->Add( 0, 5, 0, wxEXPAND, 5 );
36 
37 
38  m_UpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
39 
40  wxBoxSizer* bSizerMiddle;
41  bSizerMiddle = new wxBoxSizer( wxVERTICAL );
42 
43  wxStaticBoxSizer* sbShape;
44  sbShape = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Shape") ), wxVERTICAL );
45 
46  wxGridBagSizer* gbSizer1;
47  gbSizer1 = new wxGridBagSizer( 0, 0 );
48  gbSizer1->SetFlexibleDirection( wxBOTH );
49  gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
50 
51  m_ConstrainOpt = new wxCheckBox( sbShape->GetStaticBox(), wxID_ANY, _("Constrain outline to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
52  gbSizer1->Add( m_ConstrainOpt, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxALL, 5 );
53 
54  m_cbLocked = new wxCheckBox( sbShape->GetStaticBox(), wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 );
55  gbSizer1->Add( m_cbLocked, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
56 
57  m_staticTextStyle = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
58  m_staticTextStyle->Wrap( -1 );
59  gbSizer1->Add( m_staticTextStyle, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
60 
61  wxString m_OutlineDisplayCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
62  int m_OutlineDisplayCtrlNChoices = sizeof( m_OutlineDisplayCtrlChoices ) / sizeof( wxString );
63  m_OutlineDisplayCtrl = new wxChoice( sbShape->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OutlineDisplayCtrlNChoices, m_OutlineDisplayCtrlChoices, 0 );
64  m_OutlineDisplayCtrl->SetSelection( 0 );
65  gbSizer1->Add( m_OutlineDisplayCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
66 
67  m_MinWidthLabel = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 );
68  m_MinWidthLabel->Wrap( -1 );
69  gbSizer1->Add( m_MinWidthLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
70 
71  m_MinWidthCtrl = new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
72  gbSizer1->Add( m_MinWidthCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
73 
74  m_MinWidthUnits = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
75  m_MinWidthUnits->Wrap( -1 );
76  gbSizer1->Add( m_MinWidthUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
77 
78  m_staticTextSmoothing = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 );
79  m_staticTextSmoothing->Wrap( -1 );
80  gbSizer1->Add( m_staticTextSmoothing, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
81 
82  wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
83  int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
84  m_cornerSmoothingChoice = new wxChoice( sbShape->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
85  m_cornerSmoothingChoice->SetSelection( 0 );
86  gbSizer1->Add( m_cornerSmoothingChoice, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
87 
88  m_cornerRadiusLabel = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Chamfer distance:"), wxDefaultPosition, wxDefaultSize, 0 );
89  m_cornerRadiusLabel->Wrap( -1 );
90  gbSizer1->Add( m_cornerRadiusLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
91 
92  m_cornerRadiusCtrl = new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
93  gbSizer1->Add( m_cornerRadiusCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
94 
95  m_cornerRadiusUnits = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
96  m_cornerRadiusUnits->Wrap( -1 );
97  gbSizer1->Add( m_cornerRadiusUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
98 
99 
100  gbSizer1->AddGrowableCol( 1 );
101 
102  sbShape->Add( gbSizer1, 0, wxEXPAND, 5 );
103 
104 
105  bSizerMiddle->Add( sbShape, 0, wxEXPAND, 5 );
106 
107  wxStaticBoxSizer* sbFill;
108  sbFill = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fill") ), wxVERTICAL );
109 
110  wxFlexGridSizer* fgSizer1;
111  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
112  fgSizer1->AddGrowableCol( 1 );
113  fgSizer1->SetFlexibleDirection( wxBOTH );
114  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
115 
116  m_staticTextGridFillType = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Fill type:"), wxDefaultPosition, wxDefaultSize, 0 );
117  m_staticTextGridFillType->Wrap( -1 );
118  fgSizer1->Add( m_staticTextGridFillType, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
119 
120  wxString m_GridStyleCtrlChoices[] = { _("Solid fill"), _("Hatch pattern") };
121  int m_GridStyleCtrlNChoices = sizeof( m_GridStyleCtrlChoices ) / sizeof( wxString );
122  m_GridStyleCtrl = new wxChoice( sbFill->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_GridStyleCtrlNChoices, m_GridStyleCtrlChoices, 0 );
123  m_GridStyleCtrl->SetSelection( 0 );
124  fgSizer1->Add( m_GridStyleCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
125 
126 
127  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
128 
129  m_hatchOrientLabel = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
130  m_hatchOrientLabel->Wrap( -1 );
131  fgSizer1->Add( m_hatchOrientLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
132 
133  m_hatchOrientCtrl = new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
134  fgSizer1->Add( m_hatchOrientCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
135 
136  m_hatchOrientUnits = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 );
137  m_hatchOrientUnits->Wrap( -1 );
138  fgSizer1->Add( m_hatchOrientUnits, 0, wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
139 
140  m_hatchWidthLabel = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Hatch width:"), wxDefaultPosition, wxDefaultSize, 0 );
141  m_hatchWidthLabel->Wrap( -1 );
142  fgSizer1->Add( m_hatchWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
143 
144  m_hatchWidthCtrl = new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
145  fgSizer1->Add( m_hatchWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
146 
147  m_hatchWidthUnits = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
148  m_hatchWidthUnits->Wrap( -1 );
149  fgSizer1->Add( m_hatchWidthUnits, 0, wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
150 
151  m_hatchGapLabel = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Hatch gap:"), wxDefaultPosition, wxDefaultSize, 0 );
152  m_hatchGapLabel->Wrap( -1 );
153  fgSizer1->Add( m_hatchGapLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
154 
155  m_hatchGapCtrl = new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
156  fgSizer1->Add( m_hatchGapCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
157 
158  m_hatchGapUnits = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
159  m_hatchGapUnits->Wrap( -1 );
160  fgSizer1->Add( m_hatchGapUnits, 0, wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
161 
162  m_smoothLevelLabel = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Smoothing effort:"), wxDefaultPosition, wxDefaultSize, 0 );
163  m_smoothLevelLabel->Wrap( -1 );
164  m_smoothLevelLabel->SetToolTip( _("Value of smoothing effort\n0 = no smoothing\n1 = chamfer\n2 = round corners\n3 = round corners (finer shape)") );
165 
166  fgSizer1->Add( m_smoothLevelLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
167 
168  m_spinCtrlSmoothLevel = new wxSpinCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 3, 0 );
169  fgSizer1->Add( m_spinCtrlSmoothLevel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
170 
171 
172  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
173 
174  m_smoothValueLabel = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Smoothing amount:"), wxDefaultPosition, wxDefaultSize, 0 );
175  m_smoothValueLabel->Wrap( -1 );
176  m_smoothValueLabel->SetToolTip( _("Ratio between smoothed corners size and the gap between lines\n0 = no smoothing\n1.0 = max radius/chamfer size (half gap value)") );
177 
178  fgSizer1->Add( m_smoothValueLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
179 
180  m_spinCtrlSmoothValue = new wxSpinCtrlDouble( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1, 0.1, 0.1 );
181  m_spinCtrlSmoothValue->SetDigits( 2 );
182  fgSizer1->Add( m_spinCtrlSmoothValue, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
183 
184 
185  sbFill->Add( fgSizer1, 0, wxEXPAND, 5 );
186 
187 
188  bSizerMiddle->Add( sbFill, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
189 
190 
191  m_UpperSizer->Add( bSizerMiddle, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
192 
193 
194  m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALL, 5 );
195 
196  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
197  m_MainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
198 
199  m_sdbSizerButtons = new wxStdDialogButtonSizer();
200  m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
202  m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
204  m_sdbSizerButtons->Realize();
205 
206  m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALL, 5 );
207 
208 
209  this->SetSizer( m_MainSizer );
210  this->Layout();
211  m_MainSizer->Fit( this );
212 
213  this->Centre( wxBOTH );
214 
215  // Connect Events
216  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnUpdateUI ) );
217  m_layers->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this );
218  m_GridStyleCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnStyleSelection ), NULL, this );
219 }
220 
222 {
223  // Disconnect Events
224  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnUpdateUI ) );
225  m_layers->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this );
226  m_GridStyleCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnStyleSelection ), NULL, this );
227 
228 }
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
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(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN)
#define _(s)