61 m_frame = getEditFrame<EDA_DRAW_FRAME>();
63 auto& ctxMenu =
m_menu->GetMenu();
67 ctxMenu.AddSeparator( 1 );
82 wxT(
"PICKER_TOOL::Main() called without a source event" ) );
106 if( evt->IsCancelInteractive() || evt->IsActivate() )
112 (*m_cancelHandler)();
114 catch( std::exception& )
121 if( evt->IsActivate() )
127 evt->SetPassEvent(
false );
136 bool getNext =
false;
144 getNext = (*m_clickHandler)( *m_picked );
146 catch( std::exception& )
162 else if( evt->IsMotion() )
168 (*m_motionHandler)( cursorPos );
170 catch( std::exception& )
183 m_menu->ShowContextMenu();
194 (*m_finalizeHandler)( finalize_state );
196 catch( std::exception& )
static TOOL_ACTION cancelInteractive
static TOOL_ACTION pickerTool
void AddStandardSubMenus(TOOL_MENU &aMenu)
Construct a "basic" menu for a tool, containing only items that apply to all tools (e....
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
bool IsGridVisible() const
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.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).