42#define ID_MATCH_FP_ALL 4200
43#define ID_MATCH_FP_SELECTED 4201
44#define ID_MATCH_FP_REF 4202
45#define ID_MATCH_FP_VAL 4203
46#define ID_MATCH_FP_ID 4204
64 bool updateMode,
bool selectedMode ) :
68 m_currentFootprint( aFootprint ),
69 m_updateMode( updateMode )
73 SetTitle(
_(
"Change Footprints" ) );
74 m_matchAll->SetLabel(
_(
"Change all footprints on board" ) );
86 wxString x =
_(
"Update/reset strings: there are two cases these descriptions need to cover: "
87 "the user made overrides to a footprint on the PCB and wants to remove them, "
88 "or the user made changes to the library footprint and wants to propagate "
89 "them back to the PCB." );
131 wxCommandEvent event;
132 event.SetEventObject(
this );
160 { wxID_CANCEL,
_(
"Close" ) } } );
193 return aFootprint->
GetFPID() == specifiedID;
209 default:
return nullptr;
218 wxRadioButton* rb_butt_list[] =
231 for(
int ii = 0; rb_butt_list[ii]; ++ii )
233 bool state = rb_butt_list[ii] == rb_button;
235 if( rb_butt_list[ii]->GetValue() != state )
236 rb_butt_list[ii]->SetValue( state );
245 if( event.GetEventObject() ==
this )
256 if( event.GetEventObject() ==
this )
267 if( event.GetEventObject() ==
this )
278 if( event.GetEventObject() ==
this )
289 if( event.GetEventObject() ==
this )
357 msg.Printf(
_(
"Updated footprint %s (%s)" ) + wxS(
": " ),
363 msg.Printf(
_(
"Changed footprint %s from '%s' to '%s'" ) + wxS(
": " ),
373 msg +=
_(
"*** library footprint not found ***" );
393 msg +=
_(
": (no changes)" );
408 wxString newname =
m_newID->GetValue();
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
FOOTPRINTS & Footprints()
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
virtual bool ShowModal(wxString *aResult=nullptr, wxWindow *aResultantFocusWindow=nullptr)
Show this wxFrame as if it were a modal dialog, with all other instantiated wxFrames disabled until t...
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
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.
FOOTPRINT * LoadFootprint(const LIB_ID &aFootprintId)
Attempt to load aFootprintId from the footprint library table.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void Compile_Ratsnest(bool aDisplayStatus)
Create the entire board ratsnest.
The main frame for Pcbnew.
void ExchangeFootprint(FOOTPRINT *aExisting, FOOTPRINT *aNew, BOARD_COMMIT &aCommit, bool deleteExtraTexts=true, bool resetTextLayers=true, bool resetTextEffects=true, bool resetFabricationAttrs=true, bool reset3DModels=true, bool *aUpdated=nullptr)
Replace aExisting footprint by aNew footprint using the Existing footprint settings (position,...
const char * c_str() const
void Clear()
return the number of messages matching the given severity mask.
void SetLazyUpdate(bool aLazyUpdate)
Forces updating the HTML page, after the report is built in lazy mode If aSort = true,...
void SetFileName(const wxString &aReportFileName)
void Report(const wxString &aText, SEVERITY aSeverity, REPORTER::LOCATION aLocation=REPORTER::LOC_BODY)
Reports the string.
void Flush(bool aSort=false)
Set the visible severity filter.
@ FRAME_FOOTPRINT_VIEWER_MODAL
This file contains miscellaneous commonly used macros and functions.
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
static wxString FROM_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.
std::vector< FAB_LAYER_COLOR > dummy
bool WildCompareString(const wxString &pattern, const wxString &string_to_tst, bool case_sensitive)
Compare a string against wild card (* and ?) pattern using the usual rules.