KiCad PCB EDA Suite
dialog_general_options_BoardEditor_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_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* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bSizerUpper;
20  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxBoxSizer* bLeftSizer;
23  bLeftSizer = new wxBoxSizer( wxVERTICAL );
24 
25  wxFlexGridSizer* fgSizer1;
26  fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
27  fgSizer1->AddGrowableCol( 1 );
28  fgSizer1->SetFlexibleDirection( wxBOTH );
29  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
30 
31  m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("&Auto save (minutes):"), wxDefaultPosition, wxDefaultSize, 0 );
32  m_staticTextautosave->Wrap( -1 );
33  fgSizer1->Add( m_staticTextautosave, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
34 
35  m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 60, 0 );
36  m_SaveTime->SetToolTip( _("Delay after the first change to create a backup file of the board on disk. If set to 0, auto backup is disabled.") );
37 
38  fgSizer1->Add( m_SaveTime, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
39 
40 
41  bLeftSizer->Add( fgSizer1, 0, wxALL|wxEXPAND, 5 );
42 
43  wxStaticBoxSizer* sbSizer5;
44  sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface:") ), wxVERTICAL );
45 
46  wxFlexGridSizer* fgSizer11;
47  fgSizer11 = new wxFlexGridSizer( 0, 3, 0, 0 );
48  fgSizer11->AddGrowableCol( 1 );
49  fgSizer11->SetFlexibleDirection( wxBOTH );
50  fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
51 
52  m_staticText1 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
53  m_staticText1->Wrap( -1 );
54  fgSizer11->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
55 
56  m_scaleSlider = new STEPPED_SLIDER( sbSizer5->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
57  fgSizer11->Add( m_scaleSlider, 0, wxBOTTOM|wxEXPAND, 4 );
58 
59  m_staticText2 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
60  m_staticText2->Wrap( -1 );
61  fgSizer11->Add( m_staticText2, 0, wxALIGN_BOTTOM|wxBOTTOM, 2 );
62 
63 
64  fgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
65 
66  m_scaleAuto = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Auto"), wxDefaultPosition, wxDefaultSize, 0 );
67  fgSizer11->Add( m_scaleAuto, 0, wxLEFT, 9 );
68 
69 
70  fgSizer11->Add( 0, 0, 1, wxEXPAND, 5 );
71 
72 
73  sbSizer5->Add( fgSizer11, 0, wxALL|wxEXPAND, 5 );
74 
75  m_checkBoxIconsInMenus = new wxCheckBox( sbSizer5->GetStaticBox(), wxID_ANY, _("Show icons in menus"), wxDefaultPosition, wxDefaultSize, 0 );
76  sbSizer5->Add( m_checkBoxIconsInMenus, 0, wxALL, 5 );
77 
78 
79  bLeftSizer->Add( sbSizer5, 1, wxALL|wxEXPAND, 5 );
80 
81  wxStaticBoxSizer* sbSizer2PAN;
82  sbSizer2PAN = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
83 
84  m_ZoomCenterOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Ce&nter and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
85  m_ZoomCenterOpt->SetToolTip( _("Center the cursor on screen when zooming.") );
86 
87  sbSizer2PAN->Add( m_ZoomCenterOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
88 
89  m_MousewheelPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Use touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
90  m_MousewheelPANOpt->SetToolTip( _("Enable touchpad-friendly controls (pan with scroll action, zoom with Ctrl+scroll).") );
91 
92  sbSizer2PAN->Add( m_MousewheelPANOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
93 
94  m_AutoPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_AUTOPAN, _("&Pan while moving object"), wxDefaultPosition, wxDefaultSize, 0 );
95  m_AutoPANOpt->SetToolTip( _("When drawing a track or moving an item, pan when approaching the edge of the display.") );
96 
97  sbSizer2PAN->Add( m_AutoPANOpt, 0, wxALL, 5 );
98 
99 
100  bLeftSizer->Add( sbSizer2PAN, 1, wxEXPAND|wxALL, 5 );
101 
102 
103  bSizerUpper->Add( bLeftSizer, 2, wxALL|wxEXPAND, 5 );
104 
105  wxBoxSizer* bMiddleLeftSizer;
106  bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
107 
108  wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
109  int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
110  m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
111  m_PolarDisplay->SetSelection( 0 );
112  m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") );
113 
114  bMiddleLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
115 
116  wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
117  int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
118  m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
119  m_UnitsSelection->SetSelection( 0 );
120  m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") );
121 
122  bMiddleLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 );
123 
124  wxStaticBoxSizer* bOptionsSizer;
125  bOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
126 
127  m_ShowGlobalRatsnest = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_GENERAL_RATSNEST, _("&Show ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
128  m_ShowGlobalRatsnest->SetValue(true);
129  m_ShowGlobalRatsnest->SetToolTip( _("Show the full ratsnest.") );
130 
131  bOptionsSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 );
132 
133  m_Show_Page_Limits = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
134  m_Show_Page_Limits->SetValue(true);
135  bOptionsSizer->Add( m_Show_Page_Limits, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
136 
137 
138  bOptionsSizer->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
139 
140  m_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
141  m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
142 
143  bOptionsSizer->Add( m_Segments_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
144 
145  m_UseEditKeyForWidth = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Edit action changes track width"), wxDefaultPosition, wxDefaultSize, 0 );
146  m_UseEditKeyForWidth->SetToolTip( _("When active, hitting Edit hotkey or double-clicking on a track or via changes its width/diameter to the one selected in the main toolbar. ") );
147 
148  bOptionsSizer->Add( m_UseEditKeyForWidth, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
149 
150  wxFlexGridSizer* fgSizer12;
151  fgSizer12 = new wxFlexGridSizer( 0, 2, 0, 0 );
152  fgSizer12->AddGrowableCol( 1 );
153  fgSizer12->SetFlexibleDirection( wxBOTH );
154  fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
155 
156  m_staticTextRotationAngle = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 );
157  m_staticTextRotationAngle->Wrap( -1 );
158  fgSizer12->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
159 
160  m_RotationAngle = new wxTextCtrl( bOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
161  m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") );
162 
163  fgSizer12->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
164 
165 
166  bOptionsSizer->Add( fgSizer12, 1, wxEXPAND, 5 );
167 
168 
169  bMiddleLeftSizer->Add( bOptionsSizer, 1, wxEXPAND|wxALL, 5 );
170 
171 
172  bSizerUpper->Add( bMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 );
173 
174  wxBoxSizer* bRightSizer;
175  bRightSizer = new wxBoxSizer( wxVERTICAL );
176 
177  wxString m_MagneticPadOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
178  int m_MagneticPadOptCtrlNChoices = sizeof( m_MagneticPadOptCtrlChoices ) / sizeof( wxString );
179  m_MagneticPadOptCtrl = new wxRadioBox( this, wxID_ANY, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, m_MagneticPadOptCtrlNChoices, m_MagneticPadOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
180  m_MagneticPadOptCtrl->SetSelection( 2 );
181  m_MagneticPadOptCtrl->SetToolTip( _("Control capture of the cursor when the mouse enters a pad area.") );
182 
183  bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxALL|wxEXPAND, 5 );
184 
185  wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
186  int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString );
187  m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
188  m_MagneticTrackOptCtrl->SetSelection( 0 );
189  m_MagneticTrackOptCtrl->SetToolTip( _("Control capture of the cursor when the mouse approaches a track.") );
190 
191  bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 );
192 
193  wxStaticBoxSizer* bLegacyOptionsSizer;
194  bLegacyOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Legacy Routing Options") ), wxVERTICAL );
195 
196  m_DrcOn = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_DRC_ONOFF, _("&Enforce design rules when routing"), wxDefaultPosition, wxDefaultSize, 0 );
197  m_DrcOn->SetValue(true);
198  m_DrcOn->SetToolTip( _("Enable DRC control. When DRC control is disabled, all connections are allowed.") );
199 
200  bLegacyOptionsSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 );
201 
202  m_TrackAutodel = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACK_AUTODEL, _("&Delete unconnected tracks"), wxDefaultPosition, wxDefaultSize, 0 );
203  m_TrackAutodel->SetValue(true);
204  m_TrackAutodel->SetToolTip( _("Enable automatic track deletion when redrawing a track.") );
205 
206  bLegacyOptionsSizer->Add( m_TrackAutodel, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
207 
208  m_Track_45_Only_Ctrl = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACKS45, _("&Limit tracks to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
209  m_Track_45_Only_Ctrl->SetValue(true);
210  m_Track_45_Only_Ctrl->SetToolTip( _("Force track directions to H, V or 45 degrees when drawing a track.") );
211 
212  bLegacyOptionsSizer->Add( m_Track_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
213 
214  m_Track_DoubleSegm_Ctrl = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_ANY, _("&Use double segmented tracks"), wxDefaultPosition, wxDefaultSize, 0 );
215  m_Track_DoubleSegm_Ctrl->SetValue(true);
216  m_Track_DoubleSegm_Ctrl->SetToolTip( _("Use two track segments, with 45 degrees angle between them, when drawing a new track ") );
217 
218  bLegacyOptionsSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
219 
220 
221  bRightSizer->Add( bLegacyOptionsSizer, 1, wxEXPAND|wxALL, 5 );
222 
223 
224  bSizerUpper->Add( bRightSizer, 0, wxALL|wxEXPAND, 5 );
225 
226 
227  bMainSizer->Add( bSizerUpper, 0, wxEXPAND, 5 );
228 
229  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
230  bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
231 
232  m_sdbSizer = new wxStdDialogButtonSizer();
233  m_sdbSizerOK = new wxButton( this, wxID_OK );
234  m_sdbSizer->AddButton( m_sdbSizerOK );
235  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
236  m_sdbSizer->AddButton( m_sdbSizerCancel );
237  m_sdbSizer->Realize();
238 
239  bMainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
240 
241 
242  this->SetSizer( bMainSizer );
243  this->Layout();
244  bMainSizer->Fit( this );
245 
246  // Connect Events
247  m_scaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
248  m_scaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
249  m_scaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
250  m_scaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
251  m_scaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
252  m_scaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
253  m_scaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
254  m_scaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
255  m_scaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
256  m_scaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleAuto ), NULL, this );
257  m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnCancelClick ), NULL, this );
258  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnOkClick ), NULL, this );
259 }
260 
262 {
263  // Disconnect Events
264  m_scaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
265  m_scaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
266  m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
267  m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
268  m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
269  m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
270  m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
271  m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
272  m_scaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleSlider ), NULL, this );
273  m_scaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnScaleAuto ), NULL, this );
274  m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnCancelClick ), NULL, this );
275  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnOkClick ), NULL, this );
276 
277 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("General Settings"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Customized wxSlider with forced stepping.