Mercurial > hg > xemacs-beta
comparison lwlib/xlwmenu.c @ 373:6240c7796c7a r21-2b2
Import from CVS: tag r21-2b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:04:06 +0200 |
parents | cc15677e0335 |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
372:49e1ed2d7ed8 | 373:6240c7796c7a |
---|---|
442 | 442 |
443 #ifdef NEED_MOTIF | 443 #ifdef NEED_MOTIF |
444 newstring = XmStringLtoRCreate (newchars, XmFONTLIST_DEFAULT_TAG); | 444 newstring = XmStringLtoRCreate (newchars, XmFONTLIST_DEFAULT_TAG); |
445 XmStringExtent (mw->menu.font_list, newstring, &width, &height); | 445 XmStringExtent (mw->menu.font_list, newstring, &width, &height); |
446 XmStringFree (newstring); | 446 XmStringFree (newstring); |
447 XtFree (chars); | |
447 return width; | 448 return width; |
448 #else | 449 #else |
449 # ifdef USE_XFONTSET | 450 # ifdef USE_XFONTSET |
450 XmbTextExtents (mw->menu.font_set, newchars, j, &ri, &rl); | 451 XmbTextExtents (mw->menu.font_set, newchars, j, &ri, &rl); |
451 return rl.width; | 452 return rl.width; |
889 s = i + 3; | 890 s = i + 3; |
890 i += 2; | 891 i += 2; |
891 } | 892 } |
892 } | 893 } |
893 x += string_draw_range (mw, window, x, y, gc, chars, s, i); | 894 x += string_draw_range (mw, window, x, y, gc, chars, s, i); |
895 #ifdef NEED_MOTIF | |
896 XtFree (chars); | |
897 #endif | |
894 } | 898 } |
895 | 899 |
896 static void | 900 static void |
897 binding_draw (XlwMenuWidget mw, Window w, int x, int y, GC gc, char *value) | 901 binding_draw (XlwMenuWidget mw, Window w, int x, int y, GC gc, char *value) |
898 { | 902 { |
2801 } | 2805 } |
2802 | 2806 |
2803 xgcv.fill_style = FillOpaqueStippled; | 2807 xgcv.fill_style = FillOpaqueStippled; |
2804 xgcv.foreground = mw->menu.top_shadow_color; | 2808 xgcv.foreground = mw->menu.top_shadow_color; |
2805 xgcv.background = mw->core.background_pixel; | 2809 xgcv.background = mw->core.background_pixel; |
2810 /* xgcv.stipple = mw->menu.top_shadow_pixmap; gtb */ | |
2811 #ifdef NEED_MOTIF | |
2812 if (mw->menu.top_shadow_pixmap && | |
2813 mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP) | |
2814 xgcv.stipple = mw->menu.top_shadow_pixmap; | |
2815 else | |
2816 xgcv.stipple = 0; | |
2817 #else | |
2806 xgcv.stipple = mw->menu.top_shadow_pixmap; | 2818 xgcv.stipple = mw->menu.top_shadow_pixmap; |
2819 #endif /* NEED_MOTIF */ | |
2807 pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0); | 2820 pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0); |
2808 mw->menu.shadow_top_gc = | 2821 mw->menu.shadow_top_gc = |
2809 XtGetGC((Widget)mw, GCForeground|GCBackground|pm, &xgcv); | 2822 XtGetGC((Widget)mw, GCForeground|GCBackground|pm, &xgcv); |
2810 | 2823 |
2811 xgcv.foreground = mw->menu.bottom_shadow_color; | 2824 xgcv.foreground = mw->menu.bottom_shadow_color; |
2825 /* xgcv.stipple = mw->menu.bottom_shadow_pixmap; gtb */ | |
2826 #ifdef NEED_MOTIF | |
2827 if (mw->menu.top_shadow_pixmap && | |
2828 mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP) | |
2829 xgcv.stipple = mw->menu.bottom_shadow_pixmap; | |
2830 else | |
2831 xgcv.stipple = 0; | |
2832 #else | |
2812 xgcv.stipple = mw->menu.bottom_shadow_pixmap; | 2833 xgcv.stipple = mw->menu.bottom_shadow_pixmap; |
2834 #endif /* NEED_MOTIF */ | |
2813 pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0); | 2835 pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0); |
2814 mw->menu.shadow_bottom_gc = | 2836 mw->menu.shadow_bottom_gc = |
2815 XtGetGC ((Widget)mw, GCForeground|GCBackground|pm, &xgcv); | 2837 XtGetGC ((Widget)mw, GCForeground|GCBackground|pm, &xgcv); |
2816 } | 2838 } |
2817 | 2839 |