aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/xfig/files/patch-w_mousefun.c
blob: b619fd08d06233be37caf67af7b3a9817a3e4bbc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- w_mousefun.c.orig   Wed Mar 27 01:22:48 2002
+++ w_mousefun.c    Wed Aug 31 09:49:42 2005
@@ -54,9 +54,11 @@
 static Pixmap  mousefun_pm;
 static Pixmap  keybd_pm;
 
+#ifndef XAW3D
 /* popup message over button when mouse enters it */
 static void     mouse_balloon_trigger();
 static void     mouse_unballoon();
+#endif
 
 void
 init_mousefun(tool)
@@ -81,11 +83,15 @@
 
     mousefun = XtCreateManagedWidget("mouse_panel", labelWidgetClass,
                     tool, Args, ArgCount);
+#ifdef XAW3D
+    update_mousepanel();
+#else
     /* popup when mouse passes over button */
     XtAddEventHandler(mousefun, EnterWindowMask, False,
              mouse_balloon_trigger, (XtPointer) mousefun);
     XtAddEventHandler(mousefun, LeaveWindowMask, False,
              mouse_unballoon, (XtPointer) mousefun);
+#endif
 }
 
 /* widgets are realized and windows exist at this point */
@@ -105,6 +111,17 @@
     set_mousefun("", "", "", "", "", "");
 }
 
+#ifdef XAW3D
+update_mousepanel()
+{
+    if (mousefun)
+   if (appres.showballoons)
+       XawTipEnable(mousefun,
+            "Shows which mouse buttons\nare active in each mode");
+   else
+       XawTipDisable(mousefun);
+}
+#else
 /* come here when the mouse passes over a button in the mouse indicator panel */
 
 static Widget mouse_balloon_popup = (Widget) 0;
@@ -184,6 +201,7 @@
    mouse_balloon_popup = (Widget) 0;
     }
 }
+#endif
 
 static void
 reset_mousefun()