37 using namespace std::placeholders;
49 m_frame = getEditFrame<CVPCB_MAINFRAME>();
66 else if( evt->IsKeyPressed() )
68 switch( evt->KeyCode() )
100 static_cast<CVPCB_MAINFRAME::FOCUS_DIR>( tmp );
165 fpframe->Show(
true );
169 if( fpframe->IsIconized() )
170 fpframe->Iconize(
false );
178 wxWindow* focus =
m_frame->FindFocus();
196 static_cast<FOOTPRINTS_LISTBOX::FP_FILTER_T>( aEvent.
Parameter<intptr_t>() ),
223 static_cast<CVPCB_MAINFRAME::ITEM_DIR>( tmp );
233 unsigned int curSel = -1;
234 unsigned int newSel = -1;
238 if( !tempSel.empty() )
239 newSel = tempSel.front();
242 for(
unsigned int i : naComp )
254 if( !tempSel.empty() )
256 newSel = tempSel.front();
263 wxASSERT_MSG(
false,
"Invalid direction" );
267 for(
unsigned int i : naComp )
286 CONDITIONAL_MENU* conditionalMenu = dynamic_cast<CONDITIONAL_MENU*>( actionMenu );
289 if( conditionalMenu )
290 conditionalMenu->Evaluate( dummySel );
int ShowEquFileTable(const TOOL_EVENT &aEvent)
Show the dialog to modify the included footprint association files (.equ)
static TOOL_ACTION showFootprintViewer
Open the footprint viewer.
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
static TOOL_ACTION FilterFPbyFPFilters
Footprint Filtering actions.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
static TOOL_ACTION showEquFileTable
static TOOL_ACTION gotoNextNA
This file is part of the common library.
static TOOL_ACTION gotoPreviousNA
Navigate the component tree.
CVPCB_MAINFRAME * m_frame
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
static TOOL_ACTION changeFocusLeft
void SetFocusedControl(CVPCB_MAINFRAME::CONTROL_TYPE aControl)
Set the focus to a specific control.
static TOOL_ACTION changeFocusRight
Window control actions.
int SaveAssociations(const TOOL_EVENT &aEvent)
Save the associations to the schematic.
int ToNA(const TOOL_EVENT &aEvent)
Move the selected component to the not associated one in the specified direction.
static TOOL_ACTION FilterFPbyLibrary
int ChangeFocus(const TOOL_EVENT &aEvent)
Rotate focus in the CVPCB window.
void SetSelectedComponent(int aIndex, bool aSkipUpdate=false)
Set the currently selected component in the components listbox.
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
int ToggleFootprintFilter(const TOOL_EVENT &aEvent)
Filter the footprint list by toggling the given filter type.
static TOOL_ACTION updateMenu
static TOOL_ACTION saveAssociations
Management actions.
FOCUS_DIR
Directions to rotate the focus through the listboxes is.
static TOOL_ACTION filterFPbyPin
static TOOL_ACTION controlActivate
ITEM_DIR
Directions to move when selecting items.
int ShowFootprintViewer(const TOOL_EVENT &aEvent)
Create or Update the frame showing the current highlighted footprint and (if showed) the 3D display f...
int Main(const TOOL_EVENT &aEvent)
Main processing loop for the CVPCB window.
CVPCB_MAINFRAME::CONTROL_TYPE GetFocusedControl()
Find out which control currently has focus.
void SetFootprintFilter(FOOTPRINTS_LISTBOX::FP_FILTER_T aFilter, CVPCB_MAINFRAME::CVPCB_FILTER_ACTION aAction)
Function SetFootprintFilter Set a filter criteria to either on/off or toggle the criteria.
std::vector< unsigned int > GetComponentIndices(CVPCB_MAINFRAME::CRITERIA aCriteria=CVPCB_MAINFRAME::ALL_COMPONENTS)
Get the indices for all the components meeting the specified criteria in the components listbox.
Not associated components.
int UpdateMenu(const TOOL_EVENT &aEvent)
Update the menu to reflect the current tool states.
DISPLAY_FOOTPRINTS_FRAME * GetFootprintViewerFrame() const
bool SaveFootprintAssociation(bool doSaveSchematic)
Function SaveFootprintAssociation saves the edits that the user has done by sending them back to eesc...