36#include <wx/settings.h>
39using namespace std::placeholders;
51 m_frame = getEditFrame<CVPCB_MAINFRAME>();
68 else if( evt->IsKeyPressed() )
70 switch( evt->KeyCode() )
186 fpframe->Show(
true );
191 blocking_win->Close(
true );
193 if( fpframe->IsIconized() )
194 fpframe->Iconize(
false );
202 wxWindow* focus =
m_frame->FindFocus();
260 bool changeSel =
false;
261 unsigned int newSel = UINT_MAX;
266 if( !tempSel.empty() )
267 newSel = tempSel.front();
270 for(
unsigned int idx : naComp )
283 if( !tempSel.empty() )
285 newSel = tempSel.front();
288 for(
int jj = naComp.size()-1; jj >= 0; jj-- )
290 unsigned idx = naComp[jj];
304 wxASSERT_MSG(
false,
"Invalid direction" );
321 if( conditionalMenu )
322 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
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
This method is meant to be overridden in order to specify handlers for 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.
CVPCB_MAINFRAME::CONTROL_TYPE GetFocusedControl() const
Find out which control currently has focus.
@ FILTER_TOGGLE
Toggle the filter state.
DISPLAY_FOOTPRINTS_FRAME * GetFootprintViewerFrame() const
void SetFootprintFilter(FOOTPRINTS_LISTBOX::FP_FILTER_T aFilter, CVPCB_MAINFRAME::CVPCB_FILTER_ACTION aAction)
Set a filter criteria to either on/off or toggle the criteria.
void SetSelectedComponent(int aIndex, bool aSkipUpdate=false)
Set the currently selected component in the components listbox.
@ CONTROL_NONE
No controls have focus.
@ CONTROL_LIBRARY
Library listbox.
@ CONTROL_FOOTPRINT
Footprint listbox.
@ CONTROL_COMPONENT
Component listbox.
void SetFocusedControl(CVPCB_MAINFRAME::CONTROL_TYPE aControl)
Set the focus to a specific control.
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.
@ NA_COMPONENTS
Not associated components.
@ SEL_COMPONENTS
Selected components.
bool SaveFootprintAssociation(bool doSaveSchematic)
Save the edits that the user has done by sending them back to Eeschema via the kiway.
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.
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
wxWindow * GetBlockingDialog()
Gets the window pointer to the blocking dialog (to send it signals)
virtual KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true)
Return the KIFACE* given a FACE_T.
This file is part of the common library.