SimpleMenu.cpp
/*      Function Name: GetMenuWidth
 *      Description: Sets the length of the widest entry in pixels.
 *      Arguments: w - the simple menu widget.
 *      Returns: width of menu.
 */
Function Name: GetMenuWidth
Description: Sets the length of the widest entry in pixels.
Arguments: w - the simple menu widget.
Returns: width of menu.
Function Name : GetMenuWidth Description : Sets the length of the widest entry in pixels . Arguments : w - the simple menu widget . Returns : width of menu .
static Dimension
GetMenuWidth(Widget w, Widget w_ent)
{
    SmeObject cur_entry = (SmeObject) w_ent;
    SimpleMenuWidget smw = (SimpleMenuWidget) w;
    Dimension width, widest = (Dimension) 0;
    SmeObject * entry;
    if ( smw->simple_menu.menu_width ) 
	return(smw->core.width);
    ForAllChildren(smw, entry) {
	XtWidgetGeometry preferred;
	if (!XtIsManaged( (Widget) *entry)) continue;
	if (*entry != cur_entry) {
	    XtQueryGeometry((Widget) *entry, (XtWidgetGeometry *)NULL, &preferred);
	    if (preferred.request_mode & CWWidth)
		width = preferred.width;
	    else
		width = (*entry)->rectangle.width;
	}
	else
	    width = (*entry)->rectangle.width;
	if ( width > widest )
	    widest = width;
    }
    return(widest);
}
static Dimension GetMenuWidth ( Widget w , Widget w_ent ) { SmeObject cur_entry = ( SmeObject ) w_ent ; SimpleMenuWidget smw = ( SimpleMenuWidget ) w ; Dimension width , widest = ( Dimension ) 0 ; SmeObject * entry ; if ( smw -> simple_menu . menu_width ) return ( smw -> core . width ) ; ForAllChildren ( smw , entry ) { XtWidgetGeometry preferred ; if ( ! XtIsManaged ( ( Widget ) * entry ) ) continue ; if ( * entry != cur_entry ) { XtQueryGeometry ( ( Widget ) * entry , ( XtWidgetGeometry * ) NULL , & preferred ) ; if ( preferred . request_mode & CWWidth ) width = preferred . width ; else width = ( * entry ) -> rectangle . width ; } else width = ( * entry ) -> rectangle . width ; if ( width > widest ) widest = width ; } return ( widest ) ; }
Function Name: GetMenuWidth
      Description: Sets the length of the widest entry in pixels.
Function Name : GetMenuWidth Description : Sets the length of the widest entry in pixels .