55 m_rows.push_back( aConstraint );
62 long row =
m_list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
64 if( row < 0 || row >=
static_cast<long>(
m_rows.size() ) )
BOARD_CONSTRAINT_DIAGNOSTICS DiagnoseBoardConstraints(BOARD *aBoard)
Diagnose every constraint cluster on the board (validate only – geometry is not changed) and return t...
Information pertinent to a Pcbnew printed circuit board.
DIALOG_CONSTRAINT_LIST_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Geometric Constraints"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(560, 360), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void onRowActivated(wxListEvent &aEvent) override
DIALOG_CONSTRAINT_LIST(PCB_BASE_FRAME *aParent, BOARD *aBoard, std::function< void(PCB_CONSTRAINT *)> aHighlight, std::function< void(PCB_CONSTRAINT *)> aRemove)
std::vector< PCB_CONSTRAINT * > m_rows
Row index -> constraint.
PCB_BASE_FRAME * m_parentFrame
std::function< void(PCB_CONSTRAINT *)> m_remove
void onDelete(wxCommandEvent &aEvent) override
void Populate()
Rebuild the rows from the board's current constraints.
PCB_CONSTRAINT * selectedConstraint() const
std::function< void(PCB_CONSTRAINT *)> m_highlight
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
A geometric constraint between board items (issue #2329).
void PopulateConstraintList(wxListCtrl *aList, BOARD *aBoard, UNITS_PROVIDER *aUnits, const BOARD_CONSTRAINT_DIAGNOSTICS &aDiag, const std::function< void(long, PCB_CONSTRAINT *)> &aOnRow)
Fill aList with one row per constraint on aBoard (board-owned then footprint-owned),...
void AddConstraintListColumns(wxListCtrl *aList)
Add the four constraint columns (Item 1 / Item 2 / Constraint / State) to a report-mode list.
Board-wide diagnostics for the constraint overlay and info bar.