|
KiCad PCB EDA Suite
|
The snapping preferences page. More...
#include <panel_snapping.h>
Classes | |
| struct | VALUES |
| One editor's snapping settings by value, so the page can also be filled from a settings object that isn't the live one. More... | |
Public Member Functions | |
| PANEL_SNAPPING (wxWindow *aParent, FRAME_T aFrameType, int *aGridSnap, SNAP_INFERENCE_SETTINGS *aInference, MAGNETIC_SETTINGS *aMagnetics, std::function< VALUES()> aDefaults) | |
| bool | TransferDataToWindow () override |
| bool | TransferDataFromWindow () override |
| void | ResetPanel () override |
| Reset the contents of this panel. | |
| virtual wxString | GetResetTooltip () const |
| Get the tooltip the reset button should display when showing this panel. | |
| wxString | GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override |
| Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }. | |
Protected Attributes | |
| wxStaticText * | m_gridSnappingLabel |
| wxStaticLine * | m_gridSnappingLine |
| wxStaticText * | m_gridSnapLabel |
| wxChoice * | m_gridSnapChoice |
| wxStaticText * | m_objectSnappingLabel |
| wxStaticLine * | m_objectSnappingLine |
| wxBoxSizer * | m_sizerObjectSnapping |
| wxStaticText * | m_padSnapLabel |
| wxChoice * | m_padSnapChoice |
| wxStaticText * | m_trackSnapLabel |
| wxChoice * | m_trackSnapChoice |
| wxStaticText * | m_graphicsSnapLabel |
| wxChoice * | m_graphicsSnapChoice |
| wxCheckBox * | m_snapAllLayers |
| wxStaticText * | m_snapInferenceLabel |
| wxStaticLine * | m_snapInferenceLine |
| wxBoxSizer * | m_sizerSnapInference |
| wxCheckBox * | m_snapObjectGeometry |
| wxCheckBox * | m_snapConstructionExtensions |
| wxCheckBox * | m_snapTangentNormal |
| wxCheckBox * | m_snapAlignmentDistribution |
Private Member Functions | |
| void | load (const VALUES &aValues) |
Private Attributes | |
| bool | m_routing |
| int * | m_gridSnap |
| SNAP_INFERENCE_SETTINGS * | m_inference |
| MAGNETIC_SETTINGS * | m_magnetics |
| std::function< VALUES()> | m_defaults |
| std::vector< MAGNETIC_OPTIONS > | m_padOptions |
| std::vector< MAGNETIC_OPTIONS > | m_trackOptions |
| std::vector< MAGNETIC_OPTIONS > | m_graphicsOptions |
The snapping preferences page.
Every editor gets the same page, showing the groups its own settings support: grid snapping everywhere, object snapping in the board editors, and snap inference wherever the geometry tools run. Use CreateSnappingPanel() rather than constructing this directly.
Definition at line 37 of file panel_snapping.h.
| PANEL_SNAPPING::PANEL_SNAPPING | ( | wxWindow * | aParent, |
| FRAME_T | aFrameType, | ||
| int * | aGridSnap, | ||
| SNAP_INFERENCE_SETTINGS * | aInference, | ||
| MAGNETIC_SETTINGS * | aMagnetics, | ||
| std::function< VALUES()> | aDefaults ) |
| aFrameType | is the editor the page belongs to, which decides the modes offered. |
| aGridSnap | points at the live grid snapping mode. |
| aInference | points at the live inference settings, or null if the editor has none. |
| aMagnetics | points at the live object snapping settings, or null if the editor has none. |
| aDefaults | yields the values the reset button restores. |
Definition at line 77 of file panel_snapping.cpp.
References fillMagneticChoice(), FRAME_PCB_EDITOR, m_defaults, m_graphicsOptions, PANEL_SNAPPING_BASE::m_graphicsSnapChoice, m_gridSnap, m_inference, m_magnetics, PANEL_SNAPPING_BASE::m_objectSnappingLabel, PANEL_SNAPPING_BASE::m_objectSnappingLine, m_padOptions, PANEL_SNAPPING_BASE::m_padSnapChoice, m_routing, PANEL_SNAPPING_BASE::m_sizerObjectSnapping, PANEL_SNAPPING_BASE::m_sizerSnapInference, PANEL_SNAPPING_BASE::m_snapInferenceLabel, PANEL_SNAPPING_BASE::m_snapInferenceLine, m_trackOptions, PANEL_SNAPPING_BASE::m_trackSnapChoice, PANEL_SNAPPING_BASE::m_trackSnapLabel, MagneticSnapOptions(), move, and PANEL_SNAPPING_BASE::PANEL_SNAPPING_BASE().
|
inlineoverrideinherited |
Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.
Definition at line 72 of file resettable_panel.h.
References GetResetTooltip().
|
inlinevirtualinherited |
Get the tooltip the reset button should display when showing this panel.
Reimplemented in PANEL_COLOR_SETTINGS, and PANEL_HOTKEYS_EDITOR.
Definition at line 64 of file resettable_panel.h.
References _.
Referenced by GetHelpTextAtPoint().
|
private |
Definition at line 111 of file panel_snapping.cpp.
References SNAP_INFERENCE_SETTINGS::alignmentDistribution, MAGNETIC_SETTINGS::allLayers, CAPTURE_ALWAYS, SNAP_INFERENCE_SETTINGS::constructionExtensions, MAGNETIC_SETTINGS::graphics, PANEL_SNAPPING::VALUES::gridSnap, PANEL_SNAPPING::VALUES::inference, m_graphicsOptions, PANEL_SNAPPING_BASE::m_graphicsSnapChoice, PANEL_SNAPPING_BASE::m_gridSnapChoice, m_inference, m_magnetics, m_padOptions, PANEL_SNAPPING_BASE::m_padSnapChoice, m_routing, PANEL_SNAPPING_BASE::m_snapAlignmentDistribution, PANEL_SNAPPING_BASE::m_snapAllLayers, PANEL_SNAPPING_BASE::m_snapConstructionExtensions, PANEL_SNAPPING_BASE::m_snapObjectGeometry, PANEL_SNAPPING_BASE::m_snapTangentNormal, m_trackOptions, PANEL_SNAPPING_BASE::m_trackSnapChoice, PANEL_SNAPPING::VALUES::magnetics, MagneticSnapIndex(), NO_EFFECT, SNAP_INFERENCE_SETTINGS::objectGeometry, MAGNETIC_SETTINGS::pads, SNAP_INFERENCE_SETTINGS::tangentNormal, and MAGNETIC_SETTINGS::tracks.
Referenced by ResetPanel(), and TransferDataToWindow().
|
overridevirtual |
Reset the contents of this panel.
Implements RESETTABLE_PANEL.
Definition at line 189 of file panel_snapping.cpp.
References load(), and m_defaults.
|
override |
Definition at line 161 of file panel_snapping.cpp.
References CAPTURE_ALWAYS, m_graphicsOptions, PANEL_SNAPPING_BASE::m_graphicsSnapChoice, m_gridSnap, PANEL_SNAPPING_BASE::m_gridSnapChoice, m_inference, m_magnetics, m_padOptions, PANEL_SNAPPING_BASE::m_padSnapChoice, m_routing, PANEL_SNAPPING_BASE::m_snapAlignmentDistribution, PANEL_SNAPPING_BASE::m_snapAllLayers, PANEL_SNAPPING_BASE::m_snapConstructionExtensions, PANEL_SNAPPING_BASE::m_snapObjectGeometry, PANEL_SNAPPING_BASE::m_snapTangentNormal, m_trackOptions, PANEL_SNAPPING_BASE::m_trackSnapChoice, and MagneticSnapValue().
|
override |
Definition at line 144 of file panel_snapping.cpp.
References PANEL_SNAPPING::VALUES::gridSnap, PANEL_SNAPPING::VALUES::inference, load(), m_gridSnap, m_inference, m_magnetics, and PANEL_SNAPPING::VALUES::magnetics.
|
private |
Definition at line 73 of file panel_snapping.h.
Referenced by PANEL_SNAPPING(), and ResetPanel().
|
private |
Definition at line 77 of file panel_snapping.h.
Referenced by load(), PANEL_SNAPPING(), and TransferDataFromWindow().
|
protectedinherited |
Definition at line 48 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING::PANEL_SNAPPING(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
protectedinherited |
Definition at line 47 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING_BASE().
|
private |
Definition at line 70 of file panel_snapping.h.
Referenced by PANEL_SNAPPING(), TransferDataFromWindow(), and TransferDataToWindow().
|
protectedinherited |
Definition at line 39 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
protectedinherited |
Definition at line 38 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING_BASE().
|
protectedinherited |
Definition at line 36 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING_BASE().
|
protectedinherited |
Definition at line 37 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING_BASE().
|
private |
Definition at line 71 of file panel_snapping.h.
Referenced by load(), PANEL_SNAPPING(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 72 of file panel_snapping.h.
Referenced by load(), PANEL_SNAPPING(), TransferDataFromWindow(), and TransferDataToWindow().
|
protectedinherited |
Definition at line 40 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::PANEL_SNAPPING(), and PANEL_SNAPPING_BASE().
|
protectedinherited |
Definition at line 41 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::PANEL_SNAPPING(), and PANEL_SNAPPING_BASE().
|
private |
Definition at line 75 of file panel_snapping.h.
Referenced by load(), PANEL_SNAPPING(), and TransferDataFromWindow().
|
protectedinherited |
Definition at line 44 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING::PANEL_SNAPPING(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
protectedinherited |
Definition at line 43 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING_BASE().
|
private |
Definition at line 68 of file panel_snapping.h.
Referenced by load(), PANEL_SNAPPING(), and TransferDataFromWindow().
|
protectedinherited |
Definition at line 42 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::PANEL_SNAPPING(), and PANEL_SNAPPING_BASE().
|
protectedinherited |
Definition at line 52 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::PANEL_SNAPPING(), and PANEL_SNAPPING_BASE().
|
protectedinherited |
Definition at line 56 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
protectedinherited |
Definition at line 49 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
protectedinherited |
Definition at line 54 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
protectedinherited |
Definition at line 50 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::PANEL_SNAPPING(), and PANEL_SNAPPING_BASE().
|
protectedinherited |
Definition at line 51 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::PANEL_SNAPPING(), and PANEL_SNAPPING_BASE().
|
protectedinherited |
Definition at line 53 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
protectedinherited |
Definition at line 55 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
private |
Definition at line 76 of file panel_snapping.h.
Referenced by load(), PANEL_SNAPPING(), and TransferDataFromWindow().
|
protectedinherited |
Definition at line 46 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::load(), PANEL_SNAPPING::PANEL_SNAPPING(), PANEL_SNAPPING_BASE(), and PANEL_SNAPPING::TransferDataFromWindow().
|
protectedinherited |
Definition at line 45 of file panel_snapping_base.h.
Referenced by PANEL_SNAPPING::PANEL_SNAPPING(), and PANEL_SNAPPING_BASE().