wxMaxima
Loading...
Searching...
No Matches
Functions
WorksheetContextMenu.cpp File Reference

The worksheet's right-click context menu (see WorksheetContextMenu.h). More...

#include "WorksheetContextMenu.h"
#include "ArtProvider.h"
#include "Worksheet.h"
#include "levenshtein/levenshtein.h"
#include <wx/menu.h>
#include <array>
#include <vector>
Include dependency graph for WorksheetContextMenu.cpp:

Functions

void PopulateWorksheetContextMenu (Worksheet &worksheet, wxMenu &popupMenu, int downx, int downy, bool clickInSelection)
 Appends the context-menu items matching the worksheet's current state.
 

Detailed Description

The worksheet's right-click context menu (see WorksheetContextMenu.h).

The construction code was moved out of Worksheet::OnMouseRightDown; member accesses became accessor calls on the worksheet reference, everything else is unchanged.

Function Documentation

◆ PopulateWorksheetContextMenu()

void PopulateWorksheetContextMenu ( Worksheet worksheet,
wxMenu &  popupMenu,
int  downx,
int  downy,
bool  clickInSelection 
)

Appends the context-menu items matching the worksheet's current state.

Parameters
worksheetThe worksheet whose state (selection, active cell, ...) decides which items appear. Its m_replacementsForCurrentWord is refilled with the spelling suggestions the menu offers.
popupMenuThe menu to append to; the caller shows it if any items were appended.
downx,downyThe click position in unscrolled worksheet coordinates.
clickInSelectionWhether the click landed inside the selection.