36#include <wx/settings.h>
39using namespace std::placeholders;
68 else if( evt->IsKeyPressed() )
70 switch( evt->KeyCode() )
105 switch(
m_frame->GetFocusedControl() )
127 switch(
m_frame->GetFocusedControl() )
186 fpframe->Show(
true );
191 blocking_win->Close(
true );
193 if( fpframe->IsIconized() )
194 fpframe->Iconize(
false );
202 wxWindow* focus =
m_frame->FindFocus();
236 m_frame->SaveFootprintAssociation(
true );
243 m_frame->SaveFootprintAssociation(
false );
252 std::vector<unsigned int> naComp =
254 std::vector<unsigned int> tempSel =
262 bool changeSel =
false;
263 unsigned int newSel = UINT_MAX;
268 if( !tempSel.empty() )
269 newSel = tempSel.front();
272 for(
unsigned int idx : naComp )
285 if( !tempSel.empty() )
287 newSel = tempSel.front();
290 for(
int jj = naComp.size()-1; jj >= 0; jj-- )
292 unsigned idx = naComp[jj];
306 wxASSERT_MSG(
false,
"Invalid direction" );
311 m_frame->SetSelectedComponent( newSel );
323 if( conditionalMenu )
324 conditionalMenu->Evaluate( dummySel );
static TOOL_ACTION updateMenu
static TOOL_ACTION showEquFileTable
static TOOL_ACTION gotoPreviousNA
Navigate the component tree.
static TOOL_ACTION changeFocusLeft
static TOOL_ACTION gotoNextNA
static TOOL_ACTION saveAssociationsToFile
static TOOL_ACTION FilterFPbyLibrary
static TOOL_ACTION filterFPbyPin
static TOOL_ACTION changeFocusRight
Window control actions.
static TOOL_ACTION controlActivate
Activation actions.
static TOOL_ACTION FilterFPbyFPFilters
Footprint Filtering actions.
static TOOL_ACTION saveAssociationsToSchematic
Management actions.
static TOOL_ACTION showFootprintViewer
Open the footprint viewer.
CVPCB_MAINFRAME * m_frame
int SaveAssociationsToFile(const TOOL_EVENT &aEvent)
Save the associations to the schematic and save schematic to file.
int Main(const TOOL_EVENT &aEvent)
Main processing loop for the CvPcb window.
void setTransitions() override
Set up handlers for various events.
int SaveAssociationsToSchematic(const TOOL_EVENT &aEvent)
Save the associations to the schematic.
int UpdateMenu(const TOOL_EVENT &aEvent)
Update the menu to reflect the current tool states.
int ShowFootprintViewer(const TOOL_EVENT &aEvent)
Create or Update the frame showing the current highlighted footprint and (if showed) the 3D display f...
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
int ChangeFocus(const TOOL_EVENT &aEvent)
Rotate focus in the CVPCB window.
int ShowEquFileTable(const TOOL_EVENT &aEvent)
Show the dialog to modify the included footprint association files (.equ).
int ToNA(const TOOL_EVENT &aEvent)
Move the selected component to the not associated one in the specified direction.
int ToggleFootprintFilter(const TOOL_EVENT &aEvent)
Filter the footprint list by toggling the given filter type.
ITEM_DIR
Directions to move when selecting items.
@ ITEM_NEXT
The next item.
@ ITEM_PREV
The previous item.
@ FILTER_TOGGLE
Toggle the filter state.
@ CONTROL_NONE
No controls have focus.
@ CONTROL_LIBRARY
Library listbox.
@ CONTROL_FOOTPRINT
Footprint listbox.
@ CONTROL_COMPONENT
Component listbox.
@ NA_COMPONENTS
Not associated components.
@ SEL_COMPONENTS
Selected components.
FOCUS_DIR
Directions to rotate the focus through the listboxes is.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
wxWindow * GetBlockingDialog()
Gets the window pointer to the blocking dialog (to send it signals)
This file is part of the common library.