|
KiCad PCB EDA Suite
|
Dockable panel listing the board's geometric constraints (issue #2329). More...
#include <panel_constraints.h>
Public Member Functions | |
| PANEL_CONSTRAINTS (PCB_BASE_EDIT_FRAME *aFrame) | |
| void | RefreshList () |
| Rebuild the rows from the board's current constraints (solving the board diagnosis here). | |
| void | RefreshList (const BOARD_CONSTRAINT_DIAGNOSTICS &aDiag) |
| Rebuild the rows using a caller-supplied diagnosis, so the board is solved only once when the tool refreshes several views together. | |
| void | SelectConstraint (const KIID &aConstraint) |
Select and reveal the row for aConstraint (e.g. when its badge is clicked on canvas). | |
Protected Attributes | |
| wxListCtrl * | m_list |
| wxButton * | m_refreshButton |
| wxButton * | m_deleteButton |
Private Member Functions | |
| CONSTRAINT_EDIT_TOOL * | constraintTool () const |
| The owning constraint tool, which performs all board mutation and selection; the panel only displays rows (holding KIIDs) and raises intents to it. | |
| const KIID & | rowConstraint (long aRow) const |
| The KIID for a row, or niluuid if out of range. | |
| long | columnAt (long aRow, const wxPoint &aPos) const |
The list column under aPos within row aRow, or -1. | |
| void | onLeftDown (wxMouseEvent &aEvent) |
| void | onRowActivated (wxListEvent &aEvent) override |
| void | onDelete (wxCommandEvent &aEvent) override |
| void | onRefresh (wxCommandEvent &aEvent) override |
Private Attributes | |
| PCB_BASE_EDIT_FRAME * | m_frame |
| std::vector< KIID > | m_rows |
Dockable panel listing the board's geometric constraints (issue #2329).
Each row shows the constrained items in their own columns (up to two), the constraint type (with its value, in display units, when it has one), and the diagnostic state. Clicking an item cell highlights that item on the canvas; double-clicking a valued row opens its value dialog. Geometry-free constraints can't be picked on the canvas, so this is the place to see, locate and delete them.
Definition at line 43 of file panel_constraints.h.
| PANEL_CONSTRAINTS::PANEL_CONSTRAINTS | ( | PCB_BASE_EDIT_FRAME * | aFrame | ) |
Definition at line 36 of file panel_constraints.cpp.
References AddConstraintListColumns(), m_frame, PANEL_CONSTRAINTS_BASE::m_list, onLeftDown(), PANEL_CONSTRAINTS_BASE::PANEL_CONSTRAINTS_BASE(), and RefreshList().
|
private |
The list column under aPos within row aRow, or -1.
Uses cell rectangles because the HitTest subitem out-param is unreliable on the generic (GTK) list control.
Definition at line 98 of file panel_constraints.cpp.
References PANEL_CONSTRAINTS_BASE::m_list.
Referenced by onLeftDown().
|
private |
The owning constraint tool, which performs all board mutation and selection; the panel only displays rows (holding KIIDs) and raises intents to it.
Definition at line 83 of file panel_constraints.cpp.
References m_frame.
Referenced by onDelete(), onLeftDown(), and onRowActivated().
|
overrideprivatevirtual |
Reimplemented from PANEL_CONSTRAINTS_BASE.
Definition at line 142 of file panel_constraints.cpp.
References constraintTool(), PANEL_CONSTRAINTS_BASE::m_list, and rowConstraint().
|
private |
Definition at line 115 of file panel_constraints.cpp.
References columnAt(), CONSTRAINT_COL_ITEM_1, CONSTRAINT_COL_ITEM_2, constraintTool(), CONSTRAINT_EDIT_TOOL::HighlightConstraintMembers(), PANEL_CONSTRAINTS_BASE::m_list, and m_rows.
Referenced by PANEL_CONSTRAINTS().
|
overrideprivatevirtual |
Reimplemented from PANEL_CONSTRAINTS_BASE.
Definition at line 159 of file panel_constraints.cpp.
References RefreshList().
|
overrideprivatevirtual |
Reimplemented from PANEL_CONSTRAINTS_BASE.
Definition at line 134 of file panel_constraints.cpp.
References constraintTool(), and rowConstraint().
| void PANEL_CONSTRAINTS::RefreshList | ( | ) |
Rebuild the rows from the board's current constraints (solving the board diagnosis here).
Definition at line 49 of file panel_constraints.cpp.
References DiagnoseBoardConstraints(), m_frame, and RefreshList().
Referenced by onRefresh(), PANEL_CONSTRAINTS(), and RefreshList().
| void PANEL_CONSTRAINTS::RefreshList | ( | const BOARD_CONSTRAINT_DIAGNOSTICS & | aDiag | ) |
Rebuild the rows using a caller-supplied diagnosis, so the board is solved only once when the tool refreshes several views together.
Definition at line 57 of file panel_constraints.cpp.
References m_frame, PANEL_CONSTRAINTS_BASE::m_list, m_rows, and PopulateConstraintList().
|
private |
The KIID for a row, or niluuid if out of range.
Definition at line 89 of file panel_constraints.cpp.
References m_rows, and niluuid.
Referenced by onDelete(), and onRowActivated().
| void PANEL_CONSTRAINTS::SelectConstraint | ( | const KIID & | aConstraint | ) |
Select and reveal the row for aConstraint (e.g. when its badge is clicked on canvas).
Definition at line 69 of file panel_constraints.cpp.
References PANEL_CONSTRAINTS_BASE::m_list, and m_rows.
|
protectedinherited |
Definition at line 38 of file panel_constraints_base.h.
Referenced by PANEL_CONSTRAINTS_BASE(), and ~PANEL_CONSTRAINTS_BASE().
|
private |
Definition at line 75 of file panel_constraints.h.
Referenced by constraintTool(), PANEL_CONSTRAINTS(), RefreshList(), and RefreshList().
|
protectedinherited |
Definition at line 36 of file panel_constraints_base.h.
Referenced by PANEL_CONSTRAINTS::columnAt(), PANEL_CONSTRAINTS::onDelete(), PANEL_CONSTRAINTS::onLeftDown(), PANEL_CONSTRAINTS::PANEL_CONSTRAINTS(), PANEL_CONSTRAINTS_BASE(), PANEL_CONSTRAINTS::RefreshList(), PANEL_CONSTRAINTS::SelectConstraint(), and ~PANEL_CONSTRAINTS_BASE().
|
protectedinherited |
Definition at line 37 of file panel_constraints_base.h.
Referenced by PANEL_CONSTRAINTS_BASE(), and ~PANEL_CONSTRAINTS_BASE().
|
private |
Definition at line 76 of file panel_constraints.h.
Referenced by onLeftDown(), RefreshList(), rowConstraint(), and SelectConstraint().