KiCad PCB EDA Suite
PANEL_PCBNEW_SETTINGS_BASE Class Reference

Class PANEL_PCBNEW_SETTINGS_BASE. More...

#include <panel_pcbnew_settings_base.h>

Inheritance diagram for PANEL_PCBNEW_SETTINGS_BASE:
PANEL_PCBNEW_SETTINGS

Public Member Functions

 PANEL_PCBNEW_SETTINGS_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_PCBNEW_SETTINGS_BASE ()
 

Protected Types

enum  {
  wxID_POLAR_CTRL = 1000, wxID_UNITS, wxID_SEGMENTS45, wxID_DRC_ONOFF,
  wxID_TRACK_AUTODEL, wxID_TRACKS45
}
 

Protected Attributes

wxRadioBox * m_PolarDisplay
 
wxRadioBox * m_UnitsSelection
 
wxCheckBox * m_Show_Page_Limits
 
wxCheckBox * m_Segments_45_Only_Ctrl
 
wxCheckBox * m_UseEditKeyForWidth
 
wxCheckBox * m_dragSelects
 
wxStaticText * m_staticTextRotationAngle
 
wxTextCtrl * m_RotationAngle
 
wxStaticText * m_staticText2
 
wxChoice * m_magneticPadChoice
 
wxStaticText * m_staticText21
 
wxChoice * m_magneticTrackChoice
 
wxStaticText * m_staticText211
 
wxChoice * m_magneticGraphicsChoice
 
wxCheckBox * m_DrcOn
 
wxCheckBox * m_TrackAutodel
 
wxCheckBox * m_Track_45_Only_Ctrl
 
wxCheckBox * m_Track_DoubleSegm_Ctrl
 

Detailed Description

Class PANEL_PCBNEW_SETTINGS_BASE.

Definition at line 32 of file panel_pcbnew_settings_base.h.

Member Enumeration Documentation

◆ anonymous enum

Constructor & Destructor Documentation

◆ PANEL_PCBNEW_SETTINGS_BASE()

PANEL_PCBNEW_SETTINGS_BASE::PANEL_PCBNEW_SETTINGS_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( -1,-1 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 12 of file panel_pcbnew_settings_base.cpp.

12  : wxPanel( parent, id, pos, size, style, name )
13 {
14  wxBoxSizer* bPanelSizer;
15  bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
16 
17  wxBoxSizer* bMargins;
18  bMargins = new wxBoxSizer( wxHORIZONTAL );
19 
20  wxBoxSizer* bMiddleLeftSizer;
21  bMiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
22 
23  wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
24  int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
25  m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
26  m_PolarDisplay->SetSelection( 0 );
27  m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") );
28 
29  bMiddleLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
30 
31  wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
32  int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
33  m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
34  m_UnitsSelection->SetSelection( 0 );
35  m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") );
36 
37  bMiddleLeftSizer->Add( m_UnitsSelection, 0, wxALL|wxEXPAND, 5 );
38 
39  wxStaticBoxSizer* bOptionsSizer;
40  bOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Editing Options") ), wxVERTICAL );
41 
42  m_Show_Page_Limits = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
43  m_Show_Page_Limits->SetValue(true);
44  bOptionsSizer->Add( m_Show_Page_Limits, 0, wxALL, 5 );
45 
46  m_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
47  m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
48 
49  bOptionsSizer->Add( m_Segments_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
50 
51  m_UseEditKeyForWidth = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Edit action changes track width"), wxDefaultPosition, wxDefaultSize, 0 );
52  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. ") );
53 
54  bOptionsSizer->Add( m_UseEditKeyForWidth, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
55 
56  m_dragSelects = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Prefer selection to dragging"), wxDefaultPosition, wxDefaultSize, 0 );
57  m_dragSelects->SetToolTip( _("When enabled and nothing is selected, drag gesture will draw a selection box, even if there are items under the cursor that could be immediately dragged.") );
58 
59  bOptionsSizer->Add( m_dragSelects, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
60 
61  wxFlexGridSizer* fgSizer12;
62  fgSizer12 = new wxFlexGridSizer( 0, 2, 0, 0 );
63  fgSizer12->AddGrowableCol( 1 );
64  fgSizer12->SetFlexibleDirection( wxBOTH );
65  fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
66 
67  m_staticTextRotationAngle = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 );
68  m_staticTextRotationAngle->Wrap( -1 );
69  fgSizer12->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
70 
71  m_RotationAngle = new wxTextCtrl( bOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
72  m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") );
73 
74  fgSizer12->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
75 
76 
77  bOptionsSizer->Add( fgSizer12, 1, wxEXPAND, 5 );
78 
79 
80  bMiddleLeftSizer->Add( bOptionsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
81 
82 
83  bMargins->Add( bMiddleLeftSizer, 1, wxEXPAND|wxRIGHT, 5 );
84 
85  wxBoxSizer* bRightSizer;
86  bRightSizer = new wxBoxSizer( wxVERTICAL );
87 
88  wxStaticBoxSizer* sbMagnets;
89  sbMagnets = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Magnetic Points") ), wxVERTICAL );
90 
91  wxFlexGridSizer* fgSizer2;
92  fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 15 );
93  fgSizer2->SetFlexibleDirection( wxVERTICAL );
94  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
95 
96  m_staticText2 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to Pads"), wxDefaultPosition, wxDefaultSize, 0 );
97  m_staticText2->Wrap( -1 );
98  m_staticText2->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
99 
100  fgSizer2->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
101 
102  wxString m_magneticPadChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
103  int m_magneticPadChoiceNChoices = sizeof( m_magneticPadChoiceChoices ) / sizeof( wxString );
104  m_magneticPadChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticPadChoiceNChoices, m_magneticPadChoiceChoices, 0 );
105  m_magneticPadChoice->SetSelection( 1 );
106  m_magneticPadChoice->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
107 
108  fgSizer2->Add( m_magneticPadChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
109 
110  m_staticText21 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to Tracks"), wxDefaultPosition, wxDefaultSize, 0 );
111  m_staticText21->Wrap( -1 );
112  m_staticText21->SetToolTip( _("Capture cursor when the mouse approaches a track") );
113 
114  fgSizer2->Add( m_staticText21, 0, wxALL, 5 );
115 
116  wxString m_magneticTrackChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
117  int m_magneticTrackChoiceNChoices = sizeof( m_magneticTrackChoiceChoices ) / sizeof( wxString );
118  m_magneticTrackChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticTrackChoiceNChoices, m_magneticTrackChoiceChoices, 0 );
119  m_magneticTrackChoice->SetSelection( 1 );
120  m_magneticTrackChoice->SetToolTip( _("Capture cursor when the mouse approaches a track") );
121 
122  fgSizer2->Add( m_magneticTrackChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
123 
124  m_staticText211 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to Graphical"), wxDefaultPosition, wxDefaultSize, 0 );
125  m_staticText211->Wrap( -1 );
126  m_staticText211->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
127 
128  fgSizer2->Add( m_staticText211, 0, wxALL, 5 );
129 
130  wxString m_magneticGraphicsChoiceChoices[] = { _("Yes"), _("No") };
131  int m_magneticGraphicsChoiceNChoices = sizeof( m_magneticGraphicsChoiceChoices ) / sizeof( wxString );
132  m_magneticGraphicsChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticGraphicsChoiceNChoices, m_magneticGraphicsChoiceChoices, 0 );
133  m_magneticGraphicsChoice->SetSelection( 0 );
134  m_magneticGraphicsChoice->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
135 
136  fgSizer2->Add( m_magneticGraphicsChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
137 
138 
139  sbMagnets->Add( fgSizer2, 1, wxEXPAND, 5 );
140 
141 
142  bRightSizer->Add( sbMagnets, 1, wxEXPAND, 5 );
143 
144  wxStaticBoxSizer* bLegacyOptionsSizer;
145  bLegacyOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Legacy Toolset Routing Options") ), wxVERTICAL );
146 
147  m_DrcOn = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_DRC_ONOFF, _("&Enforce design rules when routing"), wxDefaultPosition, wxDefaultSize, 0 );
148  m_DrcOn->SetValue(true);
149  m_DrcOn->SetToolTip( _("Enable DRC control. When DRC control is disabled, all connections are allowed.") );
150 
151  bLegacyOptionsSizer->Add( m_DrcOn, 0, wxEXPAND|wxALL, 5 );
152 
153  m_TrackAutodel = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACK_AUTODEL, _("Auto-delete old tracks"), wxDefaultPosition, wxDefaultSize, 0 );
154  m_TrackAutodel->SetValue(true);
155  m_TrackAutodel->SetToolTip( _("Enable automatic track deletion when redrawing a track.") );
156 
157  bLegacyOptionsSizer->Add( m_TrackAutodel, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
158 
159  m_Track_45_Only_Ctrl = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACKS45, _("&Limit tracks to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
160  m_Track_45_Only_Ctrl->SetValue(true);
161  m_Track_45_Only_Ctrl->SetToolTip( _("Force track directions to H, V or 45 degrees when drawing a track.") );
162 
163  bLegacyOptionsSizer->Add( m_Track_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
164 
165  m_Track_DoubleSegm_Ctrl = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_ANY, _("&Use double segmented tracks"), wxDefaultPosition, wxDefaultSize, 0 );
166  m_Track_DoubleSegm_Ctrl->SetValue(true);
167  m_Track_DoubleSegm_Ctrl->SetToolTip( _("Use two track segments, with 45 degrees angle between them, when drawing a new track") );
168 
169  bLegacyOptionsSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
170 
171 
172  bRightSizer->Add( bLegacyOptionsSizer, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
173 
174 
175  bMargins->Add( bRightSizer, 1, wxEXPAND|wxRIGHT, 5 );
176 
177 
178  bPanelSizer->Add( bMargins, 1, wxRIGHT, 5 );
179 
180 
181  this->SetSizer( bPanelSizer );
182  this->Layout();
183  bPanelSizer->Fit( this );
184 }
const char * name
Definition: DXF_plotter.cpp:61

References m_dragSelects, m_DrcOn, m_magneticGraphicsChoice, m_magneticPadChoice, m_magneticTrackChoice, m_PolarDisplay, m_RotationAngle, m_Segments_45_Only_Ctrl, m_Show_Page_Limits, m_staticText2, m_staticText21, m_staticText211, m_staticTextRotationAngle, m_Track_45_Only_Ctrl, m_Track_DoubleSegm_Ctrl, m_TrackAutodel, m_UnitsSelection, m_UseEditKeyForWidth, wxID_DRC_ONOFF, wxID_POLAR_CTRL, wxID_SEGMENTS45, wxID_TRACK_AUTODEL, wxID_TRACKS45, and wxID_UNITS.

◆ ~PANEL_PCBNEW_SETTINGS_BASE()

PANEL_PCBNEW_SETTINGS_BASE::~PANEL_PCBNEW_SETTINGS_BASE ( )

Definition at line 186 of file panel_pcbnew_settings_base.cpp.

187 {
188 }

Member Data Documentation

◆ m_dragSelects

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_dragSelects
protected

◆ m_DrcOn

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_DrcOn
protected

◆ m_magneticGraphicsChoice

wxChoice* PANEL_PCBNEW_SETTINGS_BASE::m_magneticGraphicsChoice
protected

◆ m_magneticPadChoice

wxChoice* PANEL_PCBNEW_SETTINGS_BASE::m_magneticPadChoice
protected

◆ m_magneticTrackChoice

wxChoice* PANEL_PCBNEW_SETTINGS_BASE::m_magneticTrackChoice
protected

◆ m_PolarDisplay

wxRadioBox* PANEL_PCBNEW_SETTINGS_BASE::m_PolarDisplay
protected

◆ m_RotationAngle

wxTextCtrl* PANEL_PCBNEW_SETTINGS_BASE::m_RotationAngle
protected

◆ m_Segments_45_Only_Ctrl

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_Segments_45_Only_Ctrl
protected

◆ m_Show_Page_Limits

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_Show_Page_Limits
protected

◆ m_staticText2

wxStaticText* PANEL_PCBNEW_SETTINGS_BASE::m_staticText2
protected

Definition at line 55 of file panel_pcbnew_settings_base.h.

Referenced by PANEL_PCBNEW_SETTINGS_BASE().

◆ m_staticText21

wxStaticText* PANEL_PCBNEW_SETTINGS_BASE::m_staticText21
protected

Definition at line 57 of file panel_pcbnew_settings_base.h.

Referenced by PANEL_PCBNEW_SETTINGS_BASE().

◆ m_staticText211

wxStaticText* PANEL_PCBNEW_SETTINGS_BASE::m_staticText211
protected

Definition at line 59 of file panel_pcbnew_settings_base.h.

Referenced by PANEL_PCBNEW_SETTINGS_BASE().

◆ m_staticTextRotationAngle

wxStaticText* PANEL_PCBNEW_SETTINGS_BASE::m_staticTextRotationAngle
protected

Definition at line 53 of file panel_pcbnew_settings_base.h.

Referenced by PANEL_PCBNEW_SETTINGS_BASE().

◆ m_Track_45_Only_Ctrl

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_Track_45_Only_Ctrl
protected

◆ m_Track_DoubleSegm_Ctrl

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_Track_DoubleSegm_Ctrl
protected

◆ m_TrackAutodel

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_TrackAutodel
protected

◆ m_UnitsSelection

wxRadioBox* PANEL_PCBNEW_SETTINGS_BASE::m_UnitsSelection
protected

◆ m_UseEditKeyForWidth

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_UseEditKeyForWidth
protected

The documentation for this class was generated from the following files: