|
wxMaxima
|
The worksheet's right-click context menu. More...
Go to the source code of this file.
Functions | |
| void | PopulateWorksheetContextMenu (Worksheet &worksheet, wxMenu &popupMenu, int downx, int downy, bool clickInSelection) |
| Appends the context-menu items matching the worksheet's current state. | |
The worksheet's right-click context menu.
Building the menu is a pure function of the worksheet's current state (what is selected, which cell is active, where the click landed): it appends items to a wxMenu and does not show it. That makes it testable headlessly and keeps the ~800 lines of menu construction out of the Worksheet class; the mouse handling around it (hit testing, mouse capture, actually popping up the menu) stays in Worksheet::OnMouseRightDown.
| void PopulateWorksheetContextMenu | ( | Worksheet & | worksheet, |
| wxMenu & | popupMenu, | ||
| int | downx, | ||
| int | downy, | ||
| bool | clickInSelection | ||
| ) |
Appends the context-menu items matching the worksheet's current state.
| worksheet | The worksheet whose state (selection, active cell, ...) decides which items appear. Its m_replacementsForCurrentWord is refilled with the spelling suggestions the menu offers. |
| popupMenu | The menu to append to; the caller shows it if any items were appended. |
| downx,downy | The click position in unscrolled worksheet coordinates. |
| clickInSelection | Whether the click landed inside the selection. |