Commit 3fcd0186 authored by Jan Djärv's avatar Jan Djärv

(enter_hook, leave_hook): New functions

(xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave
to enter/leave_hook.
parent 1ecd5086
2007-01-01 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* xlwmenu.c (xlwMenuResources): Add XtNleaveCallback, XtNenterCallback.
(display_menu, map_event_to_widget_value): Generate enter and
leave callbacks.
(pop_up_menu): Initialize mw->menu.inside_entry.
* xlwmenu.h (XtNleaveCallback, XtNenterCallback): New strings.
* xlwmenuP.h (_XlwMenu_part): Add enter/leave callbacks and
inside_entry.
* lwlib-Xlw.c (enter_hook, leave_hook): New functions
(xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave
to enter/leave_hook.
2006-10-30 Chong Yidong <cyd@stupidchicken.com>
* Makefile.in (lwlib-utils.o): Use CPPFLAGS.
......
......@@ -83,6 +83,25 @@ highlight_hook (w, client_data, call_data)
instance->info->highlight_cb (w, instance->info->id, call_data);
}
static void
enter_hook (w, client_data, call_data)
Widget w;
XtPointer client_data;
XtPointer call_data;
{
highlight_hook (w, client_data, call_data);
}
static void
leave_hook (w, client_data, call_data)
Widget w;
XtPointer client_data;
XtPointer call_data;
{
highlight_hook (w, client_data, NULL);
}
static void
pre_hook (w, client_data, call_data)
Widget w;
......@@ -152,8 +171,8 @@ xlw_create_menubar (instance)
XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance);
XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
XtAddCallback (widget, XtNhighlightCallback, highlight_hook,
(XtPointer)instance);
XtAddCallback (widget, XtNleaveCallback, leave_hook, (XtPointer)instance);
XtAddCallback (widget, XtNenterCallback, enter_hook, (XtPointer)instance);
return widget;
}
......@@ -179,8 +198,8 @@ xlw_create_popup_menu (instance)
popup_shell, al, ac);
XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
XtAddCallback (widget, XtNhighlightCallback, highlight_hook,
(XtPointer)instance);
XtAddCallback (widget, XtNleaveCallback, leave_hook, (XtPointer)instance);
XtAddCallback (widget, XtNenterCallback, enter_hook, (XtPointer)instance);
return popup_shell;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment