68 wxString msg = wxString::Format(
_(
"Board edges must be defined on the %s layer." ),
71 frame()->GetInfoBar()->RemoveAllButtons();
72 frame()->GetInfoBar()->ShowMessageFor( msg, 5000, wxICON_ERROR );
88 std::unique_ptr<WX_PROGRESS_REPORTER> progressReporter =
89 std::make_unique<WX_PROGRESS_REPORTER>(
frame(),
_(
"Autoplace Components" ), 1 );
95 commit.
Push(
_(
"Autoplace Components" ) );
105 std::vector<FOOTPRINT*> footprints;
110 footprints.push_back(
static_cast<FOOTPRINT*
>( item ) );
119 std::vector<FOOTPRINT*> footprints;
AR_RESULT AutoplaceFootprints(std::vector< FOOTPRINT * > &aFootprints, BOARD_COMMIT *aCommit, bool aPlaceOffboardModules=false)
void SetOverlay(std::shared_ptr< KIGFX::VIEW_OVERLAY > aOverlay)
Set a VIEW overlay to draw items during a autoplace session.
void SetRefreshCallback(std::function< int(FOOTPRINT *aFootprint)> aCallback)
Callback to redraw on screen the view after changes, for instance after moving a footprint.
void SetProgressReporter(PROGRESS_REPORTER *aReporter)
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
virtual void Revert() override
const BOX2I GetBoardEdgesBoundingBox() const
Return the board bounding box calculated using exclusively the board edges (graphics on Edge....
constexpr size_type GetWidth() const
constexpr size_type GetHeight() const
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A base class for most all the KiCad significant classes used in schematics and boards.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
std::shared_ptr< VIEW_OVERLAY > MakeOverlay()
void MarkDirty()
Force redraw of view on the next rendering.
static TOOL_ACTION autoplaceOffboardComponents
static TOOL_ACTION autoplaceSelectedComponents
Common, abstract interface for edit frames.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
wxString LayerName(int aLayer)
Returns the default display name for a given layer.
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > overlay
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint