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

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, wxID_POLAR_CTRL, wxID_SEGMENTS45, and wxID_UNITS.

◆ ~PANEL_PCBNEW_SETTINGS_BASE()

PANEL_PCBNEW_SETTINGS_BASE::~PANEL_PCBNEW_SETTINGS_BASE ( )

Definition at line 170 of file panel_pcbnew_settings_base.cpp.

171 {
172 }

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 50 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 52 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 54 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 48 of file panel_pcbnew_settings_base.h.

Referenced by PANEL_PCBNEW_SETTINGS_BASE().

◆ m_UnitsSelection

wxRadioBox* PANEL_PCBNEW_SETTINGS_BASE::m_UnitsSelection
protected

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