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
45 mainSizer->Add( 0, 10, 0, wxEXPAND, 5 );
46
47 m_objectSnappingLabel = new wxStaticText( this, wxID_ANY, _("Object Snapping"), wxDefaultPosition, wxDefaultSize, 0 );
48 m_objectSnappingLabel->Wrap( -1 );
49 mainSizer->Add( m_objectSnappingLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
50
51 m_objectSnappingLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
52 mainSizer->Add( m_objectSnappingLine, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
53
54 m_sizerObjectSnapping = new wxBoxSizer( wxVERTICAL );
55
56 wxFlexGridSizer* fgObjectSnapping;
57 fgObjectSnapping = new wxFlexGridSizer( 0, 2, 5, 5 );
58 fgObjectSnapping->SetFlexibleDirection( wxVERTICAL );
59 fgObjectSnapping->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
60
61 m_padSnapLabel = new wxStaticText( this, wxID_ANY, _("Snap to pads:"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_padSnapLabel->Wrap( -1 );
63 fgObjectSnapping->Add( m_padSnapLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
64
65 wxArrayString m_padSnapChoiceChoices;
66 m_padSnapChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_padSnapChoiceChoices, 0 );
67 m_padSnapChoice->SetSelection( 0 );
68 m_padSnapChoice->SetToolTip( _("Capture cursor when the mouse enters a pad area") );
69
70 fgObjectSnapping->Add( m_padSnapChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
71
72 m_trackSnapLabel = new wxStaticText( this, wxID_ANY, _("Snap to tracks and vias:"), wxDefaultPosition, wxDefaultSize, 0 );
73 m_trackSnapLabel->Wrap( -1 );
74 fgObjectSnapping->Add( m_trackSnapLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
75
76 wxArrayString m_trackSnapChoiceChoices;
77 m_trackSnapChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trackSnapChoiceChoices, 0 );
78 m_trackSnapChoice->SetSelection( 0 );
79 m_trackSnapChoice->SetToolTip( _("Capture cursor when the mouse approaches a track") );
80
81 fgObjectSnapping->Add( m_trackSnapChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
82
83 m_graphicsSnapLabel = new wxStaticText( this, wxID_ANY, _("Snap to graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
84 m_graphicsSnapLabel->Wrap( -1 );
85 fgObjectSnapping->Add( m_graphicsSnapLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
86
87 wxArrayString m_graphicsSnapChoiceChoices;
88 m_graphicsSnapChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_graphicsSnapChoiceChoices, 0 );
89 m_graphicsSnapChoice->SetSelection( 0 );
90 m_graphicsSnapChoice->SetToolTip( _("Capture cursor when the mouse approaches graphical control points") );
91
92 fgObjectSnapping->Add( m_graphicsSnapChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
93
94
95 m_sizerObjectSnapping->Add( fgObjectSnapping, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
96
97 m_snapAllLayers = new wxCheckBox( this, wxID_ANY, _("Snap to objects on all layers"), wxDefaultPosition, wxDefaultSize, 0 );
98 m_snapAllLayers->SetToolTip( _("When unchecked, only objects on the active layer are snapped to") );
99
100 m_sizerObjectSnapping->Add( m_snapAllLayers, 0, wxALL, 10 );
101
102
103 mainSizer->Add( m_sizerObjectSnapping, 0, wxEXPAND, 0 );
104
105
106 mainSizer->Add( 0, 5, 0, wxEXPAND, 5 );
107
108 m_snapInferenceLabel = new wxStaticText( this, wxID_ANY, _("Snap Inference"), wxDefaultPosition, wxDefaultSize, 0 );
109 m_snapInferenceLabel->Wrap( -1 );
110 mainSizer->Add( m_snapInferenceLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
111
112 m_snapInferenceLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
113 mainSizer->Add( m_snapInferenceLine, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
114
115 m_sizerSnapInference = new wxBoxSizer( wxVERTICAL );
116
117 m_snapObjectGeometry = new wxCheckBox( this, wxID_ANY, _("Object geometry"), wxDefaultPosition, wxDefaultSize, 0 );
118 m_snapObjectGeometry->SetToolTip( _("Snap to endpoints, midpoints, centres and edges of existing objects") );
119
120 m_sizerSnapInference->Add( m_snapObjectGeometry, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
121
122 m_snapConstructionExtensions = new wxCheckBox( this, wxID_ANY, _("Construction extensions"), wxDefaultPosition, wxDefaultSize, 0 );
123 m_snapConstructionExtensions->SetToolTip( _("Snap to virtual extensions of lines and arcs") );
124
125 m_sizerSnapInference->Add( m_snapConstructionExtensions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
126
127 m_snapTangentNormal = new wxCheckBox( this, wxID_ANY, _("Tangent and normal contacts"), wxDefaultPosition, wxDefaultSize, 0 );
128 m_snapTangentNormal->SetToolTip( _("Snap where the dragged geometry meets an arc tangentially or normally") );
129
130 m_sizerSnapInference->Add( m_snapTangentNormal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
131
132 m_snapAlignmentDistribution = new wxCheckBox( this, wxID_ANY, _("Alignment and equal spacing"), wxDefaultPosition, wxDefaultSize, 0 );
133 m_snapAlignmentDistribution->SetToolTip( _("Snap to alignment with, and equal spacing between, nearby objects") );
134
135 m_sizerSnapInference->Add( m_snapAlignmentDistribution, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
136
137
138 mainSizer->Add( m_sizerSnapInference, 0, wxEXPAND|wxLEFT, 5 );
139
140
141 this->SetSizer( mainSizer );
142 this->Layout();
143 mainSizer->Fit( this );
144}
145
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)