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

Online Help

All Products    Maple    MapleSim


ContextMenu[CurrentContext]

  

HandleExpression

  

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

 

Calling Sequence

Parameters

Description

Examples of CurrentContext[HandleExpression]

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].

• 

The command ContextMenu[CurrentContext][HandleExpression]([expr], isfullexpr) is equivalent to ContextMenu([expr], isfullexpr).

Examples of CurrentContext[HandleExpression]

with(ContextMenu);

CurrentContext,Install,New,Save,Test

(1)

newCM := New():

  

Note the generated context-sensitive menu for newCM is empty because no entries have been added yet.

newCM:-HandleExpression(["test"], true);

CONTEXTMENUContext Menu Actions,,

(2)
  

Following is the result of the built-in context menu module upon on the selected object false.

CurrentContext:-HandleExpression([false], true);

CONTEXTMENUContext Menu Actions&comma;&comma;Apply a Command&comma;Apply a command&comma;CM_GenericActionxContextMenu:−Interactive:−Applyopx,true,&comma;Negate Boolean&comma;Negate the boolean expression&comma;CM_GenericActionnot(%EXPR),true,negate boolean&comma;<SeparatorLine>&comma;CONTEXTMENUSignal Processing&comma;&comma;CONTEXTMENUSignal Generation&comma;&comma;Generate Signal Using Sample Rate&comma;Generate signal using sample rate&comma;CM_GenericActionContextMenu:−Interactive:−QuerySignalProcessing:-GenerateSignal( %EXPR, %1, %2, %3, 'noisetype' = '%4', 'noisedeviation' = %5, 'mirror' = '%6', 'copies' = '%7', 'output' = 'signal' )&comma;_MessageCatalogue/GetMessageTime variable: &comma;ContextMenu&comma;&comma;name&comma;tooltip=_MessageCatalogue/GetMessageEnter the name of the time variable&comma;ContextMenu&comma;_MessageCatalogue/GetMessageSample rate: &comma;ContextMenu&comma;&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive real number the sample rate&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of points: &comma;ContextMenu&comma;&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of sample points&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise type: &comma;ContextMenu&comma;additive&comma;multiplicative&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of noise&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise standard deviation: &comma;ContextMenu&comma;0.0&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a non-negative real number for the noise standard deviation&comma;ContextMenu&comma;_MessageCatalogue/GetMessageMirror: &comma;ContextMenu&comma;none&comma;symmetric&comma;antisymmetric&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of mirror&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of copies: &comma;ContextMenu&comma;1&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of copies&comma;ContextMenu&comma;title=_MessageCatalogue/GetMessageSpecify sample options&comma;ContextMenu,true,Generate signal&comma;Generate Signal Using Time Range&comma;Generate signal using time range&comma;CM_GenericActionContextMenu:−Interactive:−QuerySignalProcessing:-GenerateSignal( %EXPR, %1 = %2 .. %3, %4, 'noisetype' = '%5', 'noisedeviation' = %6, 'mirror' = '%7', 'copies' = '%8', 'output' = 'signal' )&comma;_MessageCatalogue/GetMessageTime variable: &comma;ContextMenu&comma;&comma;name&comma;tooltip=_MessageCatalogue/GetMessageEnter the name of the time variable&comma;ContextMenu&comma;_MessageCatalogue/GetMessageStart time: &comma;ContextMenu&comma;&comma;realcons&comma;tooltip=_MessageCatalogue/GetMessageEnter a real number for the start time&comma;ContextMenu&comma;_MessageCatalogue/GetMessageFinish time: &comma;ContextMenu&comma;&comma;realcons&comma;tooltip=_MessageCatalogue/GetMessageEnter a real number for the finish time&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of points: &comma;ContextMenu&comma;&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of sample points&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise type: &comma;ContextMenu&comma;additive&comma;multiplicative&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of noise&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise standard deviation: &comma;ContextMenu&comma;0.0&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a non-negative real number for the noise standard deviation&comma;ContextMenu&comma;_MessageCatalogue/GetMessageMirror: &comma;ContextMenu&comma;none&comma;symmetric&comma;antisymmetric&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of mirror&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of copies: &comma;ContextMenu&comma;1&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of copies&comma;ContextMenu&comma;title=_MessageCatalogue/GetMessageSpecify options&comma;ContextMenu,true,Generate signal&comma;CONTEXTMENUVisualizations&comma;&comma;Generate Periodogram Using Sample Rate&comma;Generate periodogram using sample rate&comma;CM_GenericActionContextMenu:−Interactive:−QuerySignalProcessing:-GenerateSignal( %EXPR, %1, %2, %3, 'noisetype' = '%4', 'noisedeviation' = %5, 'mirror' = '%6', 'copies' = '%7', 'output' = 'periodogram' )&comma;_MessageCatalogue/GetMessageTime variable: &comma;ContextMenu&comma;&comma;name&comma;tooltip=_MessageCatalogue/GetMessageEnter the name of the time variable&comma;ContextMenu&comma;_MessageCatalogue/GetMessageSample rate: &comma;ContextMenu&comma;&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive real number the sample rate&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of points: &comma;ContextMenu&comma;&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of sample points&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise type: &comma;ContextMenu&comma;additive&comma;multiplicative&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of noise&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise standard deviation: &comma;ContextMenu&comma;0.0&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a non-negative real number for the noise standard deviation&comma;ContextMenu&comma;_MessageCatalogue/GetMessageMirror: &comma;ContextMenu&comma;none&comma;symmetric&comma;antisymmetric&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of mirror&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of copies: &comma;ContextMenu&comma;1&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of copies&comma;ContextMenu&comma;title=_MessageCatalogue/GetMessageSpecify options&comma;ContextMenu,true,Generate periodogram&comma;Generate Periodogram Using Time Range&comma;Generate periodogram using time range&comma;CM_GenericActionContextMenu:−Interactive:−QuerySignalProcessing:-GenerateSignal( %EXPR, %1 = %2 .. %3, %4, 'noisetype' = '%5', 'noisedeviation' = %6, 'mirror' = '%7', 'copies' = '%8', 'output' = 'periodogram' )&comma;_MessageCatalogue/GetMessageTime variable: &comma;ContextMenu&comma;&comma;name&comma;tooltip=_MessageCatalogue/GetMessageEnter the name of the time variable&comma;ContextMenu&comma;_MessageCatalogue/GetMessageStart time: &comma;ContextMenu&comma;&comma;realcons&comma;tooltip=_MessageCatalogue/GetMessageEnter a real number for the start time&comma;ContextMenu&comma;_MessageCatalogue/GetMessageFinish time: &comma;ContextMenu&comma;&comma;realcons&comma;tooltip=_MessageCatalogue/GetMessageEnter a real number for the finish time&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of points: &comma;ContextMenu&comma;&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of sample points&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise type: &comma;ContextMenu&comma;additive&comma;multiplicative&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of noise&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise standard deviation: &comma;ContextMenu&comma;0.0&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a non-negative real number for the noise standard deviation&comma;ContextMenu&comma;_MessageCatalogue/GetMessageMirror: &comma;ContextMenu&comma;none&comma;symmetric&comma;antisymmetric&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of mirror&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of copies: &comma;ContextMenu&comma;1&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of copies&comma;ContextMenu&comma;title=_MessageCatalogue/GetMessageSpecify options&comma;ContextMenu,true,Generate periodogram&comma;Generate Signal Plot Using Sample Rate&comma;Generate signal plot using sample rate&comma;CM_GenericActionContextMenu:−Interactive:−QuerySignalProcessing:-GenerateSignal( %EXPR, %1, %2, %3, 'noisetype' = '%4', 'noisedeviation' = %5, 'mirror' = '%6', 'copies' = '%7', 'output' = 'signalplot' )&comma;_MessageCatalogue/GetMessageTime variable: &comma;ContextMenu&comma;&comma;name&comma;tooltip=_MessageCatalogue/GetMessageEnter the name of the time variable&comma;ContextMenu&comma;_MessageCatalogue/GetMessageSample rate: &comma;ContextMenu&comma;&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive real number the sample rate&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of points: &comma;ContextMenu&comma;&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of sample points&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise type: &comma;ContextMenu&comma;additive&comma;multiplicative&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of noise&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise standard deviation: &comma;ContextMenu&comma;0.0&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a non-negative real number for the noise standard deviation&comma;ContextMenu&comma;_MessageCatalogue/GetMessageMirror: &comma;ContextMenu&comma;none&comma;symmetric&comma;antisymmetric&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of mirror&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of copies: &comma;ContextMenu&comma;1&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of copies&comma;ContextMenu&comma;title=_MessageCatalogue/GetMessageSpecify options&comma;ContextMenu,true,Generate signal plot&comma;Generate Signal Plot Using Time Range&comma;Generate signal plot using time range&comma;CM_GenericActionContextMenu:−Interactive:−QuerySignalProcessing:-GenerateSignal( %EXPR, %1 = %2 .. %3, %4, 'noisetype' = '%5', 'noisedeviation' = %6, 'mirror' = '%7', 'copies' = '%8', 'output' = 'signalplot' )&comma;_MessageCatalogue/GetMessageTime variable: &comma;ContextMenu&comma;&comma;name&comma;tooltip=_MessageCatalogue/GetMessageEnter the name of the time variable&comma;ContextMenu&comma;_MessageCatalogue/GetMessageStart time: &comma;ContextMenu&comma;&comma;realcons&comma;tooltip=_MessageCatalogue/GetMessageEnter a real number for the start time&comma;ContextMenu&comma;_MessageCatalogue/GetMessageFinish time: &comma;ContextMenu&comma;&comma;realcons&comma;tooltip=_MessageCatalogue/GetMessageEnter a real number for the finish time&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of points: &comma;ContextMenu&comma;&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of sample points&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise type: &comma;ContextMenu&comma;additive&comma;multiplicative&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of noise&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNoise standard deviation: &comma;ContextMenu&comma;0.0&comma;algebraic&comma;tooltip=_MessageCatalogue/GetMessageEnter a non-negative real number for the noise standard deviation&comma;ContextMenu&comma;_MessageCatalogue/GetMessageMirror: &comma;ContextMenu&comma;none&comma;symmetric&comma;antisymmetric&comma;tooltip=_MessageCatalogue/GetMessageSelect the type of mirror&comma;ContextMenu&comma;_MessageCatalogue/GetMessageNumber of copies: &comma;ContextMenu&comma;1&comma;posint&comma;tooltip=_MessageCatalogue/GetMessageEnter a positive integer for the number of copies&comma;ContextMenu&comma;title=_MessageCatalogue/GetMessageSpecify options&comma;ContextMenu,true,Generate signal plot&comma;<SeparatorLine>&comma;Help on Command&comma;Display the help page for this command&comma;CM_GenericActionprocxevalhelpop1&comma;x&semi;%CANCELend proc,false,command help

(3)

See Also

ContextMenu

ContextMenu[CurrentContext]

Entries[Add]

Entries[AddMultiple]

EntryGenerators[Get]

EntryGenerators[List]