/*----------------------------------------------------------------------*/ /* extern */ Boolean XfeMenuIsFull(Widget menu) { Dimension screen_height; Widget last; assert( _XfeIsAlive(menu) ); assert( XmIsRowColumn(menu) ); screen_height = XfeScreenHeight(menu); last = XfeChildrenGetLast(menu); if (!last) { return False; } /* * The menu is "full" if its height plus that of a potential new child * are longer than the screen height. Assume the new child will be * the same height as the last child in the menu. */ if ((_XfeHeight(menu) + (3 * _XfeHeight(last))) > XfeScreenHeight(menu)) { return True; } return False; }
/*----------------------------------------------------------------------*/ static int ScreenGetSpaceBelow(Widget w) { return (int) XfeScreenHeight(w) - (int) (XfeRootY(w) + _XfeHeight(w)); }