Ejemplo n.º 1
0
static XtGeometryResult 
QueryGeometry (Widget gw, XtWidgetGeometry *intended, XtWidgetGeometry *pref)
{
    XmPannerWidget pw = (XmPannerWidget) gw;

    GetDefaultSize (pw, &pref->width, &pref->height);

    return(_XmHWQuery(gw, intended, pref));
}
Ejemplo n.º 2
0
static XtGeometryResult 
QueryGeometry(Widget w,XtWidgetGeometry *intended, XtWidgetGeometry *preferred)
{
    XmIconBoxWidget ibw = (XmIconBoxWidget) w;
    Cardinal min_x, min_y;
    Dimension max_w, max_h;

    GetMinCells(w, &min_x, &min_y);
    GetMaxCellSize(w, NULL, &max_w, &max_h);

    min_x++;
    min_y++;

    preferred->width = XmIconBox_h_margin(ibw) + min_x * (max_w + XmIconBox_h_margin(ibw));
    preferred->height= XmIconBox_v_margin(ibw) + min_y * (max_h + XmIconBox_v_margin(ibw));

    return(_XmHWQuery(w, intended, preferred));
}