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( -1,200 ) );
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_staticTextStyle = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
55  m_staticTextStyle->Wrap( -1 );
56  gbSizer1->Add( m_staticTextStyle, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
57 
58  wxString m_OutlineDisplayCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
59  int m_OutlineDisplayCtrlNChoices = sizeof( m_OutlineDisplayCtrlChoices ) / sizeof( wxString );
60  m_OutlineDisplayCtrl = new wxChoice( sbShape->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OutlineDisplayCtrlNChoices, m_OutlineDisplayCtrlChoices, 0 );
61  m_OutlineDisplayCtrl->SetSelection( 0 );
62  gbSizer1->Add( m_OutlineDisplayCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
63 
64  m_MinWidthLabel = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 );
65  m_MinWidthLabel->Wrap( -1 );
66  gbSizer1->Add( m_MinWidthLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
67 
68  m_MinWidthCtrl = new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
69  gbSizer1->Add( m_MinWidthCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
70 
71  m_MinWidthUnits = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
72  m_MinWidthUnits->Wrap( -1 );
73  gbSizer1->Add( m_MinWidthUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
74 
75  m_staticTextSmoothing = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Outline smooth:"), wxDefaultPosition, wxDefaultSize, 0 );
76  m_staticTextSmoothing->Wrap( -1 );
77  gbSizer1->Add( m_staticTextSmoothing, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
78 
79  wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
80  int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
81  m_cornerSmoothingChoice = new wxChoice( sbShape->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
82  m_cornerSmoothingChoice->SetSelection( 0 );
83  gbSizer1->Add( m_cornerSmoothingChoice, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
84 
85  m_cornerRadiusLabel = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("Chamfer distance:"), wxDefaultPosition, wxDefaultSize, 0 );
86  m_cornerRadiusLabel->Wrap( -1 );
87  gbSizer1->Add( m_cornerRadiusLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
88 
89  m_cornerRadiusCtrl = new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
90  gbSizer1->Add( m_cornerRadiusCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
91 
92  m_cornerRadiusUnits = new wxStaticText( sbShape->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
93  m_cornerRadiusUnits->Wrap( -1 );
94  gbSizer1->Add( m_cornerRadiusUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
95 
96 
97  gbSizer1->AddGrowableCol( 1 );
98 
99  sbShape->Add( gbSizer1, 0, wxEXPAND, 5 );
100 
101 
102  bSizerMiddle->Add( sbShape, 1, wxEXPAND, 5 );
103 
104  wxStaticBoxSizer* sbFill;
105  sbFill = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fill") ), wxVERTICAL );
106 
107  wxFlexGridSizer* fgSizer1;
108  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
109  fgSizer1->AddGrowableCol( 1 );
110  fgSizer1->SetFlexibleDirection( wxBOTH );
111  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
112 
113  m_staticTextGridFillType = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Fill type:"), wxDefaultPosition, wxDefaultSize, 0 );
114  m_staticTextGridFillType->Wrap( -1 );
115  fgSizer1->Add( m_staticTextGridFillType, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
116 
117  wxString m_GridStyleCtrlChoices[] = { _("Solid shape"), _("HatchBorder pattern") };
118  int m_GridStyleCtrlNChoices = sizeof( m_GridStyleCtrlChoices ) / sizeof( wxString );
119  m_GridStyleCtrl = new wxChoice( sbFill->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_GridStyleCtrlNChoices, m_GridStyleCtrlChoices, 0 );
120  m_GridStyleCtrl->SetSelection( 0 );
121  fgSizer1->Add( m_GridStyleCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
122 
123 
124  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
125 
126  m_staticTextGrindOrient = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
127  m_staticTextGrindOrient->Wrap( -1 );
128  fgSizer1->Add( m_staticTextGrindOrient, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
129 
130  m_tcGridStyleOrientation = new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
131  fgSizer1->Add( m_tcGridStyleOrientation, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
132 
133  m_staticTextRotUnits = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 );
134  m_staticTextRotUnits->Wrap( -1 );
135  fgSizer1->Add( m_staticTextRotUnits, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
136 
137  m_staticTextStyleThickness = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Hatch width:"), wxDefaultPosition, wxDefaultSize, 0 );
138  m_staticTextStyleThickness->Wrap( -1 );
139  fgSizer1->Add( m_staticTextStyleThickness, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
140 
141  m_tcGridStyleThickness = new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
142  fgSizer1->Add( m_tcGridStyleThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
143 
144  m_GridStyleThicknessUnits = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
145  m_GridStyleThicknessUnits->Wrap( -1 );
146  fgSizer1->Add( m_GridStyleThicknessUnits, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
147 
148  m_staticTextGridGap = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Hatch gap:"), wxDefaultPosition, wxDefaultSize, 0 );
149  m_staticTextGridGap->Wrap( -1 );
150  fgSizer1->Add( m_staticTextGridGap, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
151 
152  m_tcGridStyleGap = new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
153  fgSizer1->Add( m_tcGridStyleGap, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
154 
155  m_GridStyleGapUnits = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
156  m_GridStyleGapUnits->Wrap( -1 );
157  fgSizer1->Add( m_GridStyleGapUnits, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
158 
159  m_staticTextGridSmoothingLevel = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Smoothing effort:"), wxDefaultPosition, wxDefaultSize, 0 );
160  m_staticTextGridSmoothingLevel->Wrap( -1 );
161  m_staticTextGridSmoothingLevel->SetToolTip( _("Value of smoothing effort\n0 = no smoothing\n1 = chamfer\n2 = round corners\n3 = round corners (finer shape)") );
162 
163  fgSizer1->Add( m_staticTextGridSmoothingLevel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
164 
165  m_spinCtrlSmoothLevel = new wxSpinCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 3, 0 );
166  fgSizer1->Add( m_spinCtrlSmoothLevel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
167 
168 
169  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
170 
171  m_staticTextGridSmootingVal = new wxStaticText( sbFill->GetStaticBox(), wxID_ANY, _("Smooth amount:"), wxDefaultPosition, wxDefaultSize, 0 );
172  m_staticTextGridSmootingVal->Wrap( -1 );
173  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)") );
174 
175  fgSizer1->Add( m_staticTextGridSmootingVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
176 
177  m_spinCtrlSmoothValue = new wxSpinCtrlDouble( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1, 0.1, 0.1 );
178  m_spinCtrlSmoothValue->SetDigits( 2 );
179  fgSizer1->Add( m_spinCtrlSmoothValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
180 
181 
182  sbFill->Add( fgSizer1, 0, wxEXPAND, 5 );
183 
184 
185  bSizerMiddle->Add( sbFill, 1, wxEXPAND|wxTOP|wxBOTTOM, 10 );
186 
187 
188  m_UpperSizer->Add( bSizerMiddle, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
189 
190 
191  m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALL, 5 );
192 
193  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
194  m_MainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
195 
196  m_sdbSizerButtons = new wxStdDialogButtonSizer();
197  m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
199  m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
201  m_sdbSizerButtons->Realize();
202 
203  m_MainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALL, 5 );
204 
205 
206  this->SetSizer( m_MainSizer );
207  this->Layout();
208 
209  this->Centre( wxBOTH );
210 
211  // Connect Events
212  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnUpdateUI ) );
213  m_layers->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this );
214  m_GridStyleCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnStyleSelection ), NULL, this );
215 }
216 
218 {
219  // Disconnect Events
220  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnUpdateUI ) );
221  m_layers->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnLayerSelection ), NULL, this );
222  m_GridStyleCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::OnStyleSelection ), NULL, this );
223 
224 }
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:83
#define NULL
#define _(s)
Definition: 3d_actions.cpp:33