|
|
The precise rules for how rows and columns are determined in menus are given in the
following table.
This table should only be needed in exceptional cases (for example,
when a developer has coded ``unreasonable'' values for the
rows
and
columns
descriptors in a menu definition file).
In general, the number of columns in a menu is determined before the
number of rows, and columns specified with the
columns
descriptor takes precedence if there is a conflict with the
number of rows requested.
The number of rows is usually the minimum of the three variables aR
(available rows), sR (specified rows), and nR (needed rows).
The table entries for the two cases when columns is specified and description is not imply that menu items are truncated to fit in the column size determined from sC.
Thus, the
columns
descriptor should not be specified for menus that are dynamically generated,
when there is no way to guarantee that such a menu will not have
truncated items.
Descriptors set? | step 1 | step 2 | step 3 | |||
---|---|---|---|---|---|---|
d | r | c | pC | pR | uC | uR |
yes | no | no | not needed | not needed | 1 | min(10,nR) |
yes | no | yes | " | " | 1* | " |
yes | yes | no | " | " | 1 | min(aR,nR,sR) |
yes | yes | yes | " | " | 1* | " |
no | no | no | --** | --** | --** | --** |
no | no | yes |
if sC > mC, 1;
otherwise, sC*** | ((tI-1) mod pC)+1 |
if pR > aR, 1:
otherwise, pC |
if pR > aR,
min(aR,10); otherwise, pR |
no | yes | no | ((tI-1) mod pR)+1+ | min(aR,nR,sR)+ |
if pC > fC, 1;
otherwise, pC | pR |
no | yes | yes |
if sC > mC, 1;
otherwise, sC*** | ((tI-1) mod pC)+1 |
if pR > aR, 1;
otherwise, pC |
if pR > aR,
min(aR,sR); otherwise, pR++ |
columns
descriptor is ignored
rows
descriptor is ignored
Legend
description
descriptor
rows
descriptor
columns
descriptor
rows
descriptor
menu
descriptors)
columns
descriptor