Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
ContextMenu[CurrentContext][HandleExpression] - determine the context menu that results in the context menu module from a right-click
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 right-clicked. 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);
newCM := New():
Note the generated context-sensitive menu for newCM is empty because no entries have been added yet.
newCM:-HandleExpression(["test"], true);
Following is the result of the built-in context menu module upon on the selected object false.
CurrentContext:-HandleExpression([false], true);
See Also
ContextMenu, ContextMenu[CurrentContext], Entries[Add], Entries[AddMultiple], EntryGenerators[Get], EntryGenerators[List]
Download Help Document