About Creating Context Menus - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Configure Maple : Customize the Maple System : Creating Context-Sensitive Menus : worksheet/reference/aboutcontext

About Creating Context Menus

  

This help page explains how user-defined context menus can be created and incorporated into the Maple context menu system for use on mathematical objects and expressions.

 

What is a Context Menu

Overriding the Default Context Menu System with a User-defined System

Appending User-defined Actions to the Default Context Menu System

Restoring the Default Context Menu System

What is a Context Menu

  

Maple dynamically generates a context menu when you right-click (for Macintosh, Control-click) an object or expression. The actions available on the context menu depend on the properties of the object or expression.

  

To customize the default context menus, you can create a new, user-defined context menu system or append user-defined entries to the built-in context menu system.

Overriding the Default Context Menu System with a User-defined System

  

To create a user-defined context menu system:

  

1.  Generate a new context menu module using the ContextMenu[New] command.

  

2.  Define the actions to include in your context menu system, and add them to the context menu module. (See Creating Custom Context Menu Entries.)

  

3.  Install the context menu system using the ContextMenu[Install] command.

  

If a user-defined context menu system is installed in the current session, it replaces the default system. As a result, only the actions included in the user-defined system are available. When you exit the Maple session, the user-defined system is removed from memory.  To use it in future sessions, you must save it using the ContextMenu[Save] command.

  

For more information, see Creating a Context Menu System.

Appending User-defined Actions to the Default Context Menu System

  

To allow access to both your user-defined actions and the default context menu system:

  

1.  Make a copy of the built-in context menu module using the ContextMenu[CurrentContext][Copy] command.

  

2.  Define the actions to add to the context menu system, and add them to the context menu module. (See Creating Custom Context Menu Entries.)

  

3.  Install the context menu system using the ContextMenu[Install] command.

  

For more information, see Appending Actions to the Context Menu System.

Restoring the Default Context Menu System

  

After installing a new context menu module, the default context menu system can be restored by using the ContextMenu[Install]() command.

See Also

Appending Actions to the Context Menu System

ContextMenu

ContextMenu Example Worksheet

ContextMenu[CurrentContext]

ContextMenu[CurrentContext][Copy]

ContextMenu[Install]

ContextMenu[New]

ContextMenu[Test]

Creating a Context Menu System

Creating Custom Context Menu Entries

Overview of Creating Context Menus

 


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