changeset 75019:6be52bf115d4

(enter_hook, leave_hook): New functions (xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave to enter/leave_hook.
author Jan Djärv <jan.h.d@swipnet.se>
date Mon, 01 Jan 2007 15:20:23 +0000
parents d263801b3ca8
children 70be541f4cc4
files lwlib/lwlib-Xlw.c
diffstat 1 files changed, 23 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/lwlib-Xlw.c	Mon Jan 01 15:20:11 2007 +0000
+++ b/lwlib/lwlib-Xlw.c	Mon Jan 01 15:20:23 2007 +0000
@@ -84,6 +84,25 @@
 }
 
 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;
      XtPointer client_data;
@@ -152,8 +171,8 @@
 
   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 @@
 			     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;
 }