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() )
176 fpframe->Show(
true );
181 blocking_win->Close(
true );
183 if( fpframe->IsIconized() )
184 fpframe->Iconize(
false );
192 wxWindow* focus =
m_frame->FindFocus();
226 m_frame->SaveFootprintAssociation(
true );
233 m_frame->SaveFootprintAssociation(
false );
242 std::vector<unsigned int> naComp =
244 std::vector<unsigned int> tempSel =
252 bool changeSel =
false;
253 unsigned int newSel = UINT_MAX;
258 if( !tempSel.empty() )
259 newSel = tempSel.front();
262 for(
unsigned int idx : naComp )
275 if( !tempSel.empty() )
277 newSel = tempSel.front();
280 for(
int jj = naComp.size()-1; jj >= 0; jj-- )
282 unsigned idx = naComp[jj];
296 wxASSERT_MSG(
false,
"Invalid direction" );
301 m_frame->SetSelectedComponent( newSel );
313 if( conditionalMenu )
314 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.