![]() |
KiCad PCB EDA Suite
|
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance. More...
#include <grid_tricks.h>
Public Member Functions | |
GRID_TRICKS (WX_GRID *aGrid) | |
Protected Member Functions | |
void | getSelectedArea () |
Puts the selected area into a sensible rectangle of m_sel_{row,col}_{start,count} above. More... | |
void | onGridCellLeftClick (wxGridEvent &event) |
void | onGridCellLeftDClick (wxGridEvent &event) |
void | onGridCellRightClick (wxGridEvent &event) |
void | onGridLabelLeftClick (wxGridEvent &event) |
void | onGridLabelRightClick (wxGridEvent &event) |
void | onPopupSelection (wxCommandEvent &event) |
void | onKeyDown (wxKeyEvent &ev) |
void | onUpdateUI (wxUpdateUIEvent &event) |
virtual bool | handleDoubleClick (wxGridEvent &aEvent) |
virtual void | showPopupMenu (wxMenu &menu) |
virtual void | doPopupSelection (wxCommandEvent &event) |
bool | toggleCell (int aRow, int aCol, bool aPreserveSelection=false) |
bool | showEditor (int aRow, int aCol) |
virtual void | paste_clipboard () |
virtual void | paste_text (const wxString &cb_text) |
virtual void | cutcopy (bool doCut) |
Protected Attributes | |
WX_GRID * | m_grid |
I don't own the grid, but he owns me. More... | |
int | m_sel_row_start |
int | m_sel_col_start |
int | m_sel_row_count |
int | m_sel_col_count |
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Definition at line 51 of file grid_tricks.h.
|
explicit |
Definition at line 37 of file grid_tricks.cpp.
References GRIDTRICKS_FIRST_ID, GRIDTRICKS_LAST_ID, m_sel_col_count, m_sel_col_start, m_sel_row_count, m_sel_row_start, NULL, onGridCellLeftClick(), onGridCellLeftDClick(), onGridCellRightClick(), onGridLabelLeftClick(), onGridLabelRightClick(), onKeyDown(), onPopupSelection(), and onUpdateUI().
|
protectedvirtual |
Definition at line 586 of file grid_tricks.cpp.
References COL_SEP, m_grid, m_sel_col_count, m_sel_col_start, m_sel_row_count, m_sel_row_start, and ROW_SEP.
Referenced by doPopupSelection(), and onKeyDown().
|
protectedvirtual |
Reimplemented in FP_GRID_TRICKS, FIELDS_EDITOR_GRID_TRICKS, and FIELDS_GRID_TRICKS.
Definition at line 274 of file grid_tricks.cpp.
References cutcopy(), GRIDTRICKS_FIRST_SHOWHIDE, GRIDTRICKS_ID_COPY, GRIDTRICKS_ID_CUT, GRIDTRICKS_ID_PASTE, GRIDTRICKS_ID_SELECT, m_grid, and paste_clipboard().
Referenced by FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FP_GRID_TRICKS::doPopupSelection(), and onPopupSelection().
|
protected |
Puts the selected area into a sensible rectangle of m_sel_{row,col}_{start,count} above.
Definition at line 167 of file grid_tricks.cpp.
References m_grid, m_sel_col_count, m_sel_col_start, m_sel_row_count, and m_sel_row_start.
Referenced by onKeyDown(), and showPopupMenu().
|
protectedvirtual |
Reimplemented in FP_GRID_TRICKS.
Definition at line 160 of file grid_tricks.cpp.
Referenced by onGridCellLeftDClick().
|
protected |
Definition at line 134 of file grid_tricks.cpp.
References showEditor(), and toggleCell().
Referenced by GRID_TRICKS(), and onGridCellLeftDClick().
|
protected |
Definition at line 153 of file grid_tricks.cpp.
References handleDoubleClick(), and onGridCellLeftClick().
Referenced by GRID_TRICKS().
|
protected |
Definition at line 207 of file grid_tricks.cpp.
References showPopupMenu().
Referenced by GRID_TRICKS().
|
protected |
Definition at line 215 of file grid_tricks.cpp.
References WX_GRID::CommitPendingChanges(), and m_grid.
Referenced by GRID_TRICKS().
|
protected |
Definition at line 223 of file grid_tricks.cpp.
References GRIDTRICKS_FIRST_SHOWHIDE, and m_grid.
Referenced by GRID_TRICKS().
|
protected |
Definition at line 310 of file grid_tricks.cpp.
References cutcopy(), getSelectedArea(), m_grid, paste_clipboard(), and toggleCell().
Referenced by GRID_TRICKS().
|
protected |
Definition at line 268 of file grid_tricks.cpp.
References doPopupSelection().
Referenced by GRID_TRICKS().
|
protected |
Definition at line 621 of file grid_tricks.cpp.
References m_grid.
Referenced by GRID_TRICKS().
|
protectedvirtual |
Definition at line 471 of file grid_tricks.cpp.
References m_grid, and paste_text().
Referenced by doPopupSelection(), and onKeyDown().
|
protectedvirtual |
Reimplemented in FP_GRID_TRICKS, and SYMBOL_GRID_TRICKS.
Definition at line 490 of file grid_tricks.cpp.
References COL_SEP, m_grid, m_sel_col_count, m_sel_col_start, m_sel_row_count, m_sel_row_start, and ROW_SEP.
Referenced by paste_clipboard(), SYMBOL_GRID_TRICKS::paste_text(), and FP_GRID_TRICKS::paste_text().
|
protected |
Definition at line 99 of file grid_tricks.cpp.
References m_grid, and WX_GRID::ShowEditorOnMouseUp().
Referenced by onGridCellLeftClick().
|
protectedvirtual |
Reimplemented in FP_GRID_TRICKS, FIELDS_EDITOR_GRID_TRICKS, and FIELDS_GRID_TRICKS.
Definition at line 238 of file grid_tricks.cpp.
References _, getSelectedArea(), GRIDTRICKS_ID_COPY, GRIDTRICKS_ID_CUT, GRIDTRICKS_ID_PASTE, GRIDTRICKS_ID_SELECT, m_grid, m_sel_col_count, and m_sel_row_count.
Referenced by onGridCellRightClick(), FIELDS_GRID_TRICKS::showPopupMenu(), FIELDS_EDITOR_GRID_TRICKS::showPopupMenu(), and FP_GRID_TRICKS::showPopupMenu().
|
protected |
Definition at line 56 of file grid_tricks.cpp.
References m_grid.
Referenced by onGridCellLeftClick(), and onKeyDown().
|
protected |
I don't own the grid, but he owns me.
Definition at line 80 of file grid_tricks.h.
Referenced by cutcopy(), FIELDS_GRID_TRICKS::doPopupSelection(), doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FP_GRID_TRICKS::doPopupSelection(), getSelectedArea(), onGridLabelLeftClick(), onGridLabelRightClick(), onKeyDown(), onUpdateUI(), FP_GRID_TRICKS::optionsEditor(), paste_clipboard(), paste_text(), SYMBOL_GRID_TRICKS::paste_text(), FP_GRID_TRICKS::paste_text(), showEditor(), FIELDS_GRID_TRICKS::showPopupMenu(), showPopupMenu(), FIELDS_EDITOR_GRID_TRICKS::showPopupMenu(), FP_GRID_TRICKS::showPopupMenu(), and toggleCell().
|
protected |
Definition at line 87 of file grid_tricks.h.
Referenced by cutcopy(), getSelectedArea(), GRID_TRICKS(), paste_text(), and showPopupMenu().
|
protected |
Definition at line 85 of file grid_tricks.h.
Referenced by cutcopy(), getSelectedArea(), GRID_TRICKS(), and paste_text().
|
protected |
Definition at line 86 of file grid_tricks.h.
Referenced by cutcopy(), getSelectedArea(), GRID_TRICKS(), paste_text(), and showPopupMenu().
|
protected |
Definition at line 84 of file grid_tricks.h.
Referenced by cutcopy(), getSelectedArea(), GRID_TRICKS(), and paste_text().