int PL_SELECTION_TOOL::SelectionMenu( const TOOL_EVENT& aEvent ) { COLLECTOR* collector = aEvent.Parameter<COLLECTOR*>(); if( !doSelectionMenu( collector ) ) collector->m_MenuCancelled = true; return 0; }
void DIALOG_DRC_CONTROL::OnRightUpClearance( wxMouseEvent& event ) { // popup menu to go to either of the items listed in the DRC_ITEM. // Check if user right-clicked on a different item int selection = m_ClearanceListBox->HitTest( event.GetPosition() ); if( selection == wxNOT_FOUND ) selection = m_ClearanceListBox->GetSelection(); else m_ClearanceListBox->SetSelection( selection ); if( selection != wxNOT_FOUND ) doSelectionMenu( m_ClearanceListBox->GetItem( selection ) ); }