| McNeel Wiki | |||||
| edit · print · help · all topics | |||||
Main Pages
Languages
| C++ SDKPlug-Ins can add menus to Rhino's main menu by working with some functions in the CRhinoPlugIn class. The standard approach is to add the menu inside of the virtual OnLoadPlugIn function and remove the menu in the OnUnloadPlugIn() function. The CRhinoPlugIn class provides a number of methods that make adding custom popup menus to Rhino easy.
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 Rhino.NET (Rhino 4)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://en.wiki.mcneel.com/content/upload/files/VBMenuTest.zip C# Sample - http://en.wiki.mcneel.com/content/upload/files/CSMenuTest.zip | ||||
| rename · changes · history · subscriptions · lost and found · references · file upload | |||||