[ALI] Utility function to ask Xaw for font height, since the previous * assumption of ascent + descent is not always valid. */
| 747 | * assumption of ascent + descent is not always valid. |
| 748 | */ |
| 749 | Dimension |
| 750 | nhFontHeight(Widget w) |
| 751 | { |
| 752 | #ifdef _XawTextSink_h |
| 753 | Widget sink; |
| 754 | XawTextPosition pos = 0; |
| 755 | int resWidth, resHeight; |
| 756 | Arg args[1]; |
| 757 | |
| 758 | XtSetArg(args[0], XtNtextSink, &sink); |
| 759 | XtGetValues(w, args, 1); |
| 760 | |
| 761 | XawTextSinkFindPosition(sink, pos, 0, 0, 0, &pos, &resWidth, &resHeight); |
| 762 | return resHeight; |
| 763 | #else |
| 764 | XFontStruct *fs; |
| 765 | Arg args[1]; |
| 766 | |
| 767 | XtSetArg(args[0], XtNfont, &fs); |
| 768 | XtGetValues(w, args, 1); |
| 769 | |
| 770 | /* Assume font height is ascent + descent. */ |
| 771 | return = fs->ascent + fs->descent; |
| 772 | #endif |
| 773 | } |
| 774 | |
| 775 | static String *default_resource_data = 0, /* NULL-terminated arrays */ |
| 776 | *def_rsrc_macr = 0, /* macro names */ |
no outgoing calls
no test coverage detected