KiCad PCB EDA Suite
dialog_general_options_BoardEditor_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 17 2015)
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  wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
26  int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
27  m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
28  m_PolarDisplay->SetSelection( 0 );
29  m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") );
30 
31  bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
32 
33  wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
34  int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
35  m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
36  m_UnitsSelection->SetSelection( 1 );
37  m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") );
38 
39  bLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 );
40 
41 
42  bSizerUpper->Add( bLeftSizer, 2, wxALL|wxEXPAND, 5 );
43 
44  wxBoxSizer* bMiddleLeftSizer;
45  bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
46 
47  wxFlexGridSizer* fgSizer1;
48  fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
49  fgSizer1->SetFlexibleDirection( wxBOTH );
50  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
51 
52  m_staticTextautosave = new wxStaticText( this, wxID_ANY, _("&Auto save (minutes):"), wxDefaultPosition, wxDefaultSize, 0 );
53  m_staticTextautosave->Wrap( -1 );
54  fgSizer1->Add( m_staticTextautosave, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
55 
56  m_SaveTime = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 60, 0 );
57  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.") );
58 
59  fgSizer1->Add( m_SaveTime, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
60 
61  m_staticTextRotationAngle = new wxStaticText( this, wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_staticTextRotationAngle->Wrap( -1 );
63  fgSizer1->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
64 
65  m_RotationAngle = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
66  m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") );
67 
68  fgSizer1->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
69 
70 
71  bMiddleLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
72 
73  wxStaticBoxSizer* bOptionsSizer;
74  bOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
75 
76  m_ShowGlobalRatsnest = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_GENERAL_RATSNEST, _("&Show ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
77  m_ShowGlobalRatsnest->SetValue(true);
78  m_ShowGlobalRatsnest->SetToolTip( _("Show the full ratsnest.") );
79 
80  bOptionsSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 );
81 
82  m_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
83  m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
84 
85  bOptionsSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 );
86 
87  m_UseEditKeyForWidth = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Edit action changes track width"), wxDefaultPosition, wxDefaultSize, 0 );
88  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. ") );
89 
90  bOptionsSizer->Add( m_UseEditKeyForWidth, 0, wxALL, 5 );
91 
92 
93  bMiddleLeftSizer->Add( bOptionsSizer, 1, wxEXPAND|wxALL, 5 );
94 
95  wxStaticBoxSizer* bLegacyOptionsSizer;
96  bLegacyOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Legacy Routing Options") ), wxVERTICAL );
97 
98  m_DrcOn = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_DRC_ONOFF, _("&Enforce design rules when routing"), wxDefaultPosition, wxDefaultSize, 0 );
99  m_DrcOn->SetValue(true);
100  m_DrcOn->SetToolTip( _("Enable DRC control. When DRC control is disabled, all connections are allowed.") );
101 
102  bLegacyOptionsSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 );
103 
104  m_TrackAutodel = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACK_AUTODEL, _("&Delete unconnected tracks"), wxDefaultPosition, wxDefaultSize, 0 );
105  m_TrackAutodel->SetValue(true);
106  m_TrackAutodel->SetToolTip( _("Enable automatic track deletion when redrawing a track.") );
107 
108  bLegacyOptionsSizer->Add( m_TrackAutodel, 0, wxALL, 5 );
109 
110  m_Track_45_Only_Ctrl = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACKS45, _("&Limit tracks to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
111  m_Track_45_Only_Ctrl->SetValue(true);
112  m_Track_45_Only_Ctrl->SetToolTip( _("Force track directions to H, V or 45 degrees when drawing a track.") );
113 
114  bLegacyOptionsSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 );
115 
116  m_Track_DoubleSegm_Ctrl = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_ANY, _("&Use double segmented tracks"), wxDefaultPosition, wxDefaultSize, 0 );
117  m_Track_DoubleSegm_Ctrl->SetValue(true);
118  m_Track_DoubleSegm_Ctrl->SetToolTip( _("Use two track segments, with 45 degrees angle between them, when drawing a new track ") );
119 
120  bLegacyOptionsSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 );
121 
122 
123  bMiddleLeftSizer->Add( bLegacyOptionsSizer, 0, wxEXPAND|wxALL, 5 );
124 
125 
126  bSizerUpper->Add( bMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 );
127 
128  wxBoxSizer* bRightSizer;
129  bRightSizer = new wxBoxSizer( wxVERTICAL );
130 
131  wxString m_MagneticPadOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
132  int m_MagneticPadOptCtrlNChoices = sizeof( m_MagneticPadOptCtrlChoices ) / sizeof( wxString );
133  m_MagneticPadOptCtrl = new wxRadioBox( this, wxID_ANY, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, m_MagneticPadOptCtrlNChoices, m_MagneticPadOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
134  m_MagneticPadOptCtrl->SetSelection( 2 );
135  m_MagneticPadOptCtrl->SetToolTip( _("Control capture of the cursor when the mouse enters a pad area.") );
136 
137  bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxALL|wxEXPAND, 5 );
138 
139  wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
140  int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString );
141  m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
142  m_MagneticTrackOptCtrl->SetSelection( 0 );
143  m_MagneticTrackOptCtrl->SetToolTip( _("Control capture of the cursor when the mouse approaches a track.") );
144 
145  bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxALL|wxEXPAND, 5 );
146 
147  wxStaticBoxSizer* sbSizer2PAN;
148  sbSizer2PAN = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
149 
150  m_ZoomCenterOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Ce&nter and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
151  m_ZoomCenterOpt->SetToolTip( _("Center the cursor on screen when zooming.") );
152 
153  sbSizer2PAN->Add( m_ZoomCenterOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
154 
155  m_MousewheelPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_ANY, _("Use touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
156  m_MousewheelPANOpt->SetToolTip( _("Enable touchpad-friendly controls (pan with scroll action, zoom with Ctrl+scroll).") );
157 
158  sbSizer2PAN->Add( m_MousewheelPANOpt, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
159 
160  m_AutoPANOpt = new wxCheckBox( sbSizer2PAN->GetStaticBox(), wxID_AUTOPAN, _("&Pan while moving object"), wxDefaultPosition, wxDefaultSize, 0 );
161  m_AutoPANOpt->SetToolTip( _("When drawing a track or moving an item, pan when approaching the edge of the display.") );
162 
163  sbSizer2PAN->Add( m_AutoPANOpt, 0, wxALL, 5 );
164 
165 
166  bRightSizer->Add( sbSizer2PAN, 1, wxEXPAND|wxALL, 5 );
167 
168 
169  bSizerUpper->Add( bRightSizer, 0, wxALL|wxEXPAND, 5 );
170 
171 
172  bMainSizer->Add( bSizerUpper, 0, wxEXPAND, 5 );
173 
174  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
175  bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
176 
177  m_sdbSizer = new wxStdDialogButtonSizer();
178  m_sdbSizerOK = new wxButton( this, wxID_OK );
179  m_sdbSizer->AddButton( m_sdbSizerOK );
180  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
181  m_sdbSizer->AddButton( m_sdbSizerCancel );
182  m_sdbSizer->Realize();
183 
184  bMainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
185 
186 
187  this->SetSizer( bMainSizer );
188  this->Layout();
189  bMainSizer->Fit( this );
190 
191  // Connect Events
192  m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnCancelClick ), NULL, this );
193  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnOkClick ), NULL, this );
194 }
195 
197 {
198  // Disconnect Events
199  m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnCancelClick ), NULL, this );
200  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::OnOkClick ), NULL, this );
201 
202 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
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)