Lines Matching refs:tip

55     TipWidget tip;
86 #define offset(field) XtOffsetOf(TipRec, tip.field)
217 /* tip */
244 TipWidget tip = (TipWidget)w;
247 if (!tip->tip.font) XtError("Aborting: no font found\n");
248 if (tip->tip.international && !tip->tip.fontset)
251 tip->tip.timer = 0;
253 values.foreground = tip->tip.foreground;
254 values.background = tip->core.background_pixel;
255 values.font = tip->tip.font->fid;
258 tip->tip.gc = XtAllocateGC(w, 0, GCForeground | GCBackground | GCFont |
266 TipWidget tip = (TipWidget)w;
268 if (tip->tip.timer)
269 XtRemoveTimeOut(tip->tip.timer);
271 XtReleaseGC(w, tip->tip.gc);
291 TipWidget tip = (TipWidget)w;
293 if (tip->tip.backing_store == Always ||
294 tip->tip.backing_store == NotUseful ||
295 tip->tip.backing_store == WhenMapped) {
297 attr->backing_store = tip->tip.backing_store;
319 TipWidget tip = (TipWidget)w;
320 GC gc = tip->tip.gc;
322 _Xconst char * label = tip->tip.label;
323 Position y = (Position)(tip->tip.top_margin + tip->tip.font->max_bounds.ascent);
326 if (tip->tip.display_list)
327 XawRunDisplayList(w, tip->tip.display_list, event, region);
329 if (tip->tip.international == True) {
330 Position ksy = (Position)tip->tip.top_margin;
331 XFontSetExtents *ext = XExtentsOfFontSet(tip->tip.fontset);
336 XmbDrawString(XtDisplay(w), XtWindow(w), tip->tip.fontset,
337 gc, tip->tip.left_margin, ksy, label,
344 XmbDrawString(XtDisplay(w), XtWindow(w), tip->tip.fontset, gc,
345 tip->tip.left_margin, ksy, label, len);
349 if (tip->tip.encoding)
351 tip->tip.left_margin, y,
355 tip->tip.left_margin, y, label, (int)(nl - label));
356 y = (Position)(y + (tip->tip.font->max_bounds.ascent +
357 tip->tip.font->max_bounds.descent));
362 if (tip->tip.encoding)
364 tip->tip.left_margin, y, (_Xconst XChar2b*)label, len >> 1);
367 tip->tip.left_margin, y, label, len);
381 if (curtip->tip.font->fid != newtip->tip.font->fid ||
382 curtip->tip.foreground != newtip->tip.foreground) {
384 .foreground = newtip->tip.foreground,
386 .font = newtip->tip.font->fid,
390 XtReleaseGC(cnew, curtip->tip.gc);
391 newtip->tip.gc = XtAllocateGC(cnew, 0, GCForeground | GCBackground |
396 if (curtip->tip.display_list != newtip->tip.display_list)
405 XFontStruct *fs = info->tip->tip.font;
408 _Xconst char *label = info->tip->tip.label;
410 if (info->tip->tip.international == True) {
411 XFontSet fset = info->tip->tip.fontset;
439 int w = info->tip->tip.encoding ?
454 width = info->tip->tip.encoding ?
458 XtWidth(info->tip) = (Dimension) (width + info->tip->tip.left_margin +
459 info->tip->tip.right_margin);
460 XtHeight(info->tip) = (Dimension) (height + info->tip->tip.top_margin +
461 info->tip->tip.bottom_margin);
473 XQueryPointer(XtDisplay((Widget)info->tip), XtWindow((Widget)info->tip),
475 x = (Position)(rx - (XtWidth(info->tip) >> 1));
479 int scr_width = WidthOfScreen(XtScreen(info->tip));
481 if (x + XtWidth(info->tip) + XtBorderWidth(info->tip) > scr_width)
482 x = (Position)(scr_width - XtWidth(info->tip) - XtBorderWidth(info->tip));
487 int scr_height = HeightOfScreen(XtScreen(info->tip));
489 if (y + XtHeight(info->tip) + XtBorderWidth(info->tip) > scr_height)
490 y = (Position)(y - (XtHeight(info->tip) + XtBorderWidth(info->tip) +
496 XMoveResizeWindow(XtDisplay(info->tip), XtWindow(info->tip),
497 (int)(XtX(info->tip) = x), (int)(XtY(info->tip) = y),
498 (unsigned)XtWidth(info->tip), (unsigned)XtHeight(info->tip));
512 info->tip = (TipWidget)XtCreateWidget("tip", tipWidgetClass, shell, NULL, 0);
513 XtRealizeWidget((Widget)info->tip);
526 XawTipInfo *ptip, *tip = first_tip;
529 if (tip == NULL)
532 for (ptip = tip; tip; ptip = tip, tip = tip->next)
533 if (tip->screen == screen)
534 return (tip);
542 if (info->tip->tip.timer) {
543 XtRemoveTimeOut(info->tip->tip.timer);
544 info->tip->tip.timer = 0;
547 XtRemoveGrab(XtParent((Widget)info->tip));
548 XUnmapWindow(XtDisplay((Widget)info->tip), XtWindow((Widget)info->tip));
552 info->tip->tip.timer =
553 XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)info->tip),
554 (unsigned long)info->tip->tip.timeout,
566 info->tip->tip.label = NULL;
567 info->tip->tip.international = False;
568 info->tip->tip.encoding = 0;
569 info->tip->tip.timer = 0;
570 XtSetArg(args[0], XtNtip, &info->tip->tip.label);
571 XtSetArg(args[1], XtNinternational, &info->tip->tip.international);
572 XtSetArg(args[2], XtNencoding, &info->tip->tip.encoding);
575 if (info->tip->tip.label) {
578 XMapRaised(XtDisplay((Widget)info->tip), XtWindow((Widget)info->tip));
579 XtAddGrab(XtParent((Widget)info->tip), True, True);
613 add_timeout = info->tip->tip.timer != 0;