Lines Matching defs:top
38 /* Make sure top is not within a page of the end of the menu */
41 _chk_top(MENU *m, int *top, ITEM *current)
43 if (Y(current) < *top) {
44 *top = Y(current);
46 if (Y(current) >= *top + Height(m)) {
47 *top = Y(current) - Height(m) + 1;
52 * This routine makes sure top is in the correct position
58 _chk_current(MENU *m, int *top, ITEM *current)
60 if (Y(current) < *top) {
61 *top = Y(current);
63 if (Y(current) >= *top + Height(m)) {
64 *top = min(Y(current), Rows(m) - Height(m));