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 }
 

Protected Attributes

wxRadioBox * m_PolarDisplay
 
wxRadioBox * m_UnitsSelection
 
wxCheckBox * m_Segments_45_Only_Ctrl
 
wxCheckBox * m_UseEditKeyForWidth
 
wxCheckBox * m_FlipLeftRight
 
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_showGlobalRatsnest
 
wxCheckBox * m_showSelectedRatsnest
 
wxCheckBox * m_OptDisplayCurvedRatsnestLines
 
wxCheckBox * m_Show_Page_Limits
 

Detailed Description

Class PANEL_PCBNEW_SETTINGS_BASE.

Definition at line 32 of file panel_pcbnew_settings_base.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

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_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
43  m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
44 
45  bOptionsSizer->Add( m_Segments_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
46 
47  m_UseEditKeyForWidth = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Edit hotkey changes track width"), wxDefaultPosition, wxDefaultSize, 0 );
48  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. ") );
49 
50  bOptionsSizer->Add( m_UseEditKeyForWidth, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
51 
52  m_FlipLeftRight = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Flip board items L/R (default is T/B)"), wxDefaultPosition, wxDefaultSize, 0 );
53  bOptionsSizer->Add( m_FlipLeftRight, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
54 
55  wxFlexGridSizer* fgSizer12;
56  fgSizer12 = new wxFlexGridSizer( 0, 2, 0, 0 );
57  fgSizer12->AddGrowableCol( 1 );
58  fgSizer12->SetFlexibleDirection( wxBOTH );
59  fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
60 
61  m_staticTextRotationAngle = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_staticTextRotationAngle->Wrap( -1 );
63  fgSizer12->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
64 
65  m_RotationAngle = new wxTextCtrl( bOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
66  m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") );
67 
68  fgSizer12->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
69 
70 
71  bOptionsSizer->Add( fgSizer12, 1, wxEXPAND, 5 );
72 
73 
74  bMiddleLeftSizer->Add( bOptionsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
75 
76 
77  bMargins->Add( bMiddleLeftSizer, 1, wxEXPAND|wxRIGHT, 5 );
78 
79  wxBoxSizer* bRightSizer;
80  bRightSizer = new wxBoxSizer( wxVERTICAL );
81 
82  wxStaticBoxSizer* sbMagnets;
83  sbMagnets = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Magnetic Points") ), wxVERTICAL );
84 
85  wxFlexGridSizer* fgSizer2;
86  fgSizer2 = new wxFlexGridSizer( 0, 2, 3, 0 );
87  fgSizer2->SetFlexibleDirection( wxBOTH );
88  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
89 
90  m_staticText2 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to pads:"), wxDefaultPosition, wxDefaultSize, 0 );
91  m_staticText2->Wrap( -1 );
92  m_staticText2->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
93 
94  fgSizer2->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
95 
96  wxString m_magneticPadChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
97  int m_magneticPadChoiceNChoices = sizeof( m_magneticPadChoiceChoices ) / sizeof( wxString );
98  m_magneticPadChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticPadChoiceNChoices, m_magneticPadChoiceChoices, 0 );
99  m_magneticPadChoice->SetSelection( 1 );
100  m_magneticPadChoice->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
101 
102  fgSizer2->Add( m_magneticPadChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
103 
104  m_staticText21 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to tracks:"), wxDefaultPosition, wxDefaultSize, 0 );
105  m_staticText21->Wrap( -1 );
106  m_staticText21->SetToolTip( _("Capture cursor when the mouse approaches a track") );
107 
108  fgSizer2->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
109 
110  wxString m_magneticTrackChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
111  int m_magneticTrackChoiceNChoices = sizeof( m_magneticTrackChoiceChoices ) / sizeof( wxString );
112  m_magneticTrackChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticTrackChoiceNChoices, m_magneticTrackChoiceChoices, 0 );
113  m_magneticTrackChoice->SetSelection( 1 );
114  m_magneticTrackChoice->SetToolTip( _("Capture cursor when the mouse approaches a track") );
115 
116  fgSizer2->Add( m_magneticTrackChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
117 
118  m_staticText211 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
119  m_staticText211->Wrap( -1 );
120  m_staticText211->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
121 
122  fgSizer2->Add( m_staticText211, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
123 
124  wxString m_magneticGraphicsChoiceChoices[] = { _("Always"), _("Never") };
125  int m_magneticGraphicsChoiceNChoices = sizeof( m_magneticGraphicsChoiceChoices ) / sizeof( wxString );
126  m_magneticGraphicsChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticGraphicsChoiceNChoices, m_magneticGraphicsChoiceChoices, 0 );
127  m_magneticGraphicsChoice->SetSelection( 0 );
128  m_magneticGraphicsChoice->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
129 
130  fgSizer2->Add( m_magneticGraphicsChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
131 
132 
133  sbMagnets->Add( fgSizer2, 1, wxEXPAND|wxBOTTOM, 5 );
134 
135 
136  bRightSizer->Add( sbMagnets, 1, wxEXPAND, 5 );
137 
138  wxStaticBoxSizer* sbSizer3;
139  sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Ratsnest") ), wxVERTICAL );
140 
141  m_showGlobalRatsnest = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Show ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
142  sbSizer3->Add( m_showGlobalRatsnest, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
143 
144  m_showSelectedRatsnest = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Always show selected ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
145  sbSizer3->Add( m_showSelectedRatsnest, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
146 
147  m_OptDisplayCurvedRatsnestLines = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Show ratsnest with curved lines"), wxDefaultPosition, wxDefaultSize, 0 );
148  sbSizer3->Add( m_OptDisplayCurvedRatsnestLines, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
149 
150 
151  bRightSizer->Add( sbSizer3, 1, wxEXPAND, 5 );
152 
153  wxStaticBoxSizer* sbSizer4;
154  sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Annotations") ), wxVERTICAL );
155 
156  m_Show_Page_Limits = new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
157  m_Show_Page_Limits->SetValue(true);
158  sbSizer4->Add( m_Show_Page_Limits, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
159 
160 
161  bRightSizer->Add( sbSizer4, 1, wxEXPAND, 5 );
162 
163 
164  bMargins->Add( bRightSizer, 1, wxEXPAND|wxTOP|wxRIGHT, 5 );
165 
166 
167  bPanelSizer->Add( bMargins, 1, wxRIGHT, 5 );
168 
169 
170  this->SetSizer( bPanelSizer );
171  this->Layout();
172  bPanelSizer->Fit( this );
173 }
#define _(s)
const char * name
Definition: DXF_plotter.cpp:61

References _, m_FlipLeftRight, m_magneticGraphicsChoice, m_magneticPadChoice, m_magneticTrackChoice, m_OptDisplayCurvedRatsnestLines, m_PolarDisplay, m_RotationAngle, m_Segments_45_Only_Ctrl, m_Show_Page_Limits, m_showGlobalRatsnest, m_showSelectedRatsnest, m_staticText2, m_staticText21, m_staticText211, m_staticTextRotationAngle, m_UnitsSelection, m_UseEditKeyForWidth, wxID_POLAR_CTRL, wxID_SEGMENTS45, and wxID_UNITS.

◆ ~PANEL_PCBNEW_SETTINGS_BASE()

PANEL_PCBNEW_SETTINGS_BASE::~PANEL_PCBNEW_SETTINGS_BASE ( )

Definition at line 175 of file panel_pcbnew_settings_base.cpp.

176 {
177 }

Member Data Documentation

◆ m_FlipLeftRight

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_FlipLeftRight
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_OptDisplayCurvedRatsnestLines

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_OptDisplayCurvedRatsnestLines
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_showGlobalRatsnest

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_showGlobalRatsnest
protected

◆ m_showSelectedRatsnest

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_showSelectedRatsnest
protected

◆ m_staticText2

wxStaticText* PANEL_PCBNEW_SETTINGS_BASE::m_staticText2
protected

Definition at line 51 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 53 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 55 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 49 of file panel_pcbnew_settings_base.h.

Referenced by PANEL_PCBNEW_SETTINGS_BASE().

◆ 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: