ContextMenu[Test]
GetGeneratedSubmenuAndAction
get generated submenu entries and actions
Calling Sequence
Parameters
Description
Examples
Compatibility
Test[GetGeneratedSubmenuAndAction]( expr, submenu )
expr
-
anything; expression to test
submenu
list; list containing the name of the submenu to retrieve
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.
with⁡ContextMenu:
with⁡ContextMenuTest:
The GetGeneratedMenuAndAction command returns the entire generated context menu and the respective applied actions for a given expression:
GetGeneratedMenuAndAction⁡1
Apply a Command,x -> ContextMenu:-Interactive:-Apply(op(x)),Assign to a Name,x -> ContextMenu:-Interactive:-Assign(op(x)),Divisors,NumberTheory:-Divisors(%EXPR),Expand,expand( %EXPR ),Integer Factors,ifactor(%EXPR),Plots,Plot Builder,x -> InteractivePlotBuilder:-BuildPlot(op(x),'contextmenu' = true),Prime Factors,NumberTheory:-PrimeFactors(%EXPR),Sum of Squares,NumberTheory:-SumOfSquares(%EXPR),Totient Function,NumberTheory:-Totient(%EXPR),|,Integer Functions,Integer Base 10 Log,ilog10( %EXPR ),Integer Base 2 Log,ilog2( %EXPR ),Integer Natural Log,ilog( %EXPR ),Queries,Is Mersenne Number?,NumberTheory:-IsMersenne(%EXPR),Is Perfect Square?,issqr(%EXPR),Is Prime Number?,isprime(%EXPR),Is Square Free?,NumberTheory:-IsSquareFree(%EXPR),Units,Affix Unit,Atomic,bohr,%EXPR * Unit(%ARG1),electron,%EXPR * Unit(%ARG1),electron mass,%EXPR * Unit(%ARG1),electron per second,%EXPR * Unit(%ARG1),electron*bohr,%EXPR * Unit(%ARG1),electron*bohr^2/volt,%EXPR * Unit(%ARG1),electron/bohr^2,%EXPR * Unit(%ARG1),electron^2/hartree,%EXPR * Unit(%ARG1),electron_mass*bohr/second^2,%EXPR * Unit(%ARG1),hartree,%EXPR * Unit(%ARG1),hartree per second,%EXPR * Unit(%ARG1),hartree/bohr,%EXPR * Unit(%ARG1),hartree/tesla,%EXPR * Unit(%ARG1),hartree/tesla*bohr^3,%EXPR * Unit(%ARG1),hartree/tesla^2,%EXPR * Unit(%ARG1),permittivity,%EXPR * Unit(%ARG1),planck,%EXPR * Unit(%ARG1),second,%EXPR * Unit(%ARG1),tesla,%EXPR * Unit(%ARG1),volt,%EXPR * Unit(%ARG1),volt*second,%EXPR * Unit(%ARG1),volt*second^2/electron,%EXPR * Unit(%ARG1),volt/bohr,%EXPR * Unit(%ARG1),CGS,barye,%EXPR * Unit(%ARG1),centimeter,%EXPR * Unit(%ARG1),dyne,%EXPR * Unit(%ARG1),erg,%EXPR * Unit(%ARG1),erg/second,%EXPR * Unit(%ARG1),g,%EXPR * Unit(%ARG1),gram,%EXPR * Unit(%ARG1),kyne,%EXPR * Unit(%ARG1),radian,%EXPR * Unit(%ARG1),second,%EXPR * Unit(%ARG1),steradian,%EXPR * Unit(%ARG1),EMU,abampere,%EXPR * Unit(%ARG1),abcoulomb,%EXPR * Unit(%ARG1),abfarad,%EXPR * Unit(%ARG1),abhenry,%EXPR * Unit(%ARG1),abohm,%EXPR * Unit(%ARG1),absiemens,%EXPR * Unit(%ARG1),abtesla,%EXPR * Unit(%ARG1),abvolt,%EXPR * Unit(%ARG1),abweber,%EXPR * Unit(%ARG1),barye,%EXPR * Unit(%ARG1),centimeter,%EXPR * Unit(%ARG1),dyne,%EXPR * Unit(%ARG1),erg,%EXPR * Unit(%ARG1),erg/second,%EXPR * Unit(%ARG1),g,%EXPR * Unit(%ARG1),gram,%EXPR * Unit(%ARG1),joule,%EXPR * Unit(%ARG1),kilogram,%EXPR * Unit(%ARG1),kyne,%EXPR * Unit(%ARG1),meter,%EXPR * Unit(%ARG1),newton,%EXPR * Unit(%ARG1),pascal,%EXPR * Unit(%ARG1),radian,%EXPR * Unit(%ARG1),second,%EXPR * Unit(%ARG1),steradian,%EXPR * Unit(%ARG1),watt,%EXPR * Unit(%ARG1),FPS,foot,%EXPR * Unit(%ARG1),horsepower,%EXPR * Unit(%ARG1),pound,%EXPR * Unit(%ARG1),poundal,%EXPR * Unit(%ARG1),poundal*foot,%EXPR * Unit(%ARG1),poundforce/inch^2,%EXPR * Unit(%ARG1),radian,%EXPR * Unit(%ARG1),second,%EXPR * Unit(%ARG1),steradian,%EXPR * Unit(%ARG1),MTS,kilojoule,%EXPR * Unit(%ARG1),kilowatt,%EXPR * Unit(%ARG1),meter,%EXPR * Unit(%ARG1),pieze,%EXPR * Unit(%ARG1),radian,%EXPR * Unit(%ARG1),second,%EXPR * Unit(%ARG1),steradian,%EXPR * Unit(%ARG1),sthene,%EXPR * Unit(%ARG1),tonne,%EXPR * Unit(%ARG1),SI,coulomb,%EXPR * Unit(%ARG1),farad,%EXPR * Unit(%ARG1),henry,%EXPR * Unit(%ARG1),joule,%EXPR * Unit(%ARG1),kilogram,%EXPR * Unit(%ARG1),lumen,%EXPR * Unit(%ARG1),lux,%EXPR * Unit(%ARG1),meter,%EXPR * Unit(%ARG1),newton,%EXPR * Unit(%ARG1),ohm,%EXPR * Unit(%ARG1),pascal,%EXPR * Unit(%ARG1),radian,%EXPR * Unit(%ARG1),second,%EXPR * Unit(%ARG1),siemens,%EXPR * Unit(%ARG1),steradian,%EXPR * Unit(%ARG1),tesla,%EXPR * Unit(%ARG1),volt,%EXPR * Unit(%ARG1),watt,%EXPR * Unit(%ARG1),weber,%EXPR * Unit(%ARG1),|,Combinations/Permutations,Combinations,Count,combinat:-numbcomb(%EXPR),Generate,combinat:-choose(%EXPR),Fibonacci,combinat:-fibonacci(%EXPR),Partitions,Count,combinat:-numbpart(%EXPR),Generate,combinat:-partition(%EXPR),Random,combinat:-randpart(%EXPR),Permutations,Count,combinat:-numbperm(%EXPR),Generate,combinat:-permute(%EXPR),Random,combinat:-randperm(%EXPR),Power Set,combinat:-powerset(%EXPR),Number Theory Functions,Calkin-Wilf Sequence,NumberTheory:-CalkinWilfSequence(%EXPR),Carmichael Function,NumberTheory:-CarmichaelLambda(%EXPR),I-th Prime,ithprime(%EXPR),Imaginary Unit,NumberTheory:-ImaginaryUnit(%EXPR),Inverse Totient Function,NumberTheory:-InverseTotient(%EXPR),Moebius Function,NumberTheory:-Moebius(%EXPR),Next Prime,nextprime(%EXPR),Next Safe Prime,NumberTheory:-NextSafePrime(%EXPR),Number of Positive Divisors,NumberTheory:-tau(%EXPR),Number of Prime Factors,NumberTheory:-Omega(%EXPR),Number of Primes,NumberTheory:-pi(%EXPR),Previous Prime,prevprime(%EXPR),Primitive Root,NumberTheory:-PrimitiveRoot(%EXPR),Pseudo Primitive Root,NumberTheory:-PseudoPrimitiveRoot(%EXPR),Sum of Divisors,NumberTheory:-sigma(%EXPR),Signal Processing,Signal Generation,Generate Signal Using Sample Rate,() -> ContextMenu:-Interactive:-Query("SignalProcessing:-GenerateSignal( %EXPR, %1, %2, %3, 'noisetype' = '%4', 'noisedeviation' = %5, 'mirror' = '%6', 'copies' = '%7', 'output' = 'signal' )",[[`_MessageCatalogue/GetMessage`("Time variable: ","ContextMenu"), "", 'name', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter the name of the time variable","ContextMenu")], [`_MessageCatalogue/GetMessage`("Sample rate: ","ContextMenu"), "", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive real number the sample rate","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of points: ","ContextMenu"), "", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of sample points","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise type: ","ContextMenu"), ["additive", "multiplicative"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of noise","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise standard deviation: ","ContextMenu"), "0.0", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a non-negative real number for the noise standard deviation","ContextMenu")], [`_MessageCatalogue/GetMessage`("Mirror: ","ContextMenu"), ["none", "symmetric", "antisymmetric"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of mirror","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of copies: ","ContextMenu"), "1", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of copies","ContextMenu")]],'title' = `_MessageCatalogue/GetMessage`("Specify sample options","ContextMenu")),Generate Signal Using Time Range,() -> ContextMenu:-Interactive:-Query("SignalProcessing:-GenerateSignal( %EXPR, %1 = %2 .. %3, %4, 'noisetype' = '%5', 'noisedeviation' = %6, 'mirror' = '%7', 'copies' = '%8', 'output' = 'signal' )",[[`_MessageCatalogue/GetMessage`("Time variable: ","ContextMenu"), "", 'name', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter the name of the time variable","ContextMenu")], [`_MessageCatalogue/GetMessage`("Start time: ","ContextMenu"), "", 'realcons', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a real number for the start time","ContextMenu")], [`_MessageCatalogue/GetMessage`("Finish time: ","ContextMenu"), "", 'realcons', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a real number for the finish time","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of points: ","ContextMenu"), "", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of sample points","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise type: ","ContextMenu"), ["additive", "multiplicative"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of noise","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise standard deviation: ","ContextMenu"), "0.0", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a non-negative real number for the noise standard deviation","ContextMenu")], [`_MessageCatalogue/GetMessage`("Mirror: ","ContextMenu"), ["none", "symmetric", "antisymmetric"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of mirror","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of copies: ","ContextMenu"), "1", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of copies","ContextMenu")]],'title' = `_MessageCatalogue/GetMessage`("Specify options","ContextMenu")),Visualizations,Generate Periodogram Using Sample Rate,() -> ContextMenu:-Interactive:-Query("SignalProcessing:-GenerateSignal( %EXPR, %1, %2, %3, 'noisetype' = '%4', 'noisedeviation' = %5, 'mirror' = '%6', 'copies' = '%7', 'output' = 'periodogram' )",[[`_MessageCatalogue/GetMessage`("Time variable: ","ContextMenu"), "", 'name', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter the name of the time variable","ContextMenu")], [`_MessageCatalogue/GetMessage`("Sample rate: ","ContextMenu"), "", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive real number the sample rate","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of points: ","ContextMenu"), "", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of sample points","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise type: ","ContextMenu"), ["additive", "multiplicative"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of noise","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise standard deviation: ","ContextMenu"), "0.0", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a non-negative real number for the noise standard deviation","ContextMenu")], [`_MessageCatalogue/GetMessage`("Mirror: ","ContextMenu"), ["none", "symmetric", "antisymmetric"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of mirror","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of copies: ","ContextMenu"), "1", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of copies","ContextMenu")]],'title' = `_MessageCatalogue/GetMessage`("Specify options","ContextMenu")),Generate Periodogram Using Time Range,() -> ContextMenu:-Interactive:-Query("SignalProcessing:-GenerateSignal( %EXPR, %1 = %2 .. %3, %4, 'noisetype' = '%5', 'noisedeviation' = %6, 'mirror' = '%7', 'copies' = '%8', 'output' = 'periodogram' )",[[`_MessageCatalogue/GetMessage`("Time variable: ","ContextMenu"), "", 'name', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter the name of the time variable","ContextMenu")], [`_MessageCatalogue/GetMessage`("Start time: ","ContextMenu"), "", 'realcons', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a real number for the start time","ContextMenu")], [`_MessageCatalogue/GetMessage`("Finish time: ","ContextMenu"), "", 'realcons', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a real number for the finish time","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of points: ","ContextMenu"), "", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of sample points","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise type: ","ContextMenu"), ["additive", "multiplicative"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of noise","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise standard deviation: ","ContextMenu"), "0.0", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a non-negative real number for the noise standard deviation","ContextMenu")], [`_MessageCatalogue/GetMessage`("Mirror: ","ContextMenu"), ["none", "symmetric", "antisymmetric"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of mirror","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of copies: ","ContextMenu"), "1", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of copies","ContextMenu")]],'title' = `_MessageCatalogue/GetMessage`("Specify options","ContextMenu")),Generate Signal Plot Using Sample Rate,() -> ContextMenu:-Interactive:-Query("SignalProcessing:-GenerateSignal( %EXPR, %1, %2, %3, 'noisetype' = '%4', 'noisedeviation' = %5, 'mirror' = '%6', 'copies' = '%7', 'output' = 'signalplot' )",[[`_MessageCatalogue/GetMessage`("Time variable: ","ContextMenu"), "", 'name', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter the name of the time variable","ContextMenu")], [`_MessageCatalogue/GetMessage`("Sample rate: ","ContextMenu"), "", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive real number the sample rate","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of points: ","ContextMenu"), "", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of sample points","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise type: ","ContextMenu"), ["additive", "multiplicative"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of noise","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise standard deviation: ","ContextMenu"), "0.0", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a non-negative real number for the noise standard deviation","ContextMenu")], [`_MessageCatalogue/GetMessage`("Mirror: ","ContextMenu"), ["none", "symmetric", "antisymmetric"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of mirror","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of copies: ","ContextMenu"), "1", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of copies","ContextMenu")]],'title' = `_MessageCatalogue/GetMessage`("Specify options","ContextMenu")),Generate Signal Plot Using Time Range,() -> ContextMenu:-Interactive:-Query("SignalProcessing:-GenerateSignal( %EXPR, %1 = %2 .. %3, %4, 'noisetype' = '%5', 'noisedeviation' = %6, 'mirror' = '%7', 'copies' = '%8', 'output' = 'signalplot' )",[[`_MessageCatalogue/GetMessage`("Time variable: ","ContextMenu"), "", 'name', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter the name of the time variable","ContextMenu")], [`_MessageCatalogue/GetMessage`("Start time: ","ContextMenu"), "", 'realcons', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a real number for the start time","ContextMenu")], [`_MessageCatalogue/GetMessage`("Finish time: ","ContextMenu"), "", 'realcons', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a real number for the finish time","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of points: ","ContextMenu"), "", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of sample points","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise type: ","ContextMenu"), ["additive", "multiplicative"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of noise","ContextMenu")], [`_MessageCatalogue/GetMessage`("Noise standard deviation: ","ContextMenu"), "0.0", 'algebraic', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a non-negative real number for the noise standard deviation","ContextMenu")], [`_MessageCatalogue/GetMessage`("Mirror: ","ContextMenu"), ["none", "symmetric", "antisymmetric"], 'tooltip' = `_MessageCatalogue/GetMessage`("Select the type of mirror","ContextMenu")], [`_MessageCatalogue/GetMessage`("Number of copies: ","ContextMenu"), "1", 'posint', 'tooltip' = `_MessageCatalogue/GetMessage`("Enter a positive integer for the number of copies","ContextMenu")]],'title' = `_MessageCatalogue/GetMessage`("Specify options","ContextMenu"))
The GetGeneratedSubmenuAndAction command retrieves a given submenu. For example, to get just the Plots submenu:
GetGeneratedSubmenuAndAction⁡1.0,Plots
Plot Builder,x -> InteractivePlotBuilder:-BuildPlot(op(x),'contextmenu' = true)
It is also possible to retrieve nested submenus:
GetGeneratedSubmenuAndAction⁡1,Units,Affix Unit,Atomic
bohr,%EXPR * Unit(%ARG1),electron,%EXPR * Unit(%ARG1),electron mass,%EXPR * Unit(%ARG1),electron per second,%EXPR * Unit(%ARG1),electron*bohr,%EXPR * Unit(%ARG1),electron*bohr^2/volt,%EXPR * Unit(%ARG1),electron/bohr^2,%EXPR * Unit(%ARG1),electron^2/hartree,%EXPR * Unit(%ARG1),electron_mass*bohr/second^2,%EXPR * Unit(%ARG1),hartree,%EXPR * Unit(%ARG1),hartree per second,%EXPR * Unit(%ARG1),hartree/bohr,%EXPR * Unit(%ARG1),hartree/tesla,%EXPR * Unit(%ARG1),hartree/tesla*bohr^3,%EXPR * Unit(%ARG1),hartree/tesla^2,%EXPR * Unit(%ARG1),permittivity,%EXPR * Unit(%ARG1),planck,%EXPR * Unit(%ARG1),second,%EXPR * Unit(%ARG1),tesla,%EXPR * Unit(%ARG1),volt,%EXPR * Unit(%ARG1),volt*second,%EXPR * Unit(%ARG1),volt*second^2/electron,%EXPR * Unit(%ARG1),volt/bohr,%EXPR * Unit(%ARG1)
The ContextMenu[Test][GetGeneratedSubmenuAndAction] command was updated in Maple 2017.
See Also
ContextMenu
ContextMenu[Test][GetGeneratedMenuAndAction]
ContextMenu[Test][GetGeneratedSubmenu]
ContextMenu[Test][ListMenuEntries]
ContextMenu[Test][TestAction]
Download Help Document