Create A New Command Menu
New command menus are only required when a programmer adds a new interaction mode or hierarchy node.
New command menus must be added directly to the XML file.
This exercise shows you how to create a new command menu although you won't be able to use in inside Scenome.
DO NOT complete this exercise unless you are comfortable using a text editor to make changes to XML or C++ code!
- Please make sure Scenome is not running.
- Find the XML file associated with your current desktop. Typically SCENOME.XML unless you're using a different desktop.
This file is usually in C:\DOCUMENTS AND SETTINGS\OWNER\APPLICATION DATA\SCENOMICS. However
location can vary depending on where and how you choose to install the software. You may have to search your hard drive for this file.
- Open the XML file in a text editor.
- Find the first entry named <contextmenu>
- Before the first <contextmenu> entry, create a blank context menu entry as shown below:
<contextmenu></contextmenu>
- Set an appropriate name attribute. It should be similar to the c++ class name or c++ interaction mode name.
<contextmenu name="User Node"></contextmenu>
- Set the class attribute to the c++ class name of the new hierarchy node or interaction mode. This
must exactly match the c++ class name. For this example, we're using a fictional class named UserNode.
<contextmenu name="User Node" class="UserNode"></contextmenu>
- Save the XML file when you are finished.
- Close the XML file.
- Start Scenome.
- Please proceed to the next exercise.