KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCB_VERTEX_EDITOR_PANE Class Reference

#include <vertex_editor_pane.h>

Inheritance diagram for PCB_VERTEX_EDITOR_PANE:

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_SETgetPoly ()
 
const SHAPE_POLY_SETgetPoly () const
 
void OnGridCellChange (wxGridEvent &aEvent)
 
void OnGridSelectCell (wxGridEvent &aEvent)
 
void OnSize (wxSizeEvent &aEvent)
 

Private Attributes

PCB_BASE_EDIT_FRAMEm_frame
 
BOARD_ITEMm_item
 
ZONEm_zone
 
PCB_SHAPEm_shape
 
wxGrid * m_grid
 
std::vector< SHAPE_POLY_SET::VERTEX_INDEXm_rows
 
bool m_updatingGrid
 

Detailed Description

Definition at line 40 of file vertex_editor_pane.h.

Constructor & Destructor Documentation

◆ PCB_VERTEX_EDITOR_PANE()

PCB_VERTEX_EDITOR_PANE::PCB_VERTEX_EDITOR_PANE ( PCB_BASE_EDIT_FRAME * aFrame)

◆ ~PCB_VERTEX_EDITOR_PANE()

PCB_VERTEX_EDITOR_PANE::~PCB_VERTEX_EDITOR_PANE ( )
override

Definition at line 80 of file vertex_editor_pane.cpp.

References m_frame.

Member Function Documentation

◆ ClearItem()

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().

◆ formatCoord()

wxString PCB_VERTEX_EDITOR_PANE::formatCoord ( int aValue,
ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType ) const
private

Definition at line 237 of file vertex_editor_pane.cpp.

References m_frame.

Referenced by updateRow().

◆ getPoly() [1/2]

SHAPE_POLY_SET * PCB_VERTEX_EDITOR_PANE::getPoly ( )
private

Definition at line 244 of file vertex_editor_pane.cpp.

References m_shape, m_zone, and POLY.

Referenced by OnGridCellChange(), refreshGrid(), and updateRow().

◆ getPoly() [2/2]

const SHAPE_POLY_SET * PCB_VERTEX_EDITOR_PANE::getPoly ( ) const
private

Definition at line 255 of file vertex_editor_pane.cpp.

References m_shape, m_zone, and POLY.

◆ IsEditingItem()

bool PCB_VERTEX_EDITOR_PANE::IsEditingItem ( BOARD_ITEM * aItem) const
inline

Check if the pane is currently editing the given item.

Definition at line 52 of file vertex_editor_pane.h.

References m_item.

◆ OnGridCellChange()

◆ OnGridSelectCell()

void PCB_VERTEX_EDITOR_PANE::OnGridSelectCell ( wxGridEvent & aEvent)
private

Definition at line 334 of file vertex_editor_pane.cpp.

References updateHighlight().

Referenced by PCB_VERTEX_EDITOR_PANE().

◆ onPolygonModified()

void PCB_VERTEX_EDITOR_PANE::onPolygonModified ( )
private

Definition at line 203 of file vertex_editor_pane.cpp.

References m_frame, m_item, and m_zone.

◆ OnSelectionChanged()

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().

◆ OnSize()

void PCB_VERTEX_EDITOR_PANE::OnSize ( wxSizeEvent & aEvent)
private

Definition at line 364 of file vertex_editor_pane.cpp.

References resizeColumns().

Referenced by PCB_VERTEX_EDITOR_PANE().

◆ parseCellValue()

bool PCB_VERTEX_EDITOR_PANE::parseCellValue ( const wxString & aText,
ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType,
int & aResult ) const
private

Definition at line 219 of file vertex_editor_pane.cpp.

References m_frame, pcbIUScale, and EDA_UNIT_UTILS::UI::ValueFromString().

Referenced by OnGridCellChange().

◆ refreshGrid()

void PCB_VERTEX_EDITOR_PANE::refreshGrid ( )
private

◆ resizeColumns()

void PCB_VERTEX_EDITOR_PANE::resizeColumns ( )
private

Definition at line 341 of file vertex_editor_pane.cpp.

References m_grid.

Referenced by OnSize(), PCB_VERTEX_EDITOR_PANE(), and SetItem().

◆ 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().

◆ updateHighlight()

void PCB_VERTEX_EDITOR_PANE::updateHighlight ( int aRow)
private

Definition at line 191 of file vertex_editor_pane.cpp.

References m_frame, and m_item.

Referenced by OnGridCellChange(), OnGridSelectCell(), and SetItem().

◆ updateRow()

void PCB_VERTEX_EDITOR_PANE::updateRow ( int aRow)
private

Member Data Documentation

◆ m_frame

◆ m_grid

wxGrid* PCB_VERTEX_EDITOR_PANE::m_grid
private

◆ m_item

BOARD_ITEM* PCB_VERTEX_EDITOR_PANE::m_item
private

◆ m_rows

std::vector<SHAPE_POLY_SET::VERTEX_INDEX> PCB_VERTEX_EDITOR_PANE::m_rows
private

Definition at line 86 of file vertex_editor_pane.h.

Referenced by ClearItem(), OnGridCellChange(), refreshGrid(), and updateRow().

◆ m_shape

PCB_SHAPE* PCB_VERTEX_EDITOR_PANE::m_shape
private

Definition at line 82 of file vertex_editor_pane.h.

Referenced by ClearItem(), getPoly(), getPoly(), PCB_VERTEX_EDITOR_PANE(), and SetItem().

◆ m_updatingGrid

bool PCB_VERTEX_EDITOR_PANE::m_updatingGrid
private

◆ m_zone

ZONE* PCB_VERTEX_EDITOR_PANE::m_zone
private

The documentation for this class was generated from the following files: