HandleExpression - Maple Help

 HandleExpression
 determine the context menu that results in the context menu module for a selection

 Calling Sequence HandleExpression(expr, isfullexpr)

Parameters

 expr - list; contains the expression to handle for which context menu is determined isfullexpr - truefalse; determines whether expr is considered to be a full expression (true) or a subselection (false)

Description

 • The HandleExpression command returns a nested data structure, which encapsulates the context menu structure displayed by this context menu module when the expression expr is selected. The expr parameter can be any Maple object, including an expression sequence.
 • The HandleExpression command returns output in a specialized form used by Maple for generating its context-sensitive menus.  A simplified version of this output, more suitable for use in testing, is available from the command ContextMenu[Test][GetGeneratedMenu].

Examples of CurrentContext[HandleExpression]

 $\left[{\mathrm{CurrentContext}}{,}{\mathrm{Install}}{,}{\mathrm{New}}{,}{\mathrm{Save}}{,}{\mathrm{Test}}\right]$ (1)
 ${\mathrm{CONTEXTMENU}}{}\left({"Context Menu Actions"}{,}{""}{,}\left[\right]\right)$ (2)
 ${\mathrm{CONTEXTMENU}}{}\left({"Context Menu Actions"}{,}{""}{,}\left[\left[{"Apply a Command"}{,}{"Apply a command"}{,}{{\mathrm{CM_GenericAction}}}_{{x}{↦}{\mathrm{ContextMenu}}{:-}{\mathrm{Interactive}}{:-}{\mathrm{Apply}}{}\left({\mathrm{op}}{}\left({x}\right)\right){,}{\mathrm{true}}{,}{\to }}\right]{,}\left[{"Negate Boolean"}{,}{"Negate the boolean expression"}{,}{{\mathrm{CM_GenericAction}}}_{{"not\left(%EXPR\right)"}{,}{\mathrm{true}}{,}\stackrel{{\text{negate boolean}}}{{\to }}}\right]{,}{""}{,}\left[{"Help on Command"}{,}{"Display the help page for this command"}{,}{{\mathrm{CM_GenericAction}}}_{{\mathbf{proc}}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{eval}}{}\left({\mathrm{help}}{}\left({\mathrm{op}}{}\left({1}{,}{x}\right)\right)\right){;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{"%CANCEL"}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}{,}{\mathrm{false}}{,}\stackrel{{\text{command help}}}{{\to }}}\right]\right]\right)$ (3)