KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_snapping_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12PANEL_SNAPPING_BASE::PANEL_SNAPPING_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* mainSizer;
15 mainSizer = new wxBoxSizer( wxVERTICAL );
16
17 m_gridSnappingLabel = new wxStaticText( this, wxID_ANY, _("Grid Snapping"), wxDefaultPosition, wxDefaultSize, 0 );
18 m_gridSnappingLabel->Wrap( -1 );
19 mainSizer->Add( m_gridSnappingLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
20
21 m_gridSnappingLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
22 mainSizer->Add( m_gridSnappingLine, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
23
24 wxFlexGridSizer* fgGridSnapping;
25 fgGridSnapping = new wxFlexGridSizer( 0, 2, 5, 5 );
26 fgGridSnapping->SetFlexibleDirection( wxVERTICAL );
27 fgGridSnapping->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
28
29 m_gridSnapLabel = new wxStaticText( this, wxID_ANY, _("Snap to grid:"), wxDefaultPosition, wxDefaultSize, 0 );
30 m_gridSnapLabel->Wrap( -1 );
31 fgGridSnapping->Add( m_gridSnapLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
32
33 wxString m_gridSnapChoiceChoices[] = { _("Always"), _("When grid shown"), _("Never") };
34 int m_gridSnapChoiceNChoices = sizeof( m_gridSnapChoiceChoices ) / sizeof( wxString );
35 m_gridSnapChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridSnapChoiceNChoices, m_gridSnapChoiceChoices, 0 );
36 m_gridSnapChoice->SetSelection( 0 );
37 m_gridSnapChoice->SetToolTip( _("Snap the cursor to the active grid") );
38
39 fgGridSnapping->Add( m_gridSnapChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
40
41
42 mainSizer->Add( fgGridSnapping, 0, wxEXPAND|wxALL, 5 );
43
44 m_objectSnappingLabel = new wxStaticText( this, wxID_ANY, _("Object Snapping"), wxDefaultPosition, wxDefaultSize, 0 );
45 m_objectSnappingLabel->Wrap( -1 );
46 mainSizer->Add( m_objectSnappingLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
47
48 m_objectSnappingLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
49 mainSizer->Add( m_objectSnappingLine, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
50
51 m_sizerObjectSnapping = new wxBoxSizer( wxVERTICAL );
52
53 wxFlexGridSizer* fgObjectSnapping;
54 fgObjectSnapping = new wxFlexGridSizer( 0, 2, 5, 5 );
55 fgObjectSnapping->SetFlexibleDirection( wxVERTICAL );
56 fgObjectSnapping->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
57
58 m_padSnapLabel = new wxStaticText( this, wxID_ANY, _("Snap to pads:"), wxDefaultPosition, wxDefaultSize, 0 );
59 m_padSnapLabel->Wrap( -1 );
60 fgObjectSnapping->Add( m_padSnapLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
61
62 wxArrayString m_padSnapChoiceChoices;
63 m_padSnapChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_padSnapChoiceChoices, 0 );
64 m_padSnapChoice->SetSelection( 0 );
65 m_padSnapChoice->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
66
67 fgObjectSnapping->Add( m_padSnapChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
68
69 m_trackSnapLabel = new wxStaticText( this, wxID_ANY, _("Snap to tracks and vias:"), wxDefaultPosition, wxDefaultSize, 0 );
70 m_trackSnapLabel->Wrap( -1 );
71 fgObjectSnapping->Add( m_trackSnapLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
72
73 wxArrayString m_trackSnapChoiceChoices;
74 m_trackSnapChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackSnapChoiceChoices, 0 );
75 m_trackSnapChoice->SetSelection( 0 );
76 m_trackSnapChoice->SetToolTip( _("Capture cursor when the mouse approaches a track") );
77
78 fgObjectSnapping->Add( m_trackSnapChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
79
80 m_graphicsSnapLabel = new wxStaticText( this, wxID_ANY, _("Snap to graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
81 m_graphicsSnapLabel->Wrap( -1 );
82 fgObjectSnapping->Add( m_graphicsSnapLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
83
84 wxArrayString m_graphicsSnapChoiceChoices;
85 m_graphicsSnapChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_graphicsSnapChoiceChoices, 0 );
86 m_graphicsSnapChoice->SetSelection( 0 );
87 m_graphicsSnapChoice->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
88
89 fgObjectSnapping->Add( m_graphicsSnapChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
90
91
92 m_sizerObjectSnapping->Add( fgObjectSnapping, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
93
94 m_snapAllLayers = new wxCheckBox( this, wxID_ANY, _("Snap to objects on all layers"), wxDefaultPosition, wxDefaultSize, 0 );
95 m_snapAllLayers->SetToolTip( _("When unchecked, only objects on the active layer are snapped to") );
96
97 m_sizerObjectSnapping->Add( m_snapAllLayers, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
98
99
100 mainSizer->Add( m_sizerObjectSnapping, 0, wxEXPAND, 0 );
101
102 m_snapInferenceLabel = new wxStaticText( this, wxID_ANY, _("Snap Inference"), wxDefaultPosition, wxDefaultSize, 0 );
103 m_snapInferenceLabel->Wrap( -1 );
104 mainSizer->Add( m_snapInferenceLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
105
106 m_snapInferenceLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
107 mainSizer->Add( m_snapInferenceLine, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
108
109 m_sizerSnapInference = new wxBoxSizer( wxVERTICAL );
110
111 m_snapObjectGeometry = new wxCheckBox( this, wxID_ANY, _("Object geometry"), wxDefaultPosition, wxDefaultSize, 0 );
112 m_snapObjectGeometry->SetToolTip( _("Snap to endpoints, midpoints, centres and edges of existing objects") );
113
114 m_sizerSnapInference->Add( m_snapObjectGeometry, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
115
116 m_snapConstructionExtensions = new wxCheckBox( this, wxID_ANY, _("Construction extensions"), wxDefaultPosition, wxDefaultSize, 0 );
117 m_snapConstructionExtensions->SetToolTip( _("Snap to virtual extensions of lines and arcs") );
118
119 m_sizerSnapInference->Add( m_snapConstructionExtensions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
120
121 m_snapTangentNormal = new wxCheckBox( this, wxID_ANY, _("Tangent and normal contacts"), wxDefaultPosition, wxDefaultSize, 0 );
122 m_snapTangentNormal->SetToolTip( _("Snap where the dragged geometry meets an arc tangentially or normally") );
123
124 m_sizerSnapInference->Add( m_snapTangentNormal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
125
126 m_snapAlignmentDistribution = new wxCheckBox( this, wxID_ANY, _("Alignment and equal spacing"), wxDefaultPosition, wxDefaultSize, 0 );
127 m_snapAlignmentDistribution->SetToolTip( _("Snap to alignment with, and equal spacing between, nearby objects") );
128
129 m_sizerSnapInference->Add( m_snapAlignmentDistribution, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
130
131
132 mainSizer->Add( m_sizerSnapInference, 0, wxEXPAND, 0 );
133
134
135 this->SetSizer( mainSizer );
136 this->Layout();
137 mainSizer->Fit( this );
138}
139
const char * name
wxStaticText * m_gridSnappingLabel
PANEL_SNAPPING_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)
wxStaticText * m_objectSnappingLabel
wxBoxSizer * m_sizerSnapInference
wxCheckBox * m_snapAlignmentDistribution
wxBoxSizer * m_sizerObjectSnapping
wxCheckBox * m_snapConstructionExtensions
wxStaticText * m_trackSnapLabel
wxStaticText * m_snapInferenceLabel
wxStaticLine * m_gridSnappingLine
wxStaticLine * m_objectSnappingLine
wxStaticText * m_padSnapLabel
wxStaticText * m_graphicsSnapLabel
wxCheckBox * m_snapTangentNormal
wxStaticLine * m_snapInferenceLine
wxCheckBox * m_snapObjectGeometry
wxStaticText * m_gridSnapLabel
RESETTABLE_PANEL(wxWindow *aParent, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxSize(-1,-1), long aStyle=wxTAB_TRAVERSAL, const wxString &aName=wxEmptyString)
#define _(s)