|
KiCad PCB EDA Suite
|
SCH_TABLE_EDIT_TOOL and PCB_TABLE_EDIT_TOOL share most of their algorithms, which are implemented here. More...
#include <edit_table_tool_base.h>
Public Member Functions | |
| bool | getCellBlockBounds (const SELECTION &aSel, int &aColMin, int &aColMax, int &aRowMin, int &aRowMax) |
| Get the bounding box of a cell block selection. | |
| bool | validatePasteIntoSelection (const SELECTION &aSel, wxString &aErrorMsg) |
| Validate if paste-into-cells is possible for the given selection. | |
| bool | pasteCellsIntoSelection (const SELECTION &aSel, T_TABLE *aSourceTable, T_COMMIT &aCommit) |
| Paste text content from source table into selected cells. | |
| virtual TOOL_MANAGER * | getToolMgr ()=0 |
| virtual BASE_SCREEN * | getScreen ()=0 |
| virtual const SELECTION & | getTableCellSelection ()=0 |
| virtual void | clearSelection ()=0 |
| virtual T_TABLECELL * | copyCell (T_TABLECELL *aSource)=0 |
Protected Member Functions | |
| void | addMenus (CONDITIONAL_MENU &selToolMenu) |
| int | doAddRowAbove (const TOOL_EVENT &aEvent) |
| int | doAddRowBelow (const TOOL_EVENT &aEvent) |
| int | doAddColumnBefore (const TOOL_EVENT &aEvent) |
| int | doAddColumnAfter (const TOOL_EVENT &aEvent) |
| int | doDeleteRows (const TOOL_EVENT &aEvent) |
| int | doDeleteColumns (const TOOL_EVENT &aEvent) |
| int | doMergeCells (const TOOL_EVENT &aEvent) |
| int | doUnmergeCells (const TOOL_EVENT &aEvent) |
SCH_TABLE_EDIT_TOOL and PCB_TABLE_EDIT_TOOL share most of their algorithms, which are implemented here.
Definition at line 42 of file edit_table_tool_base.h.
|
inlineprotected |
Definition at line 45 of file edit_table_tool_base.h.
References ACTIONS::addColAfter, ACTIONS::addColBefore, CONDITIONAL_MENU::AddItem(), ACTIONS::addRowAbove, ACTIONS::addRowBelow, CONDITIONAL_MENU::AddSeparator(), ACTIONS::deleteColumns, ACTIONS::deleteRows, ACTIONS::editTable, ACTIONS::exportTableCSV, SELECTION_CONDITIONS::Idle(), ACTIONS::mergeCells, SELECTION_CONDITIONS::MoreThan(), SELECTION_CONDITIONS::OnlyTypes(), PCB_TABLECELL_T, SCH_TABLECELL_T, and ACTIONS::unmergeCells.
|
pure virtual |
Implemented in PCB_EDIT_TABLE_TOOL, and SCH_EDIT_TABLE_TOOL.
Referenced by doDeleteColumns(), and doDeleteRows().
|
pure virtual |
Implemented in PCB_EDIT_TABLE_TOOL, and SCH_EDIT_TABLE_TOOL.
Referenced by doAddColumnAfter(), doAddColumnBefore(), doAddRowAbove(), doAddRowBelow(), and pasteCellsIntoSelection().
|
inlineprotected |
Definition at line 269 of file edit_table_tool_base.h.
References _, copyCell(), getScreen(), getTableCellSelection(), getToolMgr(), TOOL_MANAGER::PostEvent(), EVENTS::SelectedEvent, and table.
|
inlineprotected |
Definition at line 218 of file edit_table_tool_base.h.
References _, copyCell(), getScreen(), getTableCellSelection(), getToolMgr(), TOOL_MANAGER::PostEvent(), EVENTS::SelectedEvent, and table.
|
inlineprotected |
Definition at line 117 of file edit_table_tool_base.h.
References _, copyCell(), getScreen(), getTableCellSelection(), getToolMgr(), TOOL_MANAGER::PostEvent(), EVENTS::SelectedEvent, and table.
|
inlineprotected |
Definition at line 166 of file edit_table_tool_base.h.
References _, copyCell(), SELECTION::Empty(), getScreen(), getTableCellSelection(), getToolMgr(), TOOL_MANAGER::PostEvent(), EVENTS::SelectedEvent, and table.
|
inlineprotected |
Definition at line 404 of file edit_table_tool_base.h.
References _, clearSelection(), SELECTION::Empty(), getScreen(), getTableCellSelection(), getToolMgr(), TOOL_MANAGER::PostEvent(), EVENTS::SelectedEvent, STRUCT_DELETED, and table.
|
inlineprotected |
Definition at line 320 of file edit_table_tool_base.h.
References _, clearSelection(), SELECTION::Empty(), getScreen(), getTableCellSelection(), getToolMgr(), TOOL_MANAGER::PostEvent(), EVENTS::SelectedEvent, STRUCT_DELETED, and table.
|
inlineprotected |
Definition at line 482 of file edit_table_tool_base.h.
References _, SELECTION::Empty(), getScreen(), getTableCellSelection(), getToolMgr(), TOOL_MANAGER::PostEvent(), EVENTS::SelectedEvent, table, VECTOR2< T >::x, and VECTOR2< T >::y.
|
inlineprotected |
Definition at line 551 of file edit_table_tool_base.h.
References _, SELECTION::Empty(), getScreen(), getTableCellSelection(), getToolMgr(), TOOL_MANAGER::PostEvent(), EVENTS::SelectedEvent, and table.
|
inline |
Get the bounding box of a cell block selection.
| aSel | The selection to analyze |
| aColMin | Output: minimum column index |
| aColMax | Output: maximum column index (exclusive) |
| aRowMin | Output: minimum row index |
| aRowMax | Output: maximum row index (exclusive) |
Definition at line 602 of file edit_table_tool_base.h.
References SELECTION::Size().
Referenced by pasteCellsIntoSelection(), and validatePasteIntoSelection().
|
pure virtual |
Implemented in PCB_EDIT_TABLE_TOOL, and SCH_EDIT_TABLE_TOOL.
Referenced by doAddColumnAfter(), doAddColumnBefore(), doAddRowAbove(), doAddRowBelow(), doDeleteColumns(), doDeleteRows(), doMergeCells(), doUnmergeCells(), and pasteCellsIntoSelection().
|
pure virtual |
Implemented in PCB_EDIT_TABLE_TOOL, and SCH_EDIT_TABLE_TOOL.
Referenced by doAddColumnAfter(), doAddColumnBefore(), doAddRowAbove(), doAddRowBelow(), doDeleteColumns(), doDeleteRows(), doMergeCells(), and doUnmergeCells().
|
pure virtual |
Implemented in PCB_EDIT_TABLE_TOOL, and SCH_EDIT_TABLE_TOOL.
Referenced by doAddColumnAfter(), doAddColumnBefore(), doAddRowAbove(), doAddRowBelow(), doDeleteColumns(), doDeleteRows(), doMergeCells(), and doUnmergeCells().
|
inline |
Paste text content from source table into selected cells.
| aSel | The target cell selection |
| aSourceTable | The table containing cells to paste |
| aCommit | The commit object for tracking changes |
Definition at line 697 of file edit_table_tool_base.h.
References copyCell(), SELECTION::Empty(), getCellBlockBounds(), and getScreen().
Referenced by PCB_CONTROL::Paste(), and SCH_EDITOR_CONTROL::Paste().
|
inline |
Validate if paste-into-cells is possible for the given selection.
| aSel | The target cell selection |
| aErrorMsg | Output: error message if validation fails |
Definition at line 639 of file edit_table_tool_base.h.
References _, SELECTION::Empty(), getCellBlockBounds(), and table.
Referenced by PCB_CONTROL::Paste(), and SCH_EDITOR_CONTROL::Paste().