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

Online Help

All Products    Maple    MapleSim


ContextMenu

  

New

  

construct a new context menu module

 

Calling Sequence

Description

Examples of ContextMenu[New]

Calling Sequence

New()

Description

• 

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]

with(ContextMenu):

  

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

(1)

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

0

(2)

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");

7

(3)

Install(newCM);

See Also

ContextMenu

Entries/Add

Entries/AddMultiple

EntryGenerators/Add

Install

Queries/Add