KiCad PCB EDA Suite
PANEL_EDIT_OPTIONS_BASE Class Reference

Class PANEL_EDIT_OPTIONS_BASE. More...

#include <panel_edit_options_base.h>

Inheritance diagram for PANEL_EDIT_OPTIONS_BASE:
PANEL_EDIT_OPTIONS

Public Member Functions

 PANEL_EDIT_OPTIONS_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_EDIT_OPTIONS_BASE ()
 

Protected Types

enum  { wxID_POLAR_CTRL = 1000, wxID_UNITS, wxID_SEGMENTS45 }
 

Protected Attributes

wxRadioBox * m_PolarDisplay
 
wxRadioBox * m_UnitsSelection
 
wxCheckBox * m_MagneticPads
 
wxCheckBox * m_Segments_45_Only_Ctrl
 
wxCheckBox * m_FlipLeftRight
 
wxStaticText * m_staticTextRotationAngle
 
wxTextCtrl * m_RotationAngle
 
wxSimplebook * m_optionsBook
 
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
 
wxStaticText * m_staticText5
 
wxRadioButton * m_rbTrackDragMove
 
wxRadioButton * m_rbTrackDrag45
 
wxRadioButton * m_rbTrackDragFree
 

Detailed Description

Class PANEL_EDIT_OPTIONS_BASE.

Definition at line 34 of file panel_edit_options_base.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Constructor & Destructor Documentation

◆ PANEL_EDIT_OPTIONS_BASE()

PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_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_edit_options_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_MagneticPads = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Magnetic pads"), wxDefaultPosition, wxDefaultSize, 0 );
43  bOptionsSizer->Add( m_MagneticPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
44 
45  m_Segments_45_Only_Ctrl = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to H, V and 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
46  m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
47 
48  bOptionsSizer->Add( m_Segments_45_Only_Ctrl, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
49 
50  m_FlipLeftRight = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Flip board items L/R (default is T/B)"), wxDefaultPosition, wxDefaultSize, 0 );
51  bOptionsSizer->Add( m_FlipLeftRight, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
52 
53  wxFlexGridSizer* fgSizer12;
54  fgSizer12 = new wxFlexGridSizer( 0, 2, 0, 0 );
55  fgSizer12->AddGrowableCol( 1 );
56  fgSizer12->SetFlexibleDirection( wxBOTH );
57  fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
58 
59  m_staticTextRotationAngle = new wxStaticText( bOptionsSizer->GetStaticBox(), wxID_ANY, _("&Rotation angle:"), wxDefaultPosition, wxDefaultSize, 0 );
60  m_staticTextRotationAngle->Wrap( -1 );
61  fgSizer12->Add( m_staticTextRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
62 
63  m_RotationAngle = new wxTextCtrl( bOptionsSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
64  m_RotationAngle->SetToolTip( _("Set increment (in degrees) for context menu and hotkey rotation.") );
65 
66  fgSizer12->Add( m_RotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
67 
68 
69  bOptionsSizer->Add( fgSizer12, 1, wxEXPAND, 5 );
70 
71 
72  bMiddleLeftSizer->Add( bOptionsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
73 
74 
75  bMargins->Add( bMiddleLeftSizer, 1, wxEXPAND|wxRIGHT, 5 );
76 
77  m_optionsBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
78  wxPanel* emptyPage;
79  emptyPage = new wxPanel( m_optionsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
80  m_optionsBook->AddPage( emptyPage, _("a page"), false );
81  wxPanel* pcbPage;
82  pcbPage = new wxPanel( m_optionsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
83  wxBoxSizer* pcbOptionsSizer;
84  pcbOptionsSizer = new wxBoxSizer( wxVERTICAL );
85 
86  wxStaticBoxSizer* sbMagnets;
87  sbMagnets = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Magnetic Points") ), wxVERTICAL );
88 
89  wxFlexGridSizer* fgSizer2;
90  fgSizer2 = new wxFlexGridSizer( 0, 2, 3, 0 );
91  fgSizer2->SetFlexibleDirection( wxBOTH );
92  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
93 
94  m_staticText2 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to pads:"), wxDefaultPosition, wxDefaultSize, 0 );
95  m_staticText2->Wrap( -1 );
96  m_staticText2->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
97 
98  fgSizer2->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
99 
100  wxString m_magneticPadChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
101  int m_magneticPadChoiceNChoices = sizeof( m_magneticPadChoiceChoices ) / sizeof( wxString );
102  m_magneticPadChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticPadChoiceNChoices, m_magneticPadChoiceChoices, 0 );
103  m_magneticPadChoice->SetSelection( 1 );
104  m_magneticPadChoice->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
105 
106  fgSizer2->Add( m_magneticPadChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
107 
108  m_staticText21 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to tracks:"), wxDefaultPosition, wxDefaultSize, 0 );
109  m_staticText21->Wrap( -1 );
110  m_staticText21->SetToolTip( _("Capture cursor when the mouse approaches a track") );
111 
112  fgSizer2->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
113 
114  wxString m_magneticTrackChoiceChoices[] = { _("Never"), _("When creating tracks"), _("Always") };
115  int m_magneticTrackChoiceNChoices = sizeof( m_magneticTrackChoiceChoices ) / sizeof( wxString );
116  m_magneticTrackChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticTrackChoiceNChoices, m_magneticTrackChoiceChoices, 0 );
117  m_magneticTrackChoice->SetSelection( 1 );
118  m_magneticTrackChoice->SetToolTip( _("Capture cursor when the mouse approaches a track") );
119 
120  fgSizer2->Add( m_magneticTrackChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
121 
122  m_staticText211 = new wxStaticText( sbMagnets->GetStaticBox(), wxID_ANY, _("Snap to graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
123  m_staticText211->Wrap( -1 );
124  m_staticText211->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
125 
126  fgSizer2->Add( m_staticText211, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
127 
128  wxString m_magneticGraphicsChoiceChoices[] = { _("Always"), _("Never") };
129  int m_magneticGraphicsChoiceNChoices = sizeof( m_magneticGraphicsChoiceChoices ) / sizeof( wxString );
130  m_magneticGraphicsChoice = new wxChoice( sbMagnets->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_magneticGraphicsChoiceNChoices, m_magneticGraphicsChoiceChoices, 0 );
131  m_magneticGraphicsChoice->SetSelection( 0 );
132  m_magneticGraphicsChoice->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
133 
134  fgSizer2->Add( m_magneticGraphicsChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
135 
136 
137  sbMagnets->Add( fgSizer2, 1, wxEXPAND|wxBOTTOM, 5 );
138 
139 
140  pcbOptionsSizer->Add( sbMagnets, 1, wxEXPAND, 5 );
141 
142  wxStaticBoxSizer* sbSizer3;
143  sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Ratsnest") ), wxVERTICAL );
144 
145  m_showGlobalRatsnest = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Show ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
146  sbSizer3->Add( m_showGlobalRatsnest, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
147 
148  m_showSelectedRatsnest = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Always show selected ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
149  sbSizer3->Add( m_showSelectedRatsnest, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
150 
151  m_OptDisplayCurvedRatsnestLines = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Show ratsnest with curved lines"), wxDefaultPosition, wxDefaultSize, 0 );
152  sbSizer3->Add( m_OptDisplayCurvedRatsnestLines, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
153 
154 
155  pcbOptionsSizer->Add( sbSizer3, 1, wxEXPAND|wxTOP, 5 );
156 
157  wxStaticBoxSizer* sbSizer4;
158  sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Annotations") ), wxVERTICAL );
159 
160  m_Show_Page_Limits = new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
161  m_Show_Page_Limits->SetValue(true);
162  sbSizer4->Add( m_Show_Page_Limits, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
163 
164 
165  pcbOptionsSizer->Add( sbSizer4, 0, wxEXPAND|wxTOP, 5 );
166 
167  wxStaticBoxSizer* sbSizer41;
168  sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( pcbPage, wxID_ANY, _("Track Editing") ), wxVERTICAL );
169 
170  m_staticText5 = new wxStaticText( sbSizer41->GetStaticBox(), wxID_ANY, _("Track mouse drag behavior:"), wxDefaultPosition, wxDefaultSize, 0 );
171  m_staticText5->Wrap( -1 );
172  m_staticText5->SetToolTip( _("Choose the action to perform when dragging a track segment with the mouse") );
173 
174  sbSizer41->Add( m_staticText5, 0, wxBOTTOM|wxRIGHT|wxLEFT, 3 );
175 
176  m_rbTrackDragMove = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Move"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
177  m_rbTrackDragMove->SetToolTip( _("Moves the track segment without moving connected tracks") );
178 
179  sbSizer41->Add( m_rbTrackDragMove, 0, wxRIGHT|wxLEFT, 5 );
180 
181 
182  sbSizer41->Add( 0, 3, 1, wxEXPAND, 5 );
183 
184  m_rbTrackDrag45 = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Drag (45 degree mode)"), wxDefaultPosition, wxDefaultSize, 0 );
185  m_rbTrackDrag45->SetToolTip( _("Drags the track segment while keeping connected tracks at 45 degrees.") );
186 
187  sbSizer41->Add( m_rbTrackDrag45, 0, wxRIGHT|wxLEFT, 5 );
188 
189 
190  sbSizer41->Add( 0, 3, 1, wxEXPAND, 5 );
191 
192  m_rbTrackDragFree = new wxRadioButton( sbSizer41->GetStaticBox(), wxID_ANY, _("Drag (free angle)"), wxDefaultPosition, wxDefaultSize, 0 );
193  m_rbTrackDragFree->SetToolTip( _("Drags the nearest joint in the track without restricting the track angle.") );
194 
195  sbSizer41->Add( m_rbTrackDragFree, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
196 
197 
198  pcbOptionsSizer->Add( sbSizer41, 1, wxEXPAND|wxTOP, 5 );
199 
200 
201  pcbPage->SetSizer( pcbOptionsSizer );
202  pcbPage->Layout();
203  pcbOptionsSizer->Fit( pcbPage );
204  m_optionsBook->AddPage( pcbPage, _("a page"), false );
205 
206  bMargins->Add( m_optionsBook, 1, wxEXPAND | wxALL, 5 );
207 
208 
209  bPanelSizer->Add( bMargins, 1, wxRIGHT, 5 );
210 
211 
212  this->SetSizer( bPanelSizer );
213  this->Layout();
214  bPanelSizer->Fit( this );
215 }
wxCheckBox * m_OptDisplayCurvedRatsnestLines
const char * name
Definition: DXF_plotter.cpp:60
#define _(s)
Definition: 3d_actions.cpp:33
wxStaticText * m_staticTextRotationAngle

References _, m_FlipLeftRight, m_magneticGraphicsChoice, m_magneticPadChoice, m_MagneticPads, m_magneticTrackChoice, m_OptDisplayCurvedRatsnestLines, m_optionsBook, m_PolarDisplay, m_rbTrackDrag45, m_rbTrackDragFree, m_rbTrackDragMove, m_RotationAngle, m_Segments_45_Only_Ctrl, m_Show_Page_Limits, m_showGlobalRatsnest, m_showSelectedRatsnest, m_staticText2, m_staticText21, m_staticText211, m_staticText5, m_staticTextRotationAngle, m_UnitsSelection, wxID_POLAR_CTRL, wxID_SEGMENTS45, and wxID_UNITS.

◆ ~PANEL_EDIT_OPTIONS_BASE()

PANEL_EDIT_OPTIONS_BASE::~PANEL_EDIT_OPTIONS_BASE ( )

Definition at line 217 of file panel_edit_options_base.cpp.

218 {
219 }

Member Data Documentation

◆ m_FlipLeftRight

wxCheckBox* PANEL_EDIT_OPTIONS_BASE::m_FlipLeftRight
protected

◆ m_magneticGraphicsChoice

wxChoice* PANEL_EDIT_OPTIONS_BASE::m_magneticGraphicsChoice
protected

◆ m_magneticPadChoice

wxChoice* PANEL_EDIT_OPTIONS_BASE::m_magneticPadChoice
protected

◆ m_MagneticPads

wxCheckBox* PANEL_EDIT_OPTIONS_BASE::m_MagneticPads
protected

◆ m_magneticTrackChoice

wxChoice* PANEL_EDIT_OPTIONS_BASE::m_magneticTrackChoice
protected

◆ m_OptDisplayCurvedRatsnestLines

wxCheckBox* PANEL_EDIT_OPTIONS_BASE::m_OptDisplayCurvedRatsnestLines
protected

◆ m_optionsBook

wxSimplebook* PANEL_EDIT_OPTIONS_BASE::m_optionsBook
protected

Definition at line 53 of file panel_edit_options_base.h.

Referenced by PANEL_EDIT_OPTIONS_BASE().

◆ m_PolarDisplay

wxRadioBox* PANEL_EDIT_OPTIONS_BASE::m_PolarDisplay
protected

◆ m_rbTrackDrag45

wxRadioButton* PANEL_EDIT_OPTIONS_BASE::m_rbTrackDrag45
protected

◆ m_rbTrackDragFree

wxRadioButton* PANEL_EDIT_OPTIONS_BASE::m_rbTrackDragFree
protected

◆ m_rbTrackDragMove

wxRadioButton* PANEL_EDIT_OPTIONS_BASE::m_rbTrackDragMove
protected

◆ m_RotationAngle

wxTextCtrl* PANEL_EDIT_OPTIONS_BASE::m_RotationAngle
protected

◆ m_Segments_45_Only_Ctrl

wxCheckBox* PANEL_EDIT_OPTIONS_BASE::m_Segments_45_Only_Ctrl
protected

◆ m_Show_Page_Limits

wxCheckBox* PANEL_EDIT_OPTIONS_BASE::m_Show_Page_Limits
protected

◆ m_showGlobalRatsnest

wxCheckBox* PANEL_EDIT_OPTIONS_BASE::m_showGlobalRatsnest
protected

◆ m_showSelectedRatsnest

wxCheckBox* PANEL_EDIT_OPTIONS_BASE::m_showSelectedRatsnest
protected

◆ m_staticText2

wxStaticText* PANEL_EDIT_OPTIONS_BASE::m_staticText2
protected

Definition at line 54 of file panel_edit_options_base.h.

Referenced by PANEL_EDIT_OPTIONS_BASE().

◆ m_staticText21

wxStaticText* PANEL_EDIT_OPTIONS_BASE::m_staticText21
protected

Definition at line 56 of file panel_edit_options_base.h.

Referenced by PANEL_EDIT_OPTIONS_BASE().

◆ m_staticText211

wxStaticText* PANEL_EDIT_OPTIONS_BASE::m_staticText211
protected

Definition at line 58 of file panel_edit_options_base.h.

Referenced by PANEL_EDIT_OPTIONS_BASE().

◆ m_staticText5

wxStaticText* PANEL_EDIT_OPTIONS_BASE::m_staticText5
protected

Definition at line 64 of file panel_edit_options_base.h.

Referenced by PANEL_EDIT_OPTIONS_BASE().

◆ m_staticTextRotationAngle

wxStaticText* PANEL_EDIT_OPTIONS_BASE::m_staticTextRotationAngle
protected

Definition at line 51 of file panel_edit_options_base.h.

Referenced by PANEL_EDIT_OPTIONS_BASE().

◆ m_UnitsSelection

wxRadioBox* PANEL_EDIT_OPTIONS_BASE::m_UnitsSelection
protected

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