1 /* The lwlib interface to Athena widgets.
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
4 This file is part of the Lucid Widget Library.
6 The Lucid Widget Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 1, or (at your option)
11 The Lucid Widget Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with XEmacs; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
28 #include "lwlib-Xaw.h"
30 #include <X11/StringDefs.h>
31 #include <X11/IntrinsicP.h>
32 #include <X11/CoreP.h>
33 #include <X11/Shell.h>
35 #ifdef LWLIB_SCROLLBARS_ATHENA
36 #include ATHENA_INCLUDE(Scrollbar.h)
38 #ifdef LWLIB_DIALOGS_ATHENA
39 #include ATHENA_INCLUDE(Dialog.h)
40 #include ATHENA_INCLUDE(Form.h)
41 #include ATHENA_INCLUDE(Command.h)
42 #include ATHENA_INCLUDE(Label.h)
44 #ifdef LWLIB_WIDGETS_ATHENA
45 #include ATHENA_INCLUDE(Toggle.h)
47 #include "xlwcheckbox.h"
50 #include ATHENA_INCLUDE(AsciiText.h)
53 #include <X11/Xatom.h>
55 static void xaw_generic_callback (Widget, XtPointer, XtPointer);
59 lw_xaw_widget_p (Widget widget)
62 #ifdef LWLIB_SCROLLBARS_ATHENA
63 || XtIsSubclass (widget, scrollbarWidgetClass)
65 #ifdef LWLIB_DIALOGS_ATHENA
66 || XtIsSubclass (widget, dialogWidgetClass)
68 #ifdef LWLIB_WIDGETS_ATHENA
69 || XtIsSubclass (widget, labelWidgetClass)
70 || XtIsSubclass (widget, toggleWidgetClass)
71 || XtIsSubclass (widget, gaugeWidgetClass)
73 || XtIsSubclass (widget, textWidgetClass)
79 #ifdef LWLIB_SCROLLBARS_ATHENA
81 xaw_update_scrollbar (widget_instance *instance, Widget widget,
84 if (val->scrollbar_data)
86 scrollbar_values *data = val->scrollbar_data;
87 float widget_shown, widget_topOfThumb;
88 float new_shown, new_topOfThumb;
91 /* First size and position the scrollbar widget. */
92 XtSetArg (al [0], XtNx, data->scrollbar_x);
93 XtSetArg (al [1], XtNy, data->scrollbar_y);
94 XtSetArg (al [2], XtNwidth, data->scrollbar_width);
95 XtSetArg (al [3], XtNheight, data->scrollbar_height);
96 XtSetValues (widget, al, 4);
98 /* Now size the scrollbar's slider. */
99 XtSetArg (al [0], XtNtopOfThumb, &widget_topOfThumb);
100 XtSetArg (al [1], XtNshown, &widget_shown);
101 XtGetValues (widget, al, 2);
103 new_shown = (double) data->slider_size /
104 (double) (data->maximum - data->minimum);
106 new_topOfThumb = (double) (data->slider_position - data->minimum) /
107 (double) (data->maximum - data->minimum);
111 else if (new_shown < 0)
114 if (new_topOfThumb > 1.0)
115 new_topOfThumb = 1.0;
116 else if (new_topOfThumb < 0)
119 if (new_shown != widget_shown || new_topOfThumb != widget_topOfThumb)
120 XawScrollbarSetThumb (widget, new_topOfThumb, new_shown);
123 #endif /* LWLIB_SCROLLBARS_ATHENA */
126 xaw_update_one_widget (widget_instance *instance, Widget widget,
127 widget_value *val, Boolean deep_p)
131 #ifdef LWLIB_SCROLLBARS_ATHENA
132 else if (XtIsSubclass (widget, scrollbarWidgetClass))
134 xaw_update_scrollbar (instance, widget, val);
137 #ifdef LWLIB_DIALOGS_ATHENA
138 else if (XtIsSubclass (widget, dialogWidgetClass))
141 XtSetArg (al [0], XtNlabel, val->contents->value);
142 XtSetValues (widget, al, 1);
144 #endif /* LWLIB_DIALOGS_ATHENA */
145 #ifdef LWLIB_WIDGETS_ATHENA
146 else if (XtClass (widget) == labelWidgetClass)
149 XtSetArg (al [0], XtNlabel, val->value);
150 XtSetValues (widget, al, 1);
152 #endif /* LWLIB_WIDGETS_ATHENA */
153 #if defined (LWLIB_DIALOGS_ATHENA) || defined (LWLIB_WIDGETS_ATHENA)
154 else if (XtIsSubclass (widget, commandWidgetClass))
158 XtSetArg (al [0], XtNborderWidth, &bw);
159 XtGetValues (widget, al, 1);
161 #ifndef LWLIB_DIALOGS_ATHENA3D
163 /* Don't let buttons end up with 0 borderwidth, that's ugly...
164 Yeah, all this should really be done through app-defaults files
165 or fallback resources, but that's a whole different can of worms
166 that I don't feel like opening right now. Making Athena widgets
167 not look like shit is just entirely too much work.
170 XtSetArg (al [0], XtNborderWidth, 1);
171 XtSetValues (widget, al, 1);
173 #endif /* ! LWLIB_DIALOGS_ATHENA3D */
175 XtSetArg (al [0], XtNlabel, val->value);
176 XtSetArg (al [1], XtNsensitive, val->enabled);
177 /* Force centered button text. See above. */
178 XtSetArg (al [2], XtNjustify, XtJustifyCenter);
179 XtSetValues (widget, al, 3);
181 XtRemoveAllCallbacks (widget, XtNcallback);
182 XtAddCallback (widget, XtNcallback, xaw_generic_callback, instance);
183 #ifdef LWLIB_WIDGETS_ATHENA
184 /* set the selected state */
185 if (XtIsSubclass (widget, toggleWidgetClass))
187 XtSetArg (al [0], XtNstate, val->selected);
188 XtSetValues (widget, al, 1);
190 #endif /* LWLIB_WIDGETS_ATHENA */
192 #endif /* LWLIB_DIALOGS_ATHENA */
193 /* Lastly update our global arg values. */
194 if (val->args && val->args->nargs)
195 XtSetValues (widget, val->args->args, val->args->nargs);
199 xaw_update_one_value (widget_instance *instance, Widget widget,
202 #ifdef LWLIB_WIDGETS_ATHENA
203 widget_value *old_wv;
205 /* copy the call_data slot into the "return" widget_value */
206 for (old_wv = instance->info->val->contents; old_wv; old_wv = old_wv->next)
207 if (!strcmp (val->name, old_wv->name))
209 val->call_data = old_wv->call_data;
213 if (XtIsSubclass (widget, toggleWidgetClass))
216 XtSetArg (al [0], XtNstate, &val->selected);
217 XtGetValues (widget, al, 1);
221 else if (XtIsSubclass (widget, asciiTextWidgetClass))
226 XtSetArg (al [0], XtNstring, &val->value);
227 XtGetValues (widget, al, 1);
231 #endif /* LWLIB_WIDGETS_ATHENA */
235 xaw_destroy_instance (widget_instance *instance)
237 #ifdef LWLIB_DIALOGS_ATHENA
238 if (XtIsSubclass (instance->widget, dialogWidgetClass))
239 /* Need to destroy the Shell too. */
240 XtDestroyWidget (XtParent (instance->widget));
243 XtDestroyWidget (instance->widget);
247 xaw_popup_menu (Widget widget, XEvent *event)
249 /* An Athena menubar has not been implemented. */
254 xaw_pop_instance (widget_instance *instance, Boolean up)
256 Widget widget = instance->widget;
260 #ifdef LWLIB_DIALOGS_ATHENA
261 if (XtIsSubclass (widget, dialogWidgetClass))
263 /* For dialogs, we need to call XtPopup on the parent instead
264 of calling XtManageChild on the widget.
265 Also we need to hack the shell's WM_PROTOCOLS to get it to
266 understand what the close box is supposed to do!!
268 Display *dpy = XtDisplay (widget);
269 Widget shell = XtParent (widget);
272 props [i++] = XInternAtom (dpy, "WM_DELETE_WINDOW", False);
273 XChangeProperty (dpy, XtWindow (shell),
274 XInternAtom (dpy, "WM_PROTOCOLS", False),
275 XA_ATOM, 32, PropModeAppend,
276 (unsigned char *) props, i);
278 /* Center the widget in its parent. Why isn't this kind of crap
279 done automatically? I thought toolkits were supposed to make
283 unsigned int x, y, w, h;
284 Widget topmost = instance->parent;
285 w = shell->core.width;
286 h = shell->core.height;
287 while (topmost->core.parent &&
288 XtIsRealized (topmost->core.parent) &&
289 /* HAVE_SESSION adds an unmapped parent widget that
290 we should ignore here. */
291 topmost->core.parent->core.mapped_when_managed)
292 topmost = topmost->core.parent;
293 if (topmost->core.width < w) x = topmost->core.x;
294 else x = topmost->core.x + ((topmost->core.width - w) / 2);
295 if (topmost->core.height < h) y = topmost->core.y;
296 else y = topmost->core.y + ((topmost->core.height - h) / 2);
297 XtMoveWidget (shell, x, y);
300 /* Finally, pop it up. */
301 XtPopup (shell, XtGrabNonexclusive);
304 #endif /* LWLIB_DIALOGS_ATHENA */
305 XtManageChild (widget);
309 #ifdef LWLIB_DIALOGS_ATHENA
310 if (XtIsSubclass (widget, dialogWidgetClass))
311 XtUnmanageChild (XtParent (widget));
314 XtUnmanageChild (widget);
319 #ifdef LWLIB_DIALOGS_ATHENA
322 static char overrideTrans[] =
323 "<Message>WM_PROTOCOLS: lwlib_delete_dialog()";
324 static XtActionProc wm_delete_window (Widget shell, XtPointer closure,
325 XtPointer call_data);
326 static XtActionsRec xaw_actions [] = {
327 {"lwlib_delete_dialog", (XtActionProc) wm_delete_window}
329 static Boolean actions_initted = False;
332 make_dialog (const char* name, Widget parent, Boolean pop_up_p,
333 const char* shell_title, const char* icon_name,
334 Boolean text_input_slot,
335 Boolean radio_box, Boolean list,
336 int left_buttons, int right_buttons)
341 char button_name [255];
345 XtTranslations override;
347 if (! pop_up_p) abort (); /* not implemented */
348 if (text_input_slot) abort (); /* not implemented */
349 if (radio_box) abort (); /* not implemented */
350 if (list) abort (); /* not implemented */
352 if (! actions_initted)
354 XtAppContext app = XtWidgetToApplicationContext (parent);
355 XtAppAddActions (app, xaw_actions,
356 sizeof (xaw_actions) / sizeof (xaw_actions[0]));
357 actions_initted = True;
360 override = XtParseTranslationTable (overrideTrans);
363 XtSetArg (av[ac], XtNtitle, shell_title); ac++;
364 XtSetArg (av[ac], XtNallowShellResize, True); ac++;
365 XtSetArg (av[ac], XtNtransientFor, parent); ac++;
366 shell = XtCreatePopupShell ("dialog", transientShellWidgetClass,
368 XtOverrideTranslations (shell, override);
371 dialog = XtCreateManagedWidget (name, dialogWidgetClass, shell, av, ac);
375 for (i = 0; i < left_buttons; i++)
378 XtSetArg (av [ac], XtNfromHoriz, button); ac++;
379 XtSetArg (av [ac], XtNleft, XtChainLeft); ac++;
380 XtSetArg (av [ac], XtNright, XtChainLeft); ac++;
381 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++;
382 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++;
383 XtSetArg (av [ac], XtNresizable, True); ac++;
384 sprintf (button_name, "button%d", ++bc);
385 button = XtCreateManagedWidget (button_name, commandWidgetClass,
390 /* Create a separator
392 I want the separator to take up the slack between the buttons on
393 the right and the buttons on the left (that is I want the buttons
394 after the separator to be packed against the right edge of the
395 window) but I can't seem to make it do it.
398 XtSetArg (av [ac], XtNfromHoriz, button); ac++;
399 /* XtSetArg (av [ac], XtNfromVert, XtNameToWidget (dialog, "label")); ac++; */
400 XtSetArg (av [ac], XtNleft, XtChainLeft); ac++;
401 XtSetArg (av [ac], XtNright, XtChainRight); ac++;
402 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++;
403 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++;
404 XtSetArg (av [ac], XtNlabel, ""); ac++;
405 XtSetArg (av [ac], XtNwidth, 30); ac++; /* #### aaack!! */
406 XtSetArg (av [ac], XtNborderWidth, 0); ac++;
407 XtSetArg (av [ac], XtNshapeStyle, XmuShapeRectangle); ac++;
408 XtSetArg (av [ac], XtNresizable, False); ac++;
409 XtSetArg (av [ac], XtNsensitive, False); ac++;
410 button = XtCreateManagedWidget ("separator",
411 /* labelWidgetClass, */
412 /* This has to be Command to fake out
413 the Dialog widget... */
417 for (i = 0; i < right_buttons; i++)
420 XtSetArg (av [ac], XtNfromHoriz, button); ac++;
421 XtSetArg (av [ac], XtNleft, XtChainRight); ac++;
422 XtSetArg (av [ac], XtNright, XtChainRight); ac++;
423 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++;
424 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++;
425 XtSetArg (av [ac], XtNresizable, True); ac++;
426 sprintf (button_name, "button%d", ++bc);
427 button = XtCreateManagedWidget (button_name, commandWidgetClass,
435 xaw_create_dialog (widget_instance* instance)
437 char *name = instance->info->type;
438 Widget parent = instance->parent;
440 Boolean pop_up_p = instance->pop_up_p;
441 const char *shell_name = 0;
442 const char *icon_name = 0;
443 Boolean text_input_slot = False;
444 Boolean radio_box = False;
445 Boolean list = False;
447 int left_buttons = 0;
448 int right_buttons = 1;
452 icon_name = "dbox-error";
453 shell_name = "Error";
457 icon_name = "dbox-info";
458 shell_name = "Information";
463 icon_name = "dbox-question";
464 shell_name = "Prompt";
468 text_input_slot = True;
469 icon_name = "dbox-question";
470 shell_name = "Prompt";
474 icon_name = "dbox-question";
475 shell_name = "Question";
479 total_buttons = name [1] - '0';
481 if (name [3] == 'T' || name [3] == 't')
483 text_input_slot = False;
487 right_buttons = name [4] - '0';
489 left_buttons = total_buttons - right_buttons;
491 widget = make_dialog (name, parent, pop_up_p,
492 shell_name, icon_name, text_input_slot, radio_box,
493 list, left_buttons, right_buttons);
497 #endif /* LWLIB_DIALOGS_ATHENA */
501 xaw_generic_callback (Widget widget, XtPointer closure, XtPointer call_data)
503 widget_instance *instance = (widget_instance *) closure;
504 Widget instance_widget;
507 #ifdef LWLIB_WIDGETS_ATHENA
508 /* We want the selected status to change only when we decide it
509 should change. Yuck but correct. */
510 if (XtIsSubclass (widget, toggleWidgetClass))
515 XtSetArg (al [0], XtNstate, &check);
516 XtGetValues (widget, al, 1);
518 XtSetArg (al [0], XtNstate, !check);
519 XtSetValues (widget, al, 1);
521 #endif /* LWLIB_WIDGETS_ATHENA */
522 lw_internal_update_other_instances (widget, closure, call_data);
526 if (widget->core.being_destroyed)
529 instance_widget = instance->widget;
530 if (!instance_widget)
533 id = instance->info->id;
539 XtSetArg (al [0], XtNuserData, &user_data);
540 XtGetValues (widget, al, 1);
543 /* Damn! Athena doesn't give us a way to hang our own data on the
544 buttons, so we have to go find it... I guess this assumes that
545 all instances of a button have the same call data.
547 ... Which is a totally bogus assumption --andyp */
549 widget_value *val = instance->info->val;
550 /* If the widget is a buffer/gutter widget then we already have
551 the one we are looking for, so don't try and descend the widget
555 char *name = XtName (widget);
559 if (val->name && !strcmp (val->name, name))
565 user_data = val->call_data;
569 if (instance->info->selection_cb)
570 instance->info->selection_cb (widget, id, user_data);
573 #ifdef LWLIB_DIALOGS_ATHENA
576 wm_delete_window (Widget shell, XtPointer closure, XtPointer call_data)
582 if (! XtIsSubclass (shell, shellWidgetClass))
584 XtSetArg (al [0], XtNchildren, &kids);
585 XtGetValues (shell, al, 1);
589 if (! XtIsSubclass (widget, dialogWidgetClass))
591 id = lw_get_widget_id (widget);
595 widget_info *info = lw_get_widget_info (id);
596 if (! info) abort ();
597 if (info->selection_cb)
598 info->selection_cb (widget, id, (XtPointer) -1);
601 lw_destroy_all_widgets (id);
605 #endif /* LWLIB_DIALOGS_ATHENA */
610 #ifdef LWLIB_SCROLLBARS_ATHENA
612 xaw_scrollbar_scroll (Widget widget, XtPointer closure, XtPointer call_data)
614 widget_instance *instance = (widget_instance *) closure;
616 scroll_event event_data;
618 if (!instance || widget->core.being_destroyed)
621 id = instance->info->id;
622 event_data.slider_value = (int) call_data;
625 if ((int) call_data > 0)
626 /* event_data.action = SCROLLBAR_PAGE_DOWN;*/
627 event_data.action = SCROLLBAR_LINE_DOWN;
629 /* event_data.action = SCROLLBAR_PAGE_UP;*/
630 event_data.action = SCROLLBAR_LINE_UP;
632 if (instance->info->pre_activate_cb)
633 instance->info->pre_activate_cb (widget, id, (XtPointer) &event_data);
637 xaw_scrollbar_jump (Widget widget, XtPointer closure, XtPointer call_data)
639 widget_instance *instance = (widget_instance *) closure;
641 scroll_event event_data;
642 scrollbar_values *val =
643 (scrollbar_values *) instance->info->val->scrollbar_data;
646 if (!instance || widget->core.being_destroyed)
649 id = instance->info->id;
651 percent = * (float *) call_data;
652 event_data.slider_value =
653 (int) (percent * (float) (val->maximum - val->minimum)) + val->minimum;
656 event_data.action = SCROLLBAR_DRAG;
658 if (instance->info->pre_activate_cb)
659 instance->info->pre_activate_cb (widget, id, (XtPointer) &event_data);
663 xaw_create_scrollbar (widget_instance *instance, int vertical)
668 static XtCallbackRec jumpCallbacks[2] =
669 { {xaw_scrollbar_jump, NULL}, {NULL, NULL} };
671 static XtCallbackRec scrollCallbacks[2] =
672 { {xaw_scrollbar_scroll, NULL}, {NULL, NULL} };
674 jumpCallbacks[0].closure = scrollCallbacks[0].closure = (XtPointer) instance;
676 /* #### This is tacked onto the with and height and completely
677 screws our geometry management. We should probably make the
678 top-level aware of this so that people could have a border but so
679 few people use the Athena scrollbar now that it really isn't
680 worth the effort, at least not at the moment. */
681 XtSetArg (av [ac], XtNborderWidth, 0); ac++;
682 XtSetArg (av [ac], XtNorientation,
683 vertical ? XtorientVertical : XtorientHorizontal); ac++;
684 XtSetArg (av [ac], "jumpProc", jumpCallbacks); ac++;
685 XtSetArg (av [ac], "scrollProc", scrollCallbacks); ac++;
687 return XtCreateWidget (instance->info->name, scrollbarWidgetClass,
688 instance->parent, av, ac);
692 xaw_create_vertical_scrollbar (widget_instance *instance)
694 return xaw_create_scrollbar (instance, 1);
698 xaw_create_horizontal_scrollbar (widget_instance *instance)
700 return xaw_create_scrollbar (instance, 0);
702 #endif /* LWLIB_SCROLLBARS_ATHENA */
704 #ifdef LWLIB_WIDGETS_ATHENA
707 xaw_create_button (widget_instance *instance)
712 widget_value* val = instance->info->val;
714 XtSetArg (al [ac], XtNsensitive, val->enabled); ac++;
715 XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++;
716 XtSetArg (al [ac], XtNjustify, XtJustifyCenter); ac++;
717 /* The highlight doesn't appear to be dynamically set which makes it
718 look ugly. I think this may be a LessTif bug but for now we just
720 XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0);ac++;
722 /* add any args the user supplied for creation time */
723 lw_add_value_args_to_args (val, al, &ac);
726 button = XtCreateManagedWidget (val->name, labelWidgetClass,
727 instance->parent, al, ac);
731 if (val->type == TOGGLE_TYPE || val->type == RADIO_TYPE)
733 XtSetArg (al [ac], XtNstate, val->selected); ac++;
734 button = XtCreateManagedWidget
736 val->type == TOGGLE_TYPE ? checkboxWidgetClass : radioWidgetClass,
737 instance->parent, al, ac);
741 button = XtCreateManagedWidget (val->name, commandWidgetClass,
742 instance->parent, al, ac);
744 XtRemoveAllCallbacks (button, XtNcallback);
745 XtAddCallback (button, XtNcallback, xaw_generic_callback, (XtPointer)instance);
748 XtManageChild (button);
754 xaw_create_label_field (widget_instance *instance)
756 return xaw_create_label (instance->parent, instance->info->val);
760 xaw_create_label (Widget parent, widget_value* val)
766 XtSetArg (al [ac], XtNsensitive, val->enabled); ac++;
767 XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++;
768 XtSetArg (al [ac], XtNjustify, XtJustifyCenter); ac++;
770 /* add any args the user supplied for creation time */
771 lw_add_value_args_to_args (val, al, &ac);
773 label = XtCreateManagedWidget (val->name, labelWidgetClass,
776 /* Do it again for arguments that have no effect until the widget is realized. */
778 lw_add_value_args_to_args (val, al, &ac);
779 XtSetValues (label, al, ac);
785 xaw_create_progress (widget_instance *instance)
790 widget_value* val = instance->info->val;
791 #if 0 /* This looks too awful, although more correct. */
794 XtSetArg (al [ac], XtNsensitive, False); ac++;
798 XtSetArg (al [ac], XtNsensitive, val->enabled); ac++;
801 XtSetArg (al [ac], XtNsensitive, True); ac++;
804 XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++;
805 XtSetArg (al [ac], XtNorientation, XtorientHorizontal); ac++;
806 XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0);ac++;
807 XtSetArg (al [ac], XtNntics, (Cardinal)10);ac++;
809 /* add any args the user supplied for creation time */
810 lw_add_value_args_to_args (val, al, &ac);
812 scale = XtCreateManagedWidget (val->name, gaugeWidgetClass,
813 instance->parent, al, ac);
814 /* add the callback */
816 XtAddCallback (scale, XtNgetValue, xaw_generic_callback, (XtPointer)instance);
818 XtManageChild (scale);
825 xaw_create_text_field (widget_instance *instance)
830 widget_value* val = instance->info->val;
832 XtSetArg (al [ac], XtNsensitive, val->enabled && val->call_data); ac++;
833 XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++;
834 XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0); ac++;
835 XtSetArg (al [ac], XtNtype, XawAsciiString); ac++;
836 XtSetArg (al [ac], XtNeditType, XawtextEdit); ac++;
838 /* add any args the user supplied for creation time */
839 lw_add_value_args_to_args (val, al, &ac);
841 text = XtCreateManagedWidget (val->name, asciiTextWidgetClass,
842 instance->parent, al, ac);
843 XtManageChild (text);
848 #endif /* LWLIB_WIDGETS_ATHENA */
850 widget_creation_entry
851 xaw_creation_table [] =
853 #ifdef LWLIB_SCROLLBARS_ATHENA
854 {"vertical-scrollbar", xaw_create_vertical_scrollbar },
855 {"horizontal-scrollbar", xaw_create_horizontal_scrollbar },
857 #ifdef LWLIB_WIDGETS_ATHENA
858 {"button", xaw_create_button },
859 { "label", xaw_create_label_field },
861 {"text-field", xaw_create_text_field },
863 {"progress", xaw_create_progress },