59 auto& ctxMenu =
m_menu->GetMenu();
63 ctxMenu.AddSeparator( 1 );
78 wxT(
"PICKER_TOOL::Main() called without a source event" ) );
82 m_frame->PushTool( sourceEvent );
102 if( evt->IsCancelInteractive() || evt->IsActivate() )
108 (*m_cancelHandler)();
110 catch( std::exception& )
117 if( evt->IsActivate() )
123 evt->SetPassEvent(
false );
131 bool getNext =
false;
139 getNext = (*m_clickHandler)( *m_picked );
141 catch( std::exception& )
158 else if( evt->IsMotion() )
164 (*m_motionHandler)( cursorPos );
166 catch( std::exception& )
177 m_menu->ShowContextMenu();
189 (*m_finalizeHandler)( finalize_state );
191 catch( std::exception& )
198 m_frame->PopTool( sourceEvent );
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.
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).
VECTOR2< double > VECTOR2D