construct a new context menu module - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : System : Context-Sensitive Menus : ContextMenu/New

ContextMenu[New] - construct a new context menu module

Calling Sequence




The New command constructs a new context menu to which entries, queries, and entry generators can be added using the Entries[Add], Entries[AddMultiple], Queries[Add], and EntryGenerators[Add] commands. You can replace the current context menu with the new context menu using the Install command.

Examples of ContextMenu[New]



Replace the default context menu with a new context menu.

newCM := New();

newCM:=moduleoptionpackage;localListTestsPassed,ListTypesPassed,ListTestsRun,ListTypesRun,ListTestsByType,ExpressionHandler,BuildActionList,GetTestResult,IsEntryActive,SubmoduleLoadSet;exportEntries,Queries,EntryGenerators,HandleExpression,Categories,Copy,TypeTree,EntriesTests_by_Types,ActivityTests,Input,Load,_pexports;end module


newCM[Entries][Add]("Multiply by 2", "2*%EXPR", numeric);



newCM[Queries][Add]("Divisible by 2", proc(p) evalb(p mod 2 = 0) end proc);

newCM[Entries][Add]("Divide by 2", "%EXPR/2", integer, 'test'="Divisible by 2");




See Also

ContextMenu, Entries/Add, Entries/AddMultiple, EntryGenerators/Add, Install, Queries/Add

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam