Lines Matching refs:constraint

334 XawBoxQueryGeometry(Widget widget, XtWidgetGeometry *constraint,
342 constraint->request_mode &= CWWidth | CWHeight;
344 if (constraint->request_mode == 0)
348 if (constraint->request_mode == w->box.last_query_mode
349 && (!(constraint->request_mode & CWWidth)
350 || constraint->width == w->box.last_query_width)
351 && (!(constraint->request_mode & CWHeight)
352 || constraint->height == w->box.last_query_height)) {
357 if (constraint->request_mode == (CWWidth | CWHeight)
358 && constraint->width == preferred_width
359 && constraint->height == preferred_height)
368 width that will fit me within the height constraint */
370 w->box.last_query_mode = constraint->request_mode;
371 w->box.last_query_width = constraint->width;
372 w->box.last_query_height= constraint->height;
374 if (constraint->request_mode & CWWidth)
375 width = constraint->width;
376 else { /* if (constraint->request_mode & CWHeight) */
379 constraint->width = 65535;
383 height = (constraint->request_mode & CWHeight) ? constraint->height
388 if (constraint->request_mode & CWHeight
389 && preferred_height > constraint->height) {
391 if (preferred_width <= constraint->width) {
394 if (width > (constraint->width >> 1)) /* avoid short int overflow */
395 width = constraint->width;
399 } while (preferred_height > constraint->height
400 && width < constraint->width);
401 if (width != constraint->width) {
406 } while (preferred_height < constraint->height);
417 if (constraint->request_mode == (CWWidth|CWHeight)
418 && constraint->width == preferred_width
419 && constraint->height == preferred_height)