#include "xlwmenu.h"
\f/* Menu callbacks */
+
+/* Callback XtNhighlightCallback for Lucid menus. W is the menu
+ widget, CLIENT_DATA contains a pointer to the widget_instance
+ for the menu, CALL_DATA contains a pointer to the widget_value
+ structure for the highlighted menu item. The latter may be null
+ if there isn't any highlighted menu item. */
+
+static void
+highlight_hook (w, client_data, call_data)
+ Widget w;
+ XtPointer client_data;
+ XtPointer call_data;
+{
+ widget_instance *instance = (widget_instance *) client_data;
+
+ if (instance->info->highlight_cb
+ && !w->core.being_destroyed)
+ instance->info->highlight_cb (w, instance->info->id, call_data);
+}
+
static void
pre_hook (w, client_data, call_data)
Widget w;
XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance);
XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
+ XtAddCallback (widget, XtNhighlightCallback, highlight_hook,
+ (XtPointer)instance);
return widget;
}
popup_shell, al, ac);
XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
-
+ XtAddCallback (widget, XtNhighlightCallback, highlight_hook,
+ (XtPointer)instance);
return popup_shell;
}