KiCad PCB EDA Suite
|
#include <vertex_editor_pane.h>
Public Member Functions | |
PCB_VERTEX_EDITOR_PANE (PCB_BASE_EDIT_FRAME *aFrame) | |
~PCB_VERTEX_EDITOR_PANE () override | |
void | SetItem (BOARD_ITEM *aItem) |
void | ClearItem () |
bool | IsEditingItem (BOARD_ITEM *aItem) const |
Check if the pane is currently editing the given item. | |
void | OnSelectionChanged (BOARD_ITEM *aNewItem) |
Update the pane in response to external selection changes. | |
Private Member Functions | |
void | refreshGrid () |
void | updateRow (int aRow) |
void | updateHighlight (int aRow) |
void | resizeColumns () |
void | onPolygonModified () |
bool | parseCellValue (const wxString &aText, ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType, int &aResult) const |
wxString | formatCoord (int aValue, ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType) const |
SHAPE_POLY_SET * | getPoly () |
const SHAPE_POLY_SET * | getPoly () const |
void | OnGridCellChange (wxGridEvent &aEvent) |
void | OnGridSelectCell (wxGridEvent &aEvent) |
void | OnSize (wxSizeEvent &aEvent) |
Private Attributes | |
PCB_BASE_EDIT_FRAME * | m_frame |
BOARD_ITEM * | m_item |
ZONE * | m_zone |
PCB_SHAPE * | m_shape |
wxGrid * | m_grid |
std::vector< SHAPE_POLY_SET::VERTEX_INDEX > | m_rows |
bool | m_updatingGrid |
Definition at line 40 of file vertex_editor_pane.h.
PCB_VERTEX_EDITOR_PANE::PCB_VERTEX_EDITOR_PANE | ( | PCB_BASE_EDIT_FRAME * | aFrame | ) |
Definition at line 43 of file vertex_editor_pane.cpp.
References _, m_frame, m_grid, m_item, m_shape, m_updatingGrid, m_zone, OnGridCellChange(), OnGridSelectCell(), OnSize(), and resizeColumns().
|
override |
Definition at line 80 of file vertex_editor_pane.cpp.
References m_frame.
void PCB_VERTEX_EDITOR_PANE::ClearItem | ( | ) |
Definition at line 106 of file vertex_editor_pane.cpp.
References m_grid, m_item, m_rows, m_shape, m_updatingGrid, and m_zone.
Referenced by OnSelectionChanged().
|
private |
Definition at line 237 of file vertex_editor_pane.cpp.
References m_frame.
Referenced by updateRow().
|
private |
Definition at line 244 of file vertex_editor_pane.cpp.
References m_shape, m_zone, and POLY.
Referenced by OnGridCellChange(), refreshGrid(), and updateRow().
|
private |
Definition at line 255 of file vertex_editor_pane.cpp.
|
inline |
Check if the pane is currently editing the given item.
Definition at line 52 of file vertex_editor_pane.h.
References m_item.
|
private |
Definition at line 267 of file vertex_editor_pane.cpp.
References _, ORIGIN_TRANSFORMS::ABS_X_COORD, ORIGIN_TRANSFORMS::ABS_Y_COORD, SHAPE_POLY_SET::CVertex(), getPoly(), m_frame, m_grid, m_item, m_rows, m_updatingGrid, m_zone, COMMIT::Modify(), parseCellValue(), BOARD_COMMIT::Push(), SHAPE_POLY_SET::SetVertex(), updateHighlight(), updateRow(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCB_VERTEX_EDITOR_PANE().
|
private |
Definition at line 334 of file vertex_editor_pane.cpp.
References updateHighlight().
Referenced by PCB_VERTEX_EDITOR_PANE().
|
private |
Definition at line 203 of file vertex_editor_pane.cpp.
void PCB_VERTEX_EDITOR_PANE::OnSelectionChanged | ( | BOARD_ITEM * | aNewItem | ) |
Update the pane in response to external selection changes.
This should be called when the selection changes to update or clear the editor.
Definition at line 120 of file vertex_editor_pane.cpp.
References ClearItem(), EDA_SHAPE::GetShape(), POLY, and SetItem().
|
private |
Definition at line 364 of file vertex_editor_pane.cpp.
References resizeColumns().
Referenced by PCB_VERTEX_EDITOR_PANE().
|
private |
Definition at line 219 of file vertex_editor_pane.cpp.
References m_frame, pcbIUScale, and EDA_UNIT_UTILS::UI::ValueFromString().
Referenced by OnGridCellChange().
|
private |
Definition at line 148 of file vertex_editor_pane.cpp.
References SHAPE_POLY_SET::CIterateWithHoles(), getPoly(), m_grid, m_rows, m_updatingGrid, and updateRow().
Referenced by SetItem().
|
private |
Definition at line 341 of file vertex_editor_pane.cpp.
References m_grid.
Referenced by OnSize(), PCB_VERTEX_EDITOR_PANE(), and SetItem().
void PCB_VERTEX_EDITOR_PANE::SetItem | ( | BOARD_ITEM * | aItem | ) |
Definition at line 87 of file vertex_editor_pane.cpp.
References m_grid, m_item, m_shape, m_zone, refreshGrid(), resizeColumns(), and updateHighlight().
Referenced by OnSelectionChanged().
|
private |
Definition at line 191 of file vertex_editor_pane.cpp.
References m_frame, and m_item.
Referenced by OnGridCellChange(), OnGridSelectCell(), and SetItem().
|
private |
Definition at line 172 of file vertex_editor_pane.cpp.
References ORIGIN_TRANSFORMS::ABS_X_COORD, ORIGIN_TRANSFORMS::ABS_Y_COORD, SHAPE_POLY_SET::CVertex(), formatCoord(), getPoly(), m_grid, m_rows, m_updatingGrid, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by OnGridCellChange(), and refreshGrid().
|
private |
Definition at line 79 of file vertex_editor_pane.h.
Referenced by formatCoord(), OnGridCellChange(), onPolygonModified(), parseCellValue(), PCB_VERTEX_EDITOR_PANE(), updateHighlight(), and ~PCB_VERTEX_EDITOR_PANE().
|
private |
Definition at line 84 of file vertex_editor_pane.h.
Referenced by ClearItem(), OnGridCellChange(), PCB_VERTEX_EDITOR_PANE(), refreshGrid(), resizeColumns(), SetItem(), and updateRow().
|
private |
Definition at line 80 of file vertex_editor_pane.h.
Referenced by ClearItem(), IsEditingItem(), OnGridCellChange(), onPolygonModified(), PCB_VERTEX_EDITOR_PANE(), SetItem(), and updateHighlight().
|
private |
Definition at line 86 of file vertex_editor_pane.h.
Referenced by ClearItem(), OnGridCellChange(), refreshGrid(), and updateRow().
|
private |
Definition at line 82 of file vertex_editor_pane.h.
Referenced by ClearItem(), getPoly(), getPoly(), PCB_VERTEX_EDITOR_PANE(), and SetItem().
|
private |
Definition at line 88 of file vertex_editor_pane.h.
Referenced by ClearItem(), OnGridCellChange(), PCB_VERTEX_EDITOR_PANE(), refreshGrid(), and updateRow().
|
private |
Definition at line 81 of file vertex_editor_pane.h.
Referenced by ClearItem(), getPoly(), getPoly(), OnGridCellChange(), onPolygonModified(), PCB_VERTEX_EDITOR_PANE(), and SetItem().