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)
 
 ~PANEL_PCBNEW_SETTINGS_BASE ()
 

Protected Types

enum  {
  wxID_POLAR_CTRL = 1000, wxID_UNITS, wxID_SEGMENTS45, wxID_MAGNETIC_TRACKS,
  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
 
wxRadioBox * m_MagneticPadOptCtrl
 
wxRadioBox * m_MagneticTrackOptCtrl
 
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

Constructor & Destructor Documentation

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 
)

Definition at line 12 of file panel_pcbnew_settings_base.cpp.

References m_dragSelects, m_DrcOn, m_MagneticPadOptCtrl, m_MagneticTrackOptCtrl, m_PolarDisplay, m_RotationAngle, m_Segments_45_Only_Ctrl, m_Show_Page_Limits, m_staticTextRotationAngle, m_Track_45_Only_Ctrl, m_Track_DoubleSegm_Ctrl, m_TrackAutodel, m_UnitsSelection, m_UseEditKeyForWidth, wxID_DRC_ONOFF, wxID_MAGNETIC_TRACKS, wxID_POLAR_CTRL, wxID_SEGMENTS45, wxID_TRACK_AUTODEL, wxID_TRACKS45, and wxID_UNITS.

12  : wxPanel( parent, id, pos, size, style )
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, wxBOTTOM|wxLEFT|wxRIGHT, 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  wxString m_MagneticPadOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
89  int m_MagneticPadOptCtrlNChoices = sizeof( m_MagneticPadOptCtrlChoices ) / sizeof( wxString );
90  m_MagneticPadOptCtrl = new wxRadioBox( this, wxID_ANY, _("Magnetic Pads"), wxDefaultPosition, wxDefaultSize, m_MagneticPadOptCtrlNChoices, m_MagneticPadOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
91  m_MagneticPadOptCtrl->SetSelection( 2 );
92  m_MagneticPadOptCtrl->SetToolTip( _("Control capture of the cursor when the mouse enters a pad area.") );
93 
94  bRightSizer->Add( m_MagneticPadOptCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
95 
96  wxString m_MagneticTrackOptCtrlChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
97  int m_MagneticTrackOptCtrlNChoices = sizeof( m_MagneticTrackOptCtrlChoices ) / sizeof( wxString );
98  m_MagneticTrackOptCtrl = new wxRadioBox( this, wxID_MAGNETIC_TRACKS, _("Magnetic Tracks"), wxDefaultPosition, wxDefaultSize, m_MagneticTrackOptCtrlNChoices, m_MagneticTrackOptCtrlChoices, 1, wxRA_SPECIFY_COLS );
99  m_MagneticTrackOptCtrl->SetSelection( 0 );
100  m_MagneticTrackOptCtrl->SetToolTip( _("Control capture of the cursor when the mouse approaches a track.") );
101 
102  bRightSizer->Add( m_MagneticTrackOptCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
103 
104  wxStaticBoxSizer* bLegacyOptionsSizer;
105  bLegacyOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Legacy Toolset Routing Options") ), wxVERTICAL );
106 
107  m_DrcOn = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_DRC_ONOFF, _("&Enforce design rules when routing"), wxDefaultPosition, wxDefaultSize, 0 );
108  m_DrcOn->SetValue(true);
109  m_DrcOn->SetToolTip( _("Enable DRC control. When DRC control is disabled, all connections are allowed.") );
110 
111  bLegacyOptionsSizer->Add( m_DrcOn, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
112 
113  m_TrackAutodel = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACK_AUTODEL, _("Auto-delete old tracks"), wxDefaultPosition, wxDefaultSize, 0 );
114  m_TrackAutodel->SetValue(true);
115  m_TrackAutodel->SetToolTip( _("Enable automatic track deletion when redrawing a track.") );
116 
117  bLegacyOptionsSizer->Add( m_TrackAutodel, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
118 
119  m_Track_45_Only_Ctrl = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_TRACKS45, _("&Limit tracks to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
120  m_Track_45_Only_Ctrl->SetValue(true);
121  m_Track_45_Only_Ctrl->SetToolTip( _("Force track directions to H, V or 45 degrees when drawing a track.") );
122 
123  bLegacyOptionsSizer->Add( m_Track_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
124 
125  m_Track_DoubleSegm_Ctrl = new wxCheckBox( bLegacyOptionsSizer->GetStaticBox(), wxID_ANY, _("&Use double segmented tracks"), wxDefaultPosition, wxDefaultSize, 0 );
126  m_Track_DoubleSegm_Ctrl->SetValue(true);
127  m_Track_DoubleSegm_Ctrl->SetToolTip( _("Use two track segments, with 45 degrees angle between them, when drawing a new track") );
128 
129  bLegacyOptionsSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
130 
131 
132  bRightSizer->Add( bLegacyOptionsSizer, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
133 
134 
135  bMargins->Add( bRightSizer, 1, wxEXPAND|wxRIGHT, 5 );
136 
137 
138  bPanelSizer->Add( bMargins, 1, wxRIGHT, 5 );
139 
140 
141  this->SetSizer( bPanelSizer );
142  this->Layout();
143  bPanelSizer->Fit( this );
144 }
PANEL_PCBNEW_SETTINGS_BASE::~PANEL_PCBNEW_SETTINGS_BASE ( )

Definition at line 146 of file panel_pcbnew_settings_base.cpp.

147 {
148 }

Member Data Documentation

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_dragSelects
protected
wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_DrcOn
protected
wxRadioBox* PANEL_PCBNEW_SETTINGS_BASE::m_MagneticPadOptCtrl
protected
wxRadioBox* PANEL_PCBNEW_SETTINGS_BASE::m_MagneticTrackOptCtrl
protected
wxRadioBox* PANEL_PCBNEW_SETTINGS_BASE::m_PolarDisplay
protected
wxTextCtrl* PANEL_PCBNEW_SETTINGS_BASE::m_RotationAngle
protected
wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_Segments_45_Only_Ctrl
protected
wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_Show_Page_Limits
protected
wxStaticText* PANEL_PCBNEW_SETTINGS_BASE::m_staticTextRotationAngle
protected

Definition at line 54 of file panel_pcbnew_settings_base.h.

Referenced by PANEL_PCBNEW_SETTINGS_BASE().

wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_Track_45_Only_Ctrl
protected
wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_Track_DoubleSegm_Ctrl
protected
wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_TrackAutodel
protected
wxRadioBox* PANEL_PCBNEW_SETTINGS_BASE::m_UnitsSelection
protected
wxCheckBox* PANEL_PCBNEW_SETTINGS_BASE::m_UseEditKeyForWidth
protected

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