Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: helpmenu.reset - Function Up: helpmenu - Tool Previous: helpmenu - Tool


helpmenu - Constructor



Package display
Module widgets
Tool helpmenu


Construct a ``Help'' menu


Synopsis
helpmenu(parent, menuitems, refmanitems, callback, helpitems, widgetset)


Arguments

parent Parent of the menu
Allowed: Tk frame
menuitems User defined help items
Allowed: string vector
Default: unset
refmanitems Reference manual locations for each menuitems
Allowed: string vector
Default: unset
callback Callback function for non-reference manual menuitems
Allowed: function
Default: unset
helpitems Additional popup help items
Allowed: string vector
Default: unset
widgetset Widget set to use
Allowed: A widgetserver closure tool
Default: dws


Returns
helpmenu widget


Description
Constructs a helpmenu according to the specified construction arguments and returns a ref to the widget. The ``Help'' menu will begin with each of the items in menuitems. These are followed by the standard AIPS++ help items as recommended by the GUI Guidelines. If menuitems is unset, then only these standard help items will appear in the menu. If there are menuitems, then there must be an equivalent number of refmanitems. Each refman item is either a string which is used as an argument to help or it is a zero-length string. If a refman item has zero-length, then the callback function is called when the corresponding menu item button is pressed. This callback function takes a single argument. When called, that argument will be the menu item which was pressed. Finally, you can specify any additional popup help text items. These are prepended to the standard popup help items. Each item appears as a separate line in the resulting popup help with the text "Help Menu" being both the short help and the label at the top of the long help containing the individual items.



Example
include 'helpmenu.g'   
f := frame();
cb := function(whichItem) {
    print 'help callback called :',whichItem;
}
r := helpmenu(f, menuitems=['Dish','PGPlotter','Special help'], 
              refmanitems=['Refman:dish','Refman:pgplotter',''],
              helpitems=['About Dish','AboutPGPlotter', 'Special help'],
	      callback=cb);

When the ``Dish'' button is pressed in this example, the users browser will be directed to the dish entry in the Reference Manual. Similarly, selecting the ``PGPlotter'' button will display the pgplotter entry in the Reference Manual. However, when the ``Special help'' item is selected the cb function will be called and whichItem will have the value ``Special help''.





next up previous contents index
Next: helpmenu.reset - Function Up: helpmenu - Tool Previous: helpmenu - Tool   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15