52 wxT(
"PCB_PICKER_TOOL::Main() called without a source event" ) );
80 grid.SetUseGrid(
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
81 cursorPos =
grid.BestSnapAnchor( cursorPos,
nullptr );
85 if( evt->IsCancelInteractive() || evt->IsActivate() )
93 catch( std::exception& )
99 if( evt->IsActivate() )
108 bool getNext =
false;
116 getNext = (*m_clickHandler)( *m_picked );
118 catch( std::exception& )
135 else if( evt->IsMotion() )
141 (*m_motionHandler)( cursorPos );
143 catch( std::exception& )
173 (*m_finalizeHandler)( finalize_state );
175 catch( std::exception& )
static TOOL_ACTION pickerSubTool
static TOOL_ACTION pickerTool
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
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()
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual MAGNETIC_SETTINGS * GetMagneticItemsSettings()
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
std::vector< FAB_LAYER_COLOR > dummy