Lines Matching defs:item
31 * overhead of having a widget for each item in the list. It allows
32 * the user to select an item in a list and notifies the application through
324 * Description: Converts Xcoord to item number of item containing that
328 * Returns: the item number.
332 CvtToItem(w, xloc, yloc, item)
335 int *item;
366 *item = one + another;
367 if (*item >= lw->list.nitems) return(OUT_OF_RANGE);
372 * Description: Find the corners of the rectangle in item space.
395 * Description: returns TRUE if the item passed is in the given rectangle.
397 * ul, lr - corners of the rectangle in item space.
398 * item - item to check.
399 * Returns: TRUE if the item passed is in the given rectangle.
402 ItemInRectangle(w, ul, lr, item)
404 int ul, lr, item;
410 if (item < ul || item > lr)
417 mod_item = item % things;
424 * Description: paints the color of the background for the given item.
426 * x, y - ul corner of the area item occupies.
427 * item - the item we are dealing with.
432 HighlightBackground(w, x, y, item, gc)
434 int x, y, item;
441 width = XTextWidth(lw->list.font, lw->list.list[item],
442 strlen(lw->list.list[item])) + lw->list.column_space;
450 * Description: paints the name of the item in the appropriate location.
452 * item - the item to draw.
459 PaintItemName(w, item)
461 int item;
471 x = lw->list.col_width * (item / lw->list.nrows)
473 y = lw->list.row_height * (item % lw->list.nrows)
477 x = lw->list.col_width * (item % lw->list.ncols)
479 y = lw->list.row_height * (item / lw->list.ncols)
485 if (item == lw->list.is_highlighted) {
486 if (item == lw->list.highlight) {
488 HighlightBackground(w, x, y, item, lw->list.normgc);
495 HighlightBackground(w, x, y, item, lw->list.revgc);
500 if (item == lw->list.highlight) {
502 HighlightBackground(w, x, y, item, lw->list.normgc);
503 lw->list.is_highlighted = item;
513 str = lw->list.list[item]; /* draw it */
532 int item; /* an item to work with. */
544 for (item = ul_item; (item <= lr_item && item < lw->list.nitems) ; item++)
545 if (ItemInRectangle(w, ul_item, lr_item, item))
546 PaintItemName(w, item);
622 * Description: lays out the item in the list.
717 * is true then the name of the item is also put in the
734 int item, item_len;
738 * Find item and if out of range then unhighlight and return.
740 * If the current item is unhighlighted then the user has aborted the
744 if ( ((CvtToItem(w, event->xbutton.x, event->xbutton.y, &item))
745 == OUT_OF_RANGE) || (lw->list.highlight != item) ) {
750 item_len = strlen(lw->list.list[item]);
753 XStoreBytes(XtDisplay(w), lw->list.list[item], item_len);
759 ret_value.string = lw->list.list[item];
760 ret_value.list_index = item;
800 int item;
803 if ( (CvtToItem(w, event->xbutton.x, event->xbutton.y, &item))
805 XawListUnhighlight(w); /* Unhighlight current item. */
806 else if ( lw->list.is_highlighted != item ) /* If this item is not */
807 XawListHighlight(w, item); /* highlighted then do it. */
931 * Description: Highlights the given item.
933 * item - the item to hightlight.
938 XawListHighlight(w, item)
940 int item;
945 lw->list.highlight = item;
948 PaintItemName(w, item); /* HIGHLIGHT this one. */