29#include <wx/clipbrd.h>
40using namespace std::placeholders;
56 else if(
m_frame->GetSelectedComponent() )
57 fpid =
m_frame->GetSelectedComponent()->GetFPID();
65 wxLogNull raiiDoNotLog;
67 if( wxTheClipboard->Open() )
70 wxTheClipboard->Flush();
71 wxTheClipboard->Close();
81 if(
m_frame->GetFocusedControl()
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 )
198 wxString fp =
m_frame->GetSelectedFootprint();
208 wxString msg = wxString::Format(
_(
"'%s' is not a valid footprint." ),
214 bool firstAssoc =
true;
219 m_frame->AssociateFootprint( newfp, firstAssoc );
232 m_frame->AutomaticFootprintMatching();
241 bool firstAssoc =
true;
258 m_frame->SetSelectedComponent( -1,
true );
260 bool firstAssoc =
true;
269 m_frame->SetSelectedComponent( -1,
true );
270 m_frame->SetSelectedComponent( 0 );
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.
@ CONTROL_FOOTPRINT
Footprint listbox.
@ CONTROL_COMPONENT
Component listbox.
@ ALL_COMPONENTS
All components.
@ SEL_COMPONENTS
Selected components.
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.