KiCad PCB EDA Suite
dialog_pns_settings_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version May 6 2016)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_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( wxSize( 350,-1 ), wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxString m_modeChoices[] = { _("Highlight collisions"), _("Shove"), _("Walk around"), _("Figure out what's best") };
20  int m_modeNChoices = sizeof( m_modeChoices ) / sizeof( wxString );
21  m_mode = new wxRadioBox( this, wxID_ANY, _("Mode"), wxDefaultPosition, wxDefaultSize, m_modeNChoices, m_modeChoices, 1, wxRA_SPECIFY_COLS );
22  m_mode->SetSelection( 0 );
23  bMainSizer->Add( m_mode, 0, wxALL|wxEXPAND, 5 );
24 
25  wxStaticBoxSizer* bOptions;
26  bOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
27 
28  wxFlexGridSizer* fgSizer1;
29  fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
30  fgSizer1->AddGrowableCol( 1 );
31  fgSizer1->SetFlexibleDirection( wxBOTH );
32  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
33 
34  m_staticText4 = new wxStaticText( bOptions->GetStaticBox(), wxID_ANY, _("Mouse drag behaviour:"), wxDefaultPosition, wxDefaultSize, 0 );
35  m_staticText4->Wrap( -1 );
36  fgSizer1->Add( m_staticText4, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
37 
38  wxString m_dragToolModeChoices[] = { _("move item"), _("interactive drag") };
39  int m_dragToolModeNChoices = sizeof( m_dragToolModeChoices ) / sizeof( wxString );
40  m_dragToolMode = new wxChoice( bOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dragToolModeNChoices, m_dragToolModeChoices, 0 );
41  m_dragToolMode->SetSelection( 0 );
42  fgSizer1->Add( m_dragToolMode, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 5 );
43 
44 
45  bOptions->Add( fgSizer1, 1, wxEXPAND, 5 );
46 
47  m_freeAngleMode = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Free angle mode (no shove/walkaround)"), wxDefaultPosition, wxDefaultSize, 0 );
48  bOptions->Add( m_freeAngleMode, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
49 
50  m_shoveVias = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Shove vias"), wxDefaultPosition, wxDefaultSize, 0 );
51  m_shoveVias->Enable( false );
52  m_shoveVias->SetToolTip( _("When disabled, vias are treated as un-movable objects and hugged instead of shoved.") );
53 
54  bOptions->Add( m_shoveVias, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
55 
56  m_backPressure = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Jump over obstacles"), wxDefaultPosition, wxDefaultSize, 0 );
57  m_backPressure->SetToolTip( _("When enabled, the router tries to move colliding traces behind solid obstacles (e.g. pads) instead of \"reflecting\" back the collision") );
58 
59  bOptions->Add( m_backPressure, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
60 
61  m_removeLoops = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Remove redundant tracks"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_removeLoops->SetToolTip( _("Removes loops while routing (e.g. if the new track ensures same connectivity as an already existing one, the old track is removed).\nLoop removal works locally (only between the start and end of the currently routed trace).") );
63 
64  bOptions->Add( m_removeLoops, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
65 
66  m_autoNeckdown = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Automatic neckdown"), wxDefaultPosition, wxDefaultSize, 0 );
67  m_autoNeckdown->SetToolTip( _("When enabled, the router tries to break out pads/vias in a clean way, avoiding acute angles and jagged breakout traces.") );
68 
69  bOptions->Add( m_autoNeckdown, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
70 
71  m_smoothDragged = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Smooth dragged segments"), wxDefaultPosition, wxDefaultSize, 0 );
72  m_smoothDragged->SetToolTip( _("When enabled, the router attempts to merge several jagged segments into a single straight one (dragging mode).") );
73 
74  bOptions->Add( m_smoothDragged, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
75 
76  m_violateDrc = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Allow DRC violations"), wxDefaultPosition, wxDefaultSize, 0 );
77  m_violateDrc->SetToolTip( _("(Highlight collisions mode only) - allows to establish a track even if is violating the DRC rules.") );
78 
79  bOptions->Add( m_violateDrc, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
80 
81  m_suggestEnding = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Suggest track finish"), wxDefaultPosition, wxDefaultSize, 0 );
82  m_suggestEnding->Enable( false );
83 
84  bOptions->Add( m_suggestEnding, 0, wxALL, 5 );
85 
86  m_staticline1 = new wxStaticLine( bOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
87  bOptions->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
88 
89  wxBoxSizer* bEffort;
90  bEffort = new wxBoxSizer( wxHORIZONTAL );
91 
92  m_effortLabel = new wxStaticText( bOptions->GetStaticBox(), wxID_ANY, _("Optimizer effort"), wxDefaultPosition, wxDefaultSize, 0 );
93  m_effortLabel->Wrap( -1 );
94  m_effortLabel->SetToolTip( _("Defines how much time the router shall spend optimizing the routed/shoved traces.\nMore effort means cleaner routing (but slower), less effort means faster routing but somewhat jagged traces.") );
95 
96  bEffort->Add( m_effortLabel, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
97 
98 
99  bEffort->Add( 0, 0, 0, wxEXPAND, 5 );
100 
101  wxBoxSizer* bSlider;
102  bSlider = new wxBoxSizer( wxVERTICAL );
103 
104  m_effort = new wxSlider( bOptions->GetStaticBox(), wxID_ANY, 1, 0, 2, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_BOTTOM|wxSL_HORIZONTAL|wxSL_TOP );
105  bSlider->Add( m_effort, 1, wxEXPAND, 5 );
106 
107  wxBoxSizer* bSliderLabels;
108  bSliderLabels = new wxBoxSizer( wxHORIZONTAL );
109 
110  m_lowLabel = new wxStaticText( bOptions->GetStaticBox(), wxID_ANY, _("low"), wxDefaultPosition, wxDefaultSize, 0 );
111  m_lowLabel->Wrap( -1 );
112  m_lowLabel->SetFont( wxFont( 8, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
113 
114  bSliderLabels->Add( m_lowLabel, 0, 0, 5 );
115 
116 
117  bSliderLabels->Add( 0, 0, 1, wxEXPAND, 5 );
118 
119  m_highLabel = new wxStaticText( bOptions->GetStaticBox(), wxID_ANY, _("high"), wxDefaultPosition, wxDefaultSize, 0 );
120  m_highLabel->Wrap( -1 );
121  m_highLabel->SetFont( wxFont( 8, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
122 
123  bSliderLabels->Add( m_highLabel, 0, 0, 5 );
124 
125 
126  bSlider->Add( bSliderLabels, 1, wxEXPAND, 5 );
127 
128 
129  bEffort->Add( bSlider, 1, wxEXPAND, 5 );
130 
131 
132  bOptions->Add( bEffort, 0, wxEXPAND, 5 );
133 
134 
135  bMainSizer->Add( bOptions, 1, wxEXPAND|wxALL, 5 );
136 
137  m_stdButtons = new wxStdDialogButtonSizer();
138  m_stdButtonsOK = new wxButton( this, wxID_OK );
139  m_stdButtons->AddButton( m_stdButtonsOK );
140  m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
141  m_stdButtons->AddButton( m_stdButtonsCancel );
142  m_stdButtons->Realize();
143 
144  bMainSizer->Add( m_stdButtons, 0, wxALL|wxEXPAND, 5 );
145 
146 
147  this->SetSizer( bMainSizer );
148  this->Layout();
149 
150  // Connect Events
151  m_freeAngleMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::onFreeAngleModeChange ), NULL, this );
152  m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnOkClick ), NULL, this );
153 }
154 
156 {
157  // Disconnect Events
158  m_freeAngleMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::onFreeAngleModeChange ), NULL, this );
159  m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PNS_SETTINGS_BASE::OnOkClick ), NULL, this );
160 
161 }
virtual void onFreeAngleModeChange(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
DIALOG_PNS_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Interactive Router Settings"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(377, 460), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnOkClick(wxCommandEvent &event)
wxStdDialogButtonSizer * m_stdButtons