GetGeneratedSubmenuAndAction - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Home : Support : Online Help : System : Context-Sensitive Menus : Test : GetGeneratedSubmenuAndAction

 get generated submenu entries and actions

Parameters

 expr - anything; expression to test submenu - list; list containing the name of the submenu to retrieve

Description

 • The Test[GetGeneratedSubmenuAndAction] command returns a representation of the context-sensitive submenu and each respective applied action that would be generated by the expression expr.

Examples

 > $\mathrm{with}\left(\mathrm{ContextMenu}\right):$
 > $\mathrm{with}\left({\mathrm{ContextMenu}}_{\mathrm{Test}}\right):$

The GetGeneratedMenuAndAction command returns the entire generated context menu and the respective applied actions for a given expression:

 > $\mathrm{GetGeneratedMenuAndAction}\left(1\right)$
 (1)

The GetGeneratedSubmenuAndAction command retrieves a given submenu. For example, to get just the Plots submenu:

 > $\mathrm{GetGeneratedSubmenuAndAction}\left(1.0,\left["Plots"\right]\right)$
 $\left[\left[{"Plot Builder"}{,}{"x -> InteractivePlotBuilder:-BuildPlot\left(op\left(x\right),\left(\text{'}contextmenu\text{'}\right) = true\right)"}\right]\right]$ (2)

It is also possible to retrieve nested submenus:

 > $\mathrm{GetGeneratedSubmenuAndAction}\left(1,\left["Units","Affix Unit","Atomic"\right]\right)$
 $\left[\left[{"bohr"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"electron"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"electron mass"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"electron per second"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"electron*bohr"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"electron*bohr^2/volt"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"electron/bohr^2"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"electron^2/hartree"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"electron_mass*bohr/second^2"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"hartree"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"hartree per second"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"hartree/bohr"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"hartree/tesla"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"hartree/tesla*bohr^3"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"hartree/tesla^2"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"permittivity"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"planck"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"second"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"tesla"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"volt"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"volt*second"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"volt*second^2/electron"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]{,}\left[{"volt/bohr"}{,}{"%EXPR * Unit\left(%ARG1\right)"}\right]\right]$ (3)

Compatibility

 • The ContextMenu[Test][GetGeneratedSubmenuAndAction] command was updated in Maple 2017.