Mercurial > emacs
changeset 27338:58f8eee82765
(xlwMenuResources): All XtNhighlightCallback.
(remap_menubar): Call highlight callback.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 17 Jan 2000 09:10:58 +0000 |
parents | d895d4e8a6f0 |
children | 8b90339beb04 |
files | lwlib/xlwmenu.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lwlib/xlwmenu.c Mon Jan 17 09:10:40 2000 +0000 +++ b/lwlib/xlwmenu.c Mon Jan 17 09:10:58 2000 +0000 @@ -112,6 +112,8 @@ offset(menu.open), XtRCallback, (XtPointer)NULL}, {XtNselect, XtCCallback, XtRCallback, sizeof(XtPointer), offset(menu.select), XtRCallback, (XtPointer)NULL}, + {XtNhighlightCallback, XtCCallback, XtRCallback, sizeof(XtPointer), + offset(menu.highlight), XtRCallback, (XtPointer)NULL}, {XtNmenu, XtCMenu, XtRPointer, sizeof(XtPointer), offset(menu.contents), XtRImmediate, (XtPointer)NULL}, {XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor), @@ -1246,6 +1248,11 @@ if (new_selection && !new_selection->enabled) new_selection = NULL; + /* Call callback when the hightlighted item changes. */ + if (old_selection || new_selection) + XtCallCallbackList ((Widget)mw, mw->menu.highlight, + (XtPointer) new_selection); + /* updates old_state from new_state. It has to be done now because display_menu (called below) uses the old_stack to know what to display. */ for (i = last_same + 1; i < new_depth; i++)