29#include <wx/clipbrd.h>
40using namespace std::placeholders;
65 wxLogNull raiiDoNotLog;
67 if( wxTheClipboard->Open() )
70 wxTheClipboard->Flush();
71 wxTheClipboard->Close();
91 if( idx.empty() || !comp )
106 if( wxTheClipboard->Open() )
108 if( !wxTheClipboard->SetData(
new wxTextDataObject( fpid.
GetUniStringLibId() ) ) )
110 wxTheClipboard->Close();
114 wxTheClipboard->Flush();
115 wxTheClipboard->Close();
140 wxTextDataObject data;
145 if( wxTheClipboard->Open() )
147 wxTheClipboard->GetData( data );
148 wxTheClipboard->Close();
156 if( fpid.
Parse( data.GetText() ) >= 0 )
160 bool firstAssoc =
true;
162 for(
unsigned int i : idx )
174 m_frame = getEditFrame<CVPCB_MAINFRAME>();
208 wxString msg = wxString::Format(
_(
"'%s' is not a valid footprint." ),
214 bool firstAssoc =
true;
241 bool firstAssoc =
true;
260 bool firstAssoc =
true;
Store all of the related footprint information found in a netlist.
const LIB_ID & GetFPID() const
static TOOL_ACTION deleteAll
static TOOL_ACTION gotoNextNA
static TOOL_ACTION deleteAssoc
static TOOL_ACTION associate
static TOOL_ACTION autoAssociate
Footprint Association actions.
A class to define a footprint association to be made in cvpcb.
CVPCB_MAINFRAME::CONTROL_TYPE GetFocusedControl() const
Find out which control currently has focus.
void RedoAssociation()
Redo the most recently undone association.
wxString GetSelectedFootprint()
void SetSelectedComponent(int aIndex, bool aSkipUpdate=false)
Set the currently selected component in the components listbox.
@ CONTROL_FOOTPRINT
Footprint listbox.
@ CONTROL_COMPONENT
Component listbox.
void UndoAssociation()
Undo the most recent associations that were performed.
void DisplayStatus()
Update the information displayed on the status bar at bottom of the main frame.
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.
void AssociateFootprint(const CVPCB_ASSOCIATION &aAssociation, bool aNewEntry=true, bool aAddUndoItem=true)
Associate a footprint with a specific component in the list.
@ ALL_COMPONENTS
All components.
@ SEL_COMPONENTS
Selected components.
COMPONENT * GetSelectedComponent()
Get the selected component from the component listbox.
void AutomaticFootprintMatching()
Called by the automatic association button Read *.equ files to try to find corresponding footprint fo...
A logical library item identifier and consists of various portions much like a URI.
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
bool IsValid() const
Check if this LID_ID is valid.
wxString GetUniStringLibId() const
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.