Site Tools


Differences

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

Link to this comparison view

developer:sdksamples:pluginhelp [2015/09/14] (current)
Line 1: Line 1:
 +====== Add Online Help to your Plug-in ======
 +> **Developer:​** //​[[developer:​cplusplusplugins|C++]]//​
 +> **Summary:​** //Discusses how to add online help support to your Rhino plug-in.//
  
 +=====Overview=====
 +Now that you have your Rhino plug-in completed, you might want to add online help support to help your customers user your plug-in efficnently and properly. Most Windows applications provide online help in the form of an HTML help file.
 +
 +=====Authoring Tools=====
 +
 +HTML help files are made with help authoring tools.
 +
 +Microsoft provides a free utility called the **[[http://​www.microsoft.com/​downloads/​details.aspx?​displaylang=en&​FamilyID=00535334-c8a6-452f-9aa0-d597d16580cc|HTML Help Workshop ]]** that can complile existing HTML files into an HTML help file (.chm). This is a fairly low-level utility in that it will only build HTML help files - it will not create or edit content. Thus, most who are looking to produce online help are looking for something a bit more full featured.
 +
 +Adobe make a popular help authoring tool called **[[http://​tryit.adobe.com/​us/​robohelp/?​sdid=EGOEX|RoboHelp]]** that will help you create, edit, and publish professional quality topic based technical content. This is the tool used to create the help files for Rhino.
 +
 +There are several other tools available on the market. Just Google "​Create HTML Help File" to see the list.
 +
 +=====Plug-In Support=====
 +
 +You can add your plug-in to Rhino'​s Help->​Plug-ins menu by overriding the following two virtual functions:
 +
 +  - **CRhinoPlugIn::​AddToPlugInHelpMenu** - Called by Rhino to determine if the plug-in name should be added to the Rhino Help->​Plug-ins menu.
 +  - **CRhinoPlugIn::​OnDisplayPlugInHelp** - Called by Rhino if **CRhinoPlugIn::​AddToPlugInHelpMenu** returns true and the menu item associated with this plug-in is selected.
 +
 +Details on both of these virtual function can be found in **rhinoSdkPlugIn.h**.
 +
 +=====Command Support=====
 +
 +While running a Rhino command, you can press **F1** to bring up online help for that command. Your plug-in commands can do the same. Simply override the **CRhinoCommand::​DoHelp** virtual function. If your command is running when the user presses **F1**, this member will be called.
 +
 +Also, if your want your command'​s help to appear in Rhino'​s command help dockable window (Help->​Command Help), then override the **CRhinoCommand::​ContextHelpURL** virtual function.
 +
 +Details on both of these virtual function can be found in **rhinoSdkCommand.h**.
 +
 +=====Dialog Support=====
 +
 +There are a couple of ways you can add help support to dialog boxes. The first is to simply place a "​Help"​ button somewhere on the form.
 +
 +Also, if your dialog box has focus and the user presses **F1**, Windows will send a **WM_HELPINFO** message to it. So, by adding a message handler to your dialog box, you can capture these notifications and display the requested information.
 +
 +And, if you add the "​Context Help" style to your dialog box resource, a **?** icon will appear in the upper right corner of the window. Now, if the user clicks the **?** icon and then clicks a control, your dialog'​s **OnHelpInfo** implementation will and passed information about the control that was clicked.
 +
 +MSDN had lots of information on how to add context help to dialog boxes.
 +
 +\\
 +
 +{{tag>​Developer cplusplus}}
developer/sdksamples/pluginhelp.txt ยท Last modified: 2015/09/14 (external edit)