47 const auto snapIsSetToAllLayers = [&](
const SELECTION& aSel )
81 wxT(
"PCB_PICKER_TOOL::Main() called without a source event" ) );
84 frame->PushTool( sourceEvent );
109 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
114 if( evt->IsCancelInteractive() || evt->IsActivate() )
120 (*m_cancelHandler)();
122 catch( std::exception& )
128 if( evt->IsActivate() )
137 bool getNext =
false;
145 getNext = (*m_clickHandler)( *m_picked );
147 catch( std::exception& )
164 else if( evt->IsMotion() )
170 (*m_motionHandler)( cursorPos );
172 catch( std::exception& )
202 (*m_finalizeHandler)( finalize_state );
204 catch( std::exception& )
214 frame->PopTool( sourceEvent );
static TOOL_ACTION pickerSubTool
static TOOL_ACTION cancelInteractive
static TOOL_ACTION pickerTool
An interface for classes handling user events controlling the view behavior such as zooming,...
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual void ForceCursorPosition(bool aEnabled, const VECTOR2D &aPosition=VECTOR2D(0, 0))
Place the cursor immediately at a given point.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
virtual VECTOR2D GetMousePosition(bool aWorldCoordinates=true) const =0
Return the current mouse pointer position.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
static LSET AllLayersMask()
static TOOL_ACTION magneticSnapAllLayers
static TOOL_ACTION magneticSnapActiveLayer
Snapping controls.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
std::vector< FAB_LAYER_COLOR > dummy