Back to index

tetex-bin  3.0
xlwradio.c
Go to the documentation of this file.
00001 /* adapted from xlwradio.c in the XEmacs distribution.
00002    Changes are Copyright (C) 2002-2004 the xdvik development team.
00003 
00004    Note SU: This widget doesn't work with Xaw3d, and I have little
00005    inclination to make it work - the design would need to be utterly
00006    different, e.g. the radio would need to be a diamond instead of a
00007    circle, since 3d-shadowed circles don't look circular; colormap
00008    issues would need to be settled, etc. And besides, I don't like Xaw3d ;)
00009    
00010    So instead, the caller should just do:
00011 
00012    myWidget = XtVaCreateManagedWidget("foo",
00013    #ifdef XAW
00014                                       radioWidgetClass,
00015    #else
00016                                       toggleWidgetClass,
00017    #endif
00018                                       ... arglist ...);
00019 
00020    Feel free to submit patches if you want this implemented.
00021    
00022    Original copyright follows:
00023 */
00024 
00025 /* Radio Widget for XEmacs.
00026    Copyright (C) 1999 Edward A. Falk
00027 
00028 This file is part of XEmacs.
00029 
00030 XEmacs is free software; you can redistribute it and/or modify it
00031 under the terms of the GNU General Public License as published by the
00032 Free Software Foundation; either version 2, or (at your option) any
00033 later version.
00034 
00035 XEmacs is distributed in the hope that it will be useful, but WITHOUT
00036 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00037 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00038 for more details.
00039 
00040 You should have received a copy of the GNU General Public License
00041 along with XEmacs; see the file COPYING.  If not, write to
00042 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00043 Boston, MA 02111-1307, USA.  */
00044 
00045 /* Synched up with: Radio.c 1.1 */
00046 
00047 /*
00048  * Radio.c - Radio button widget
00049  *
00050  * Author: Edward A. Falk
00051  *         falk@falconer.vip.best.com
00052  *
00053  * Date:   June 30, 1997
00054  *
00055  *
00056  * Overview:  This widget is identical to the Toggle widget in behavior,
00057  * but completely different in appearance.  This widget looks like a small
00058  * diamond-shaped button with a label to the right.
00059  *
00060  * To make this work, we subclass the Toggle widget to inherit its behavior
00061  * and to inherit the label-drawing function from which Toggle is
00062  * subclassed.  We then completely replace the Expose, Set, Unset
00063  * and Highlight member functions.
00064  *
00065  * The Set and Unset actions are slightly unorthodox.  In Toggle's
00066  * ClassInit function, Toggle searches the Command actions list and
00067  * "steals" the Set and Unset functions, caching pointers to them in its
00068  * class record.  It then calls these functions from its own ToggleSet
00069  * and Toggle actions.
00070  *
00071  * We, in turn, override the Set() and Unset() actions in our own ClassRec.
00072  */
00073 
00074 #include "xdvi-config.h"
00075 #include "xdvi.h"
00076 #include "xdvi-debug.h"
00077 #include "util.h"
00078 #include "xaw_bitmaps.h" /* bitmaps for radio/checkbuttons */
00079 
00080 #include "xlwradioP.h"
00081 
00082 #ifndef MOTIF /* entire file */
00083 
00084 #include <stdio.h>
00085 
00086 #include <X11/IntrinsicP.h>
00087 #include <X11/StringDefs.h>
00088 #include <X11/Intrinsic.h>
00089 #include <X11/StringDefs.h>
00090 #include <X11/Xos.h>
00091 #include <X11/Xaw/Text.h>
00092 #include <X11/Xaw/AsciiText.h>
00093 /*  #include "../src/xmu.h" */
00094 
00095 #define       BOX_SIZE      16
00096 #define PIXMAP_OFFSET 2    /* additional space between pixmap and label */
00097 
00098 #ifndef UNUSED
00099 # define UNUSED(x) ((void)(x))
00100 #endif
00101 
00102 #ifndef       MAX
00103 # define MAX(i, j)       ( (i) > (j) ? (i) : (j) )
00104 #endif
00105 
00106 
00107 #define       rclass(w)     ((RadioWidgetClass)((w)->core.widget_class))
00108 
00109 
00110 #ifdef _ThreeDP_h
00111 #define       swid(rw)      ((rw)->threeD.shadow_width)
00112 #else
00113 #define       swid(rw)      ((rw)->core.border_width)
00114 #endif
00115 
00116 #define       bsize(rw)     (rclass(rw)->radio_class.dsize)
00117 #define       bs(rw)        (bsize(rw) + PIXMAP_OFFSET + 2*swid(rw))
00118 
00119 /****************************************************************
00120  *
00121  * Full class record constant
00122  *
00123  ****************************************************************/
00124 
00125 /* The translations table from Toggle do not need to be
00126  * overridden by Radio
00127  */
00128 
00129 
00130 /* Member functions */
00131 
00132 static void RadioInit (Widget, Widget, ArgList, Cardinal *);
00133 static void RadioExpose (Widget, XEvent *, Region);
00134 static void RadioResize (Widget);
00135 static void RadioDestroy (Widget);
00136 static void RadioClassInit (void);
00137 static void RadioClassPartInit (WidgetClass);
00138 static Boolean RadioSetValues (Widget, Widget, Widget, ArgList, Cardinal *);
00139 static void DrawDiamond (Widget);
00140 static XtGeometryResult RadioQueryGeometry (Widget, XtWidgetGeometry *,
00141                                        XtWidgetGeometry *);
00142 
00143 /* Action procs */
00144 
00145 static void RadioHighlight   (Widget, XEvent *, String *, Cardinal *);
00146 static void RadioUnhighlight (Widget, XEvent *, String *, Cardinal *);
00147 
00148 /* internal privates */
00149 
00150 static void RadioSize (RadioWidget, Dimension *, Dimension *);
00151 
00152 /* The actions table from Toggle is almost perfect, but we need
00153  * to override Highlight, Set, and Unset.
00154  */
00155 
00156 static XtActionsRec actionsList[] =
00157 {
00158   {"highlight",             RadioHighlight},
00159   {"unhighlight",    RadioUnhighlight},
00160 };
00161 
00162 #define offset(field) XtOffset(RadioWidget, radio.field)
00163 
00164 static XtResource resources[] = {
00165   {XtNisRadio,  XtCIsRadio, XtRBoolean, sizeof(Boolean),
00166    offset(isRadio), XtRImmediate, (XtPointer)True },
00167 };
00168 #undef offset
00169 
00170 #define SuperClass ((ToggleWidgetClass)&toggleClassRec)
00171 
00172 RadioClassRec radioClassRec = {
00173   {
00174     (WidgetClass) SuperClass,             /* superclass        */
00175     "Radio",                       /* class_name        */
00176     sizeof(RadioRec),                     /* size                     */
00177     RadioClassInit,                /* class_initialize  */
00178     RadioClassPartInit,                   /* class_part_initialize  */
00179     FALSE,                         /* class_inited             */
00180     RadioInit,                            /* initialize        */
00181     NULL,                          /* initialize_hook   */
00182     XtInheritRealize,                     /* realize           */
00183     actionsList,                   /* actions           */
00184     XtNumber(actionsList),         /* num_actions              */
00185     resources,                            /* resources         */
00186     XtNumber(resources),           /* resource_count    */
00187     NULLQUARK,                            /* xrm_class         */
00188     TRUE,                          /* compress_motion   */
00189     TRUE,                          /* compress_exposure */
00190     TRUE,                          /* compress_enterleave      */
00191     FALSE,                         /* visible_interest  */
00192     RadioDestroy,                  /* destroy           */
00193     RadioResize,                   /* resize            */
00194     RadioExpose,                   /* expose            */
00195     RadioSetValues,                /* set_values        */
00196     NULL,                          /* set_values_hook   */
00197     XtInheritSetValuesAlmost,             /* set_values_almost */
00198     NULL,                          /* get_values_hook   */
00199     NULL,                          /* accept_focus             */
00200     XtVersion,                            /* version           */
00201     NULL,                          /* callback_private  */
00202     XtInheritTranslations,         /* tm_table          */
00203     RadioQueryGeometry,                   /* query_geometry    */
00204     XtInheritDisplayAccelerator,   /* display_accelerator      */
00205     NULL                           /* extension         */
00206   },  /* CoreClass fields initialization */
00207   {
00208     XtInheritChangeSensitive              /* change_sensitive  */
00209 #ifndef HAVE_OLD_XAW
00210      , NULL  
00211 #endif
00212   },  /* SimpleClass fields initialization */
00213 #ifdef _ThreeDP_h
00214   {
00215     XtInheritXaw3dShadowDraw              /* field not used    */
00216   },  /* ThreeDClass fields initialization */
00217 #endif
00218   {
00219     0                                /* field not used  */
00220   },  /* LabelClass fields initialization */
00221   {
00222     0                                /* field not used  */
00223   },  /* CommandClass fields initialization */
00224   {
00225       RadioSet,                           /* Set Procedure.    */
00226       RadioUnset,                  /* Unset Procedure.  */
00227       NULL                         /* extension.        */
00228   },  /* ToggleClass fields initialization */
00229   {
00230       BOX_SIZE,
00231       DrawDiamond,                 /* draw procedure */
00232       None,                        /* selected radiobutton */
00233       None,                        /* unselected radiobutton */
00234       None,                        /* selected menubutton */
00235       None,                        /* unselected menubutton */
00236       NULL                         /* extension. */
00237   }  /* RadioClass fields initialization */
00238 };
00239 
00240   /* for public consumption */
00241 WidgetClass radioWidgetClass = (WidgetClass) &radioClassRec;
00242 
00243 
00244 
00245 
00246 
00247 
00248 /****************************************************************
00249  *
00250  * Class Methods
00251  *
00252  ****************************************************************/
00253 
00254 static void
00255 RadioClassInit (void)
00256 {
00257   XawInitializeWidgetSet();
00258 }
00259 
00260 static void
00261 RadioClassPartInit (WidgetClass class)
00262 {
00263   RadioWidgetClass c     = (RadioWidgetClass) class;
00264   RadioWidgetClass super = (RadioWidgetClass)c->core_class.superclass;
00265 
00266   if( c->radio_class.drawDiamond == NULL  ||
00267       c->radio_class.drawDiamond == XtInheritDrawDiamond )
00268   {
00269     c->radio_class.drawDiamond = super->radio_class.drawDiamond;
00270   }
00271 
00272 }
00273 
00274 
00275 
00276 
00277 static void
00278 RadioInit (Widget   request,
00279           Widget   new,
00280           ArgList  args,
00281           Cardinal *num_args)
00282 {
00283     RadioWidget rw = (RadioWidget) new;
00284     RadioWidget rw_req = (RadioWidget) request;
00285     Dimension w,h;
00286 
00287     UNUSED(args);
00288     UNUSED(num_args);
00289 
00290     /* FIXME: should pixmap initialization be here?? */
00291 
00292     /* Select initial size for the widget */
00293     if( rw_req->core.width == 0  ||  rw_req->core.height == 0 ) {
00294        RadioSize(rw, &w,&h);
00295        if( rw_req->core.width == 0 )
00296            rw->core.width = w;
00297        if( rw_req->core.height == 0 )
00298            rw->core.height = h;
00299        rw->core.widget_class->core_class.resize(new);
00300     }
00301     /*
00302       FIXME: access to XtWindow(rw) fails in the init method, so
00303       I moved the bitmap creation here -- is there a better way??
00304     */
00305     /* create pixmaps */
00306     rclass(rw)->radio_class.sel_radio
00307        = XCreateBitmapFromData(XtDisplay(rw), RootWindowOfScreen(XtScreen(rw)),
00308                             (char *)button_radio_on_bits, BUTTON_BITMAP_W, BUTTON_BITMAP_H);
00309     rclass(rw)->radio_class.unsel_radio
00310        = XCreateBitmapFromData(XtDisplay(rw), RootWindowOfScreen(XtScreen(rw)),
00311                             (char *)button_radio_off_bits, BUTTON_BITMAP_W, BUTTON_BITMAP_H);
00312     rclass(rw)->radio_class.sel_menu
00313        = XCreateBitmapFromData(XtDisplay(rw), RootWindowOfScreen(XtScreen(rw)),
00314                             (char *)button_check_on_bits, BUTTON_BITMAP_W, BUTTON_BITMAP_H);
00315     rclass(rw)->radio_class.unsel_menu
00316        = XCreateBitmapFromData(XtDisplay(rw), RootWindowOfScreen(XtScreen(rw)),
00317                             (char *)button_check_off_bits, BUTTON_BITMAP_W, BUTTON_BITMAP_H);
00318 }
00319 
00320 /*     Function Name: RadioDestroy
00321  *     Description: Destroy Callback for radio widget.
00322  *     Arguments: w - the radio widget that is being destroyed.
00323  *     Returns: none.
00324  */
00325 
00326 static void
00327 RadioDestroy (Widget w)
00328 {
00329     RadioWidget rw = (RadioWidget)w;
00330     /* de-allocate bitmaps */
00331     XFreePixmap(XtDisplay(w), rclass(rw)->radio_class.sel_radio);
00332     XFreePixmap(XtDisplay(w), rclass(rw)->radio_class.unsel_radio);
00333     XFreePixmap(XtDisplay(w), rclass(rw)->radio_class.sel_menu);
00334     XFreePixmap(XtDisplay(w), rclass(rw)->radio_class.unsel_menu);
00335 }
00336 
00337 
00338 /* React to size change from manager.  Label widget will compute some internal
00339  * stuff, but we need to override.  This code requires knowledge of the
00340  * internals of the Label widget.
00341  */
00342 
00343 static void
00344 RadioResize (Widget w)
00345 {
00346     RadioWidget rw = (RadioWidget)w;
00347 
00348     /* call parent resize proc */
00349     SuperClass->core_class.resize(w);
00350 
00351     /* override label offset */
00352 
00353     switch( rw->label.justify ) {
00354       case XtJustifyLeft:
00355        rw->label.label_x += (bs(rw) + rw->label.internal_width);
00356        break;
00357       case XtJustifyRight:
00358        break;
00359       case XtJustifyCenter:
00360       default:
00361        rw->label.label_x += (bs(rw) + rw->label.internal_width)/2;
00362        break;
00363     }
00364 }
00365 
00366 
00367 /*
00368  * Repaint the widget window.
00369  */
00370 
00371 static void
00372 RadioExpose (Widget w,
00373             XEvent *event,
00374             Region region)
00375 {
00376        RadioWidget   rw = (RadioWidget) w;
00377        Display              *dpy = XtDisplay(w);
00378        Window        win = XtWindow(w);
00379        GC            gc;
00380        Pixmap        left_bitmap;
00381        extern WidgetClass labelWidgetClass;
00382 
00383        /* Note: the Label widget examines the region to decide if anything
00384         * needs to be drawn.  I'm not sure that this is worth the effort,
00385         * but it bears thinking on.
00386         */
00387 
00388        /* Command widget may sometimes override the label GC in order
00389         * to draw inverse video.  We don't use inverse video, so we need
00390         * to restore the label's normal GC.
00391         */
00392        rw->label.normal_GC = rw->command.normal_GC;
00393 
00394 
00395        /* Let label widget draw the label.  If there was an lbm_x
00396         * field, we could let Label draw the bitmap too.  But there
00397         * isn't, so we need to temporarily remove the bitmap and
00398         * draw it ourself later.
00399         */
00400        left_bitmap = rw->label.left_bitmap;
00401        rw->label.left_bitmap = None;
00402        labelWidgetClass->core_class.expose(w,event,region);
00403        rw->label.left_bitmap = left_bitmap;
00404 
00405        /* now manually draw the left bitmap.  TODO: 3-d look, xaw-xpm */
00406        gc = XtIsSensitive(w) ? rw->label.normal_GC : rw->label.gray_GC;
00407        if( left_bitmap != None && rw->label.lbm_width > 0 )
00408        {
00409          /* TODO: handle pixmaps */
00410          XCopyPlane(dpy, left_bitmap, win, gc,
00411                    0,0, rw->label.lbm_width, rw->label.lbm_height,
00412                    (int) rw->label.internal_width*2 + bs(rw),
00413                    (int) rw->label.internal_height + rw->label.lbm_y,
00414                    1UL);
00415        }
00416        DrawDiamond(w);
00417        /* Finally, the button itself */
00418        ((RadioWidgetClass)(w->core.widget_class))->radio_class.drawDiamond(w);
00419 }
00420 
00421 
00422 
00423 
00424 /************************************************************
00425  *
00426  * Set specified arguments into widget
00427  *
00428  ***********************************************************/
00429 
00430 
00431 /* ARGSUSED */
00432 static Boolean
00433 RadioSetValues (Widget   current,
00434               Widget   request,
00435               Widget   new,
00436               ArgList  args,
00437               Cardinal *num_args)
00438 {
00439     RadioWidget oldrw = (RadioWidget) current;
00440     RadioWidget newrw = (RadioWidget) new;
00441 
00442     UNUSED(request);
00443     UNUSED(args);
00444     UNUSED(num_args);
00445     
00446     /* Need to find out if the size of the widget changed.  Set new size
00447      * if it did and resize is permitted.  One way to determine of the
00448      * widget changed size would be to scan the args list.  Another way
00449      * is to compare the old and new widgets and see if any of several
00450      * size-related fields have been changed.  The Label widget chose the
00451      * former method, but I choose the latter.
00452      */
00453 
00454     if( newrw->label.resize &&
00455        ( newrw->core.width != oldrw->core.width ||
00456          newrw->core.height != oldrw->core.height ||
00457          newrw->core.border_width != oldrw->core.border_width ) )
00458     {
00459       RadioSize(newrw, &newrw->core.width, &newrw->core.height);
00460     }
00461 
00462     /* The label set values routine can resize the widget. We need to
00463      * recalculate if this is true.
00464      */
00465     if (newrw->label.label_x != oldrw->label.label_x)
00466     {
00467       RadioResize (new);
00468     }
00469     return FALSE;
00470 }
00471 
00472 static XtGeometryResult
00473 RadioQueryGeometry (Widget w,
00474                   XtWidgetGeometry *intended,
00475                   XtWidgetGeometry *preferred)
00476 {
00477     RadioWidget rw = (RadioWidget) w;
00478 
00479     preferred->request_mode = CWWidth | CWHeight;
00480     RadioSize(rw, &preferred->width, &preferred->height);
00481 
00482     if (  ((intended->request_mode & (CWWidth | CWHeight))
00483               == (CWWidth | CWHeight)) &&
00484          intended->width == preferred->width &&
00485          intended->height == preferred->height)
00486        return XtGeometryYes;
00487     else if (preferred->width == w->core.width &&
00488             preferred->height == w->core.height)
00489        return XtGeometryNo;
00490     else
00491        return XtGeometryAlmost;
00492 }
00493 
00494 
00495 
00496 
00497 
00498 /************************************************************
00499  *
00500  *  Action Procedures
00501  *
00502  ************************************************************/
00503 
00504 /*
00505  * Draw the highlight border around the widget.  The Command widget
00506  * did this by drawing through a mask.  We do it by just drawing the
00507  * border.
00508  */
00509 
00510 static void
00511 DrawHighlight (Widget w,
00512               GC gc)
00513 {
00514        RadioWidget   rw = (RadioWidget)w;
00515        XRectangle    rects[4];
00516        Dimension     ht = rw->command.highlight_thickness;
00517 
00518        if( ht <= 0 ||
00519            ht > rw->core.width/2  ||
00520            ht > rw->core.height/2 )
00521          return;
00522 
00523        if( ! XtIsRealized(w) )
00524          return;
00525 
00526        rects[0].x = 0; rects[0].y = 0;
00527        rects[0].width = rw->core.width; rects[0].height = ht;
00528        rects[1].x = 0; rects[1].y = rw->core.height - ht;
00529        rects[1].width = rw->core.width; rects[1].height = ht;
00530        rects[2].x = 0; rects[2].y = ht;
00531        rects[2].width = ht; rects[2].height = rw->core.height - ht*2;
00532        rects[3].x = rw->core.width - ht; rects[3].y = ht;
00533        rects[3].width = ht; rects[3].height = rw->core.height - ht*2;
00534        XFillRectangles( XtDisplay(w), XtWindow(w), gc, rects, 4);
00535 }
00536 
00537 static void
00538 RadioHighlight (Widget   w,
00539               XEvent   *event,
00540               String   *params,
00541               Cardinal *num_params)
00542 {
00543     RadioWidget      rw = (RadioWidget)w;
00544     UNUSED(event);
00545     UNUSED(params);
00546     UNUSED(num_params);
00547     
00548     DrawHighlight(w, rw->command.normal_GC);
00549 }
00550 
00551 
00552 static void
00553 RadioUnhighlight (Widget   w,
00554                 XEvent   *event,
00555                 String   *params,
00556                 Cardinal *num_params)
00557 {
00558     RadioWidget      rw = (RadioWidget)w;
00559     UNUSED(event);
00560     UNUSED(params);
00561     UNUSED(num_params);
00562     
00563     DrawHighlight(w, rw->command.inverse_GC);
00564 }
00565 
00566 
00567 void
00568 RadioSet (Widget   w,
00569          XEvent   *event,
00570          String   *params,
00571          Cardinal *num_params)
00572 {
00573     RadioWidget      rw = (RadioWidget)w;
00574     RadioWidgetClass class = (RadioWidgetClass) w->core.widget_class;
00575 
00576     UNUSED(event);
00577     UNUSED(params);
00578     UNUSED(num_params);
00579     
00580     if( rw->command.set )
00581       return;
00582 
00583     rw->command.set = TRUE;
00584     if( XtIsRealized(w) )
00585       class->radio_class.drawDiamond(w);
00586 }
00587 
00588 
00589 void
00590 RadioUnset (Widget   w,
00591            XEvent   *event,
00592            String   *params,
00593            Cardinal *num_params)
00594 {
00595     RadioWidget      rw = (RadioWidget)w;
00596     RadioWidgetClass class = (RadioWidgetClass) w->core.widget_class;
00597 
00598     UNUSED(event);
00599     UNUSED(params);
00600     UNUSED(num_params);
00601     
00602     if( ! rw->command.set )
00603       return;
00604 
00605     rw->command.set = FALSE;
00606     if( XtIsRealized(w) )
00607       class->radio_class.drawDiamond(w);
00608 }
00609 
00610 
00611 
00612 
00613 /************************************************************
00614  *
00615  *  Internal Procedures
00616  *
00617  ************************************************************/
00618 
00619 
00620 /* Size of widget.  Width is size of box plus width of border around
00621  * box plus width of label plus three margins plus the size of the left
00622  * bitmap, if any.  Height is max(box,bitmap,label) plus two margins.
00623  */
00624 
00625 static void
00626 RadioSize (RadioWidget rw,
00627           Dimension   *w,
00628           Dimension   *h)
00629 {
00630        *w = rw->label.label_width + bs(rw) + LEFT_OFFSET(rw) + 
00631               3 * rw->label.internal_width;
00632        *h = MAX( rw->label.label_height, bs(rw) ) +
00633               2 * rw->label.internal_width;
00634 }
00635 
00636 
00637 static void
00638 DrawDiamond(Widget w)
00639 {
00640     RadioWidget rw = (RadioWidget) w;
00641     Display *dpy = XtDisplay(w);
00642     Window win = XtWindow(w);
00643     
00644     Position x = rw->label.internal_width;
00645     Position y = rw->core.height/2;
00646     GC gc = XtIsSensitive(w) ? rw->command.normal_GC : rw->label.gray_GC;
00647     Pixmap selected, unselected;
00648 
00649     if (rw->radio.isRadio) { /* it's a radio button */
00650        selected = rclass(rw)->radio_class.sel_radio;
00651        unselected = rclass(rw)->radio_class.unsel_radio;
00652     }
00653     else {
00654        selected = rclass(rw)->radio_class.sel_menu;
00655        unselected = rclass(rw)->radio_class.unsel_menu;
00656     }
00657     
00658     ASSERT(selected != None, "");
00659     ASSERT(unselected != None, "");
00660     
00661     if(rw->command.set) {
00662        XCopyPlane(dpy, selected, win, gc,
00663                  0, 0, BUTTON_BITMAP_H, BUTTON_BITMAP_W,
00664                  x, y - BUTTON_BITMAP_H / 2, 1L);
00665     }
00666     else {
00667        XCopyPlane(dpy, unselected, win, gc,
00668                  0, 0, BUTTON_BITMAP_H, BUTTON_BITMAP_W,
00669                  x, y - BUTTON_BITMAP_H / 2, 1L);
00670     }
00671 }
00672 
00673 
00674 #else
00675 /* silence `empty compilation unit' warnings */
00676 static void bar(void); static void foo() { bar(); } static void bar(void) { foo(); }
00677 #endif /* MOTIF */