Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developer:addcustommenu [2020/08/14]
127.0.0.1 external edit
— (current)
Line 1: Line 1:
-====== How To: Add a Custom Menu to Rhino ====== 
-====== C++,.NET ====== 
-> **Summary:** //How to add a custom popup menu to Rhino's main menu from a Rhino plug-in.// 
- 
-===== C++ ===== 
- 
-The **CRhinoPlugIn** class provides a number of methods that make adding custom popup menus to Rhino easy. 
- 
-  * CRhinoPlugIn::InsertPlugInMenuToRhinoMenu - inserts a menu into Rhino's main menu. 
-  * CRhinoPlugIn::RemovePlugInMenuFromRhino - removes a menu from Rhino's main menu. 
-  * CRhinoPlugIn::OnInitPlugInMenuPopups - called when your menu is about to be displayed. 
-  * CRhinoPlugIn::OnPlugInMenuCommand - called when one of your menu items is selected. 
- 
-See rhinoSdkPlugIn.h for details on the **CRhinoPlugIn** class. 
- 
-Rhino 3 Sample - http://en.wiki.mcneel.com/content/upload/files/MenuTest.zip 
- 
-Rhino 4 Sample - http://en.wiki.mcneel.com/content/upload/files/MenuTestV4.zip 
- 
-=====.NET SDK===== 
-Creating and handling menus in .NET is slightly different than the C++ SDK. The .NET solution is to create an instance of a RMA.UI.MRhinoPlugInMenu class, populate it with strings and use event handlers to handle when the menu items are clicked or need updating. 
- 
-VB.NET Sample - [[http://wiki.mcneel.com/_media/legacy/en/VBMenuTest.zip]] 
- 
-C# Sample - [[http://wiki.mcneel.com/_media/legacy/en/CSMenuTest.zip]] 
- 
- 
- 
-{{tag>Developer cplusplus dotnet}} 
  
developer/addcustommenu.1597445311.txt.gz ยท Last modified: 2020/08/14 by 127.0.0.1