diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-03-18 04:19:41 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-03-18 04:19:41 +0000 |
commit | 5f302d71ffc5666feb1921ddcd49e1af8c1a5a12 (patch) | |
tree | e92b3e23102c55861ea0c53ed852d73c12eb36d7 /lwlib/xlwmenuP.h | |
parent | a017428dd3e20413794a8d3a4b32ede59bc88908 (diff) | |
download | emacs-5f302d71ffc5666feb1921ddcd49e1af8c1a5a12.tar.gz |
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.
Diffstat (limited to 'lwlib/xlwmenuP.h')
-rw-r--r-- | lwlib/xlwmenuP.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lwlib/xlwmenuP.h b/lwlib/xlwmenuP.h index 38bce796941..9937aa174ef 100644 --- a/lwlib/xlwmenuP.h +++ b/lwlib/xlwmenuP.h @@ -43,7 +43,12 @@ typedef struct _window_state typedef struct _XlwMenu_part { /* slots set by the resources */ +#ifdef HAVE_X_I18N + XFontSet font; + XFontSetExtents *font_extents; +#else XFontStruct* font; +#endif Pixel foreground; Pixel disabled_foreground; Pixel button_foreground; |