User Tools

Site Tools


dev-guide:linking-help-button

Differences

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

Link to this comparison view

Next revision
Previous revision
dev-guide:linking-help-button [2024/07/08 11:56] – created timObdev-guide:linking-help-button [2024/07/08 12:19] (current) timOb
Line 12: Line 12:
 This path can be provided by the plugin.properties file on different levels, the button will first look for a 'docLink' attribute in its own description, then in the description of the panel and then in the description of the plugin. It will always pick the first one it gets. This path can be provided by the plugin.properties file on different levels, the button will first look for a 'docLink' attribute in its own description, then in the description of the panel and then in the description of the plugin. It will always pick the first one it gets.
  
-In practice this means a plugin can have a default path defined by 'docLink' directly and addtionally individual pathes for certain plugins e.g. for the RGG toolbar:+In practice this means a plugin can have a default path defined by 'docLink' directly and additionally individual paths for certain panels e.g. for the RGG toolbar:
 <code> <code>
 +pluginName = RGG
 +provider = grogra.de
 +docLink = RGG Plugin Manual
 +
 +[...]
 +
 /ui/panels/rgg/toolbar.docLink = RGG Plugin Manual/GroIMP's Relational Growth Grammars Plugin/Working with a Relational Growth Grammar /ui/panels/rgg/toolbar.docLink = RGG Plugin Manual/GroIMP's Relational Growth Grammars Plugin/Working with a Relational Growth Grammar
 </code> </code>
    
 +In the case of an explorer created by a resource directory, the path in the properties file is ''/ui/panels/objects/<Name-of-the-dir>''.
  
-  
  
 +===== Adding a new help button to a panel =====
  
 +In order to add a help button to the upper right corner of a panel without a menu, the easiest way is to link the default menu which already includes a help button. This can be done by adding '' <link source="/ui/explorer/menu"/>'' as a child of any PanelFactory (<panel>).
 +If a menu already exists,  the following lines can be added as the last entry of the src directory.
 +<code>
 +  <separator fill="true" />
 +  <link source="/ui/doc/helpButton"/>
 +</code> 
  
-1. **the path of the registry item**e.g. ''<de.grogra.pf.ui.registry.HelpExplorerFactory  name="help" path="RGG Plugin Manual/GroIMP's Relational Growth Grammars Plugin"/>''. This way is not recommended since it allows no translation and can not work with linked nodes. +If the help is not suppose to be added as a button but as a regular menu item, ''<link source="/ui/doc/help"/>'' can be added similar to any other factory or command.
-2. **the docLink property of the button +
- +
- +
  
  
  
dev-guide/linking-help-button.1720432567.txt.gz · Last modified: 2024/07/08 11:56 by timOb