Mercurial > emacs
comparison lwlib/xlwmenuP.h @ 60698:3e557e11645e
Add support for I18N to Lucid menus.
* xlwmenuP.h (struct _XlwMenu_part) [HAVE_X_I18N]: Change `font' to be
a fontset. Add a `font_extents' element.
* xlwmenu.c (xlwMenuResources) [HAVE_X_I18N]: Use a fontset for the
`font' resource.
(string_width) [HAVE_X_I18N]: Use XmbTextExtents;
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): New macros.
(arrow_width, toggle_button_width, size_menu_item, draw_arrow)
(draw_toggle, draw_radio, display_menu_item): Use them.
(display_menu_item) [HAVE_X_I18N]: Use XmbDrawString.
(make_drawing_gcs) [HAVE_X_I18N]: Don't mess with fonts.
(XlwMenuInitialize) [HAVE_X_I18N]: Initialize font_extents.
(XlwMenuSetValues) [HAVE_X_I18N]: Refresh font_extents if font changes.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 18 Mar 2005 04:19:41 +0000 |
parents | 597c62d04dec |
children | 583a7eb791dd 30ad2795fdab |
comparison
equal
deleted
inserted
replaced
60697:d9c9ad74e719 | 60698:3e557e11645e |
---|---|
41 | 41 |
42 /* New fields for the XlwMenu widget instance record */ | 42 /* New fields for the XlwMenu widget instance record */ |
43 typedef struct _XlwMenu_part | 43 typedef struct _XlwMenu_part |
44 { | 44 { |
45 /* slots set by the resources */ | 45 /* slots set by the resources */ |
46 #ifdef HAVE_X_I18N | |
47 XFontSet font; | |
48 XFontSetExtents *font_extents; | |
49 #else | |
46 XFontStruct* font; | 50 XFontStruct* font; |
51 #endif | |
47 Pixel foreground; | 52 Pixel foreground; |
48 Pixel disabled_foreground; | 53 Pixel disabled_foreground; |
49 Pixel button_foreground; | 54 Pixel button_foreground; |
50 Dimension margin; | 55 Dimension margin; |
51 Dimension horizontal_spacing; | 56 Dimension horizontal_spacing; |