changeset 6305:65beaa9aa1e4

*** empty log message ***
author Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
date Fri, 11 Mar 1994 10:36:17 +0000
parents e6b7a921ccab
children 19fc40b33f52
files lwlib/lwlib.c
diffstat 1 files changed, 58 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/lwlib.c	Fri Mar 11 10:33:08 1994 +0000
+++ b/lwlib/lwlib.c	Fri Mar 11 10:36:17 1994 +0000
@@ -35,11 +35,11 @@
 #define alloca __builtin_alloca
 #endif
 
-#if ((!__GNUC__) && !defined(__hpux)) && !defined(AIXV3)
+#if ((!__GNUC__) && !defined(__hpux)) && !defined(_AIX)
 #include <alloca.h>
 #endif
 
-#if defined(AIXV3)
+#if defined(_AIX)
 #pragma alloca
 #endif
 
@@ -52,6 +52,9 @@
 #if defined (USE_OLIT)
 #include "lwlib-Xol.h"
 #endif
+#if defined (USE_XAW)
+#include "lwlib-Xaw.h"
+#endif
 
 #if !defined (USE_LUCID) && !defined (USE_MOTIF) && !defined (USE_OLIT)
 ERROR!  At least one of USE_LUCID, USE_MOTIF or USE_OLIT must be defined.
@@ -321,6 +324,14 @@
   return NULL;
 }
 
+/* Internal function used by the library dependent implementation to get the
+   widget_value for a given widget in an instance */
+widget_info *
+lw_get_widget_info (LWLIB_ID id)
+{
+  return get_widget_info (id, 0);
+}
+
 static widget_instance *
 get_widget_instance (widget, remove_p)
      Widget widget;
@@ -573,6 +584,10 @@
       if (lw_olit_widget_p (instance->widget))
 	xol_update_one_widget (instance, widget, val, deep_p);
 #endif
+#if defined (USE_XAW)
+      if (lw_xaw_widget_p (instance->widget))
+	xaw_update_one_widget (instance, widget, val, deep_p);
+#endif
     }
 }
 
@@ -741,6 +756,10 @@
   if (!function)
     function = find_in_table (instance->info->type, xol_creation_table);
 #endif
+#if defined (USE_XAW)
+  if (!function)
+    function = find_in_table (instance->info->type, xaw_creation_table);
+#endif
 
   if (!function)
     {
@@ -753,6 +772,10 @@
 	  if (!function)
 	    function = xm_create_dialog;
 #endif
+#if defined (USE_XAW)
+	  if (!function)
+	    function = xaw_create_dialog;
+#endif
 #if defined (USE_OLIT)
 	  /* not yet */
 #endif
@@ -879,6 +902,11 @@
 	xol_destroy_instance (instance);
       else
 #endif
+#if defined (USE_XAW)
+      if (lw_xaw_widget_p (instance->widget))
+	xaw_destroy_instance (instance);
+      else 
+#endif
 	/* do not remove the empty statement */
 	;
     }
@@ -995,19 +1023,34 @@
     for (instance = info->instances; instance; instance = instance->next)
       if (instance->pop_up_p && instance->widget)
 	{
-	  if (!XtIsRealized (instance->widget))
-	    XtRealizeWidget (instance->widget);
 #if defined (USE_LUCID)
 	  if (lw_lucid_widget_p (instance->widget))
-	    xlw_pop_instance (instance, up);
+	    {
+	      XtRealizeWidget (instance->widget);
+	      xlw_pop_instance (instance, up);
+	    }
 #endif
 #if defined (USE_MOTIF)
 	  if (lw_motif_widget_p (instance->widget))
-	    xm_pop_instance (instance, up);
+	    {
+	      XtRealizeWidget (instance->widget);
+	      xm_pop_instance (instance, up);
+	    }
 #endif
 #if defined (USE_OLIT)
 	  if (lw_olit_widget_p (instance->widget))
-	    xol_pop_instance (instance, up);
+	    {
+	      XtRealizeWidget (instance->widget);
+	      xol_pop_instance (instance, up);
+	    }
+#endif
+#if defined (USE_XAW)
+	  if (lw_xaw_widget_p (instance->widget))
+	    {
+	      XtRealizeWidget (XtParent (instance->widget));
+	      XtRealizeWidget (instance->widget);
+	      xaw_pop_instance (instance, up);
+	    }
 #endif
 	}
 }
@@ -1042,6 +1085,10 @@
   if (lw_olit_widget_p (widget))
     xol_popup_menu (widget);
 #endif
+#if defined (USE_XAW)
+  if (lw_xaw_widget_p (widget))
+    xaw_popup_menu (widget);
+#endif
 }
 
 /* get the values back */
@@ -1066,6 +1113,10 @@
       if (lw_olit_widget_p (instance->widget))
 	xol_update_one_value (instance, widget, val);
 #endif
+#if defined (USE_XAW)
+      if (lw_xaw_widget_p (instance->widget))
+	xaw_update_one_value (instance, widget, val);
+#endif
       return True;
     }
   else