(menu.info)Section 7.4


Prev: Section 7.3 Up: Chapter 7
Enter node , (file) or (file)node

7.4 Hints, tree optimization
============================

The hints actually work in a rather strange way: when
'hint_optimize=true' then all '$section' elements are added to the
specified '$hints' variable, and the order ('/Applications/Editors' or
'/Editors/Applications') of the resulting hints is completely ignored.
Then, the hints for each menu entry are handed to the optimization
routine, which will calculate a reasonable tree for those hints.  That
tree must comply with the following:

When a user looks for a program "Program" with, say, hints
"Good,Bulky,Heaven", then, while walking through the tree, it should at
every node visited be clear for the user what submenu to select (or the
menu should have "Program" directly in it).  So, the top-level menu may
look like

       Good
       Hell
       Microsoft

because then a searcher for a menu entry with hints "Good,Bulky,Heaven"
will know to select the submenu "Good".  The toplevel menu may not look
like

       Good
       Hell
       Heaven

as now it isn't clear whether to visit the Good or the Heaven submenu.

That rule allows usually for many different trees, and the task of the
optimization procedure is to select, in a finite amount of time, the
tree that best matches the user's desire about the optimum number of
menu entries.


automatically generated by info2www version 1.2.2.9