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
7 and/or modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version.
11 The Lucid Widget Library is distributed in the hope that it will be
12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
26 #include "lwlib-Xaw.h"
28 #include <X11/StringDefs.h>
29 #include <X11/IntrinsicP.h>
30 #include <X11/CoreP.h>
31 #include <X11/Shell.h>
33 #ifdef LWLIB_SCROLLBARS_ATHENA
34 #include ATHENA_Scrollbar_h_
36 #ifdef LWLIB_DIALOGS_ATHENA
37 #include ATHENA_Dialog_h_
38 #include ATHENA_Form_h_
39 #include ATHENA_Command_h_
40 #include ATHENA_Label_h_
42 #ifdef LWLIB_WIDGETS_ATHENA
43 #include ATHENA_Toggle_h_
45 #include "xlwcheckbox.h"
47 #include ATHENA_AsciiText_h_
49 #include <X11/Xatom.h>
51 static void xaw_generic_callback(Widget, XtPointer, XtPointer);
53 Boolean lw_xaw_widget_p(Widget widget)
56 #ifdef LWLIB_SCROLLBARS_ATHENA
57 || XtIsSubclass(widget, scrollbarWidgetClass)
59 #ifdef LWLIB_DIALOGS_ATHENA
60 || XtIsSubclass(widget, dialogWidgetClass)
62 #ifdef LWLIB_WIDGETS_ATHENA
63 || XtIsSubclass(widget, labelWidgetClass)
64 || XtIsSubclass(widget, toggleWidgetClass)
65 || XtIsSubclass(widget, gaugeWidgetClass)
67 || XtIsSubclass(widget, asciiTextWidgetClass)
73 #ifdef LWLIB_SCROLLBARS_ATHENA
75 xaw_update_scrollbar(widget_instance * instance, Widget widget,
78 if (val->scrollbar_data) {
79 scrollbar_values *data = val->scrollbar_data;
80 float widget_shown, widget_topOfThumb;
81 float new_shown, new_topOfThumb;
84 /* First size and position the scrollbar widget. */
85 XtSetArg(al[0], XtNx, data->scrollbar_x);
86 XtSetArg(al[1], XtNy, data->scrollbar_y);
87 XtSetArg(al[2], XtNwidth, data->scrollbar_width);
88 XtSetArg(al[3], XtNheight, data->scrollbar_height);
89 XtSetValues(widget, al, 4);
91 /* Now size the scrollbar's slider. */
92 XtSetArg(al[0], XtNtopOfThumb, &widget_topOfThumb);
93 XtSetArg(al[1], XtNshown, &widget_shown);
94 XtGetValues(widget, al, 2);
96 new_shown = (double)data->slider_size /
97 (double)(data->maximum - data->minimum);
100 (double)(data->slider_position -
101 data->minimum) / (double)(data->maximum -
106 else if (new_shown < 0)
109 if (new_topOfThumb > 1.0)
110 new_topOfThumb = 1.0;
111 else if (new_topOfThumb < 0)
114 if (new_shown != widget_shown
115 || new_topOfThumb != widget_topOfThumb)
116 XawScrollbarSetThumb(widget, new_topOfThumb, new_shown);
119 #endif /* LWLIB_SCROLLBARS_ATHENA */
122 xaw_update_one_widget(widget_instance * instance, Widget widget,
123 widget_value * val, Boolean deep_p)
126 #ifdef LWLIB_SCROLLBARS_ATHENA
127 else if (XtIsSubclass(widget, scrollbarWidgetClass)) {
128 xaw_update_scrollbar(instance, widget, val);
131 #ifdef LWLIB_WIDGETS_ATHENA
133 else if (XtIsSubclass(widget, asciiTextWidgetClass)) {
137 #ifdef LWLIB_DIALOGS_ATHENA
138 else if (XtIsSubclass(widget, dialogWidgetClass)) {
140 XtSetArg(al[0], XtNlabel, val->contents->value);
141 XtSetValues(widget, al, 1);
143 #endif /* LWLIB_DIALOGS_ATHENA */
144 #ifdef LWLIB_WIDGETS_ATHENA
145 else if (XtClass(widget) == labelWidgetClass) {
147 XtSetArg(al[0], XtNlabel, val->value);
148 XtSetValues(widget, al, 1);
150 #endif /* LWLIB_WIDGETS_ATHENA */
151 #if defined (LWLIB_DIALOGS_ATHENA) || defined (LWLIB_WIDGETS_ATHENA)
152 else if (XtIsSubclass(widget, commandWidgetClass)) {
155 XtSetArg(al[0], XtNborderWidth, &bw);
156 XtGetValues(widget, al, 1);
158 #ifndef LWLIB_DIALOGS_ATHENA3D
160 /* Don't let buttons end up with 0 borderwidth, that's ugly...
161 Yeah, all this should really be done through app-defaults files
162 or fallback resources, but that's a whole different can of worms
163 that I don't feel like opening right now. Making Athena widgets
164 not look like shit is just entirely too much work.
167 XtSetArg(al[0], XtNborderWidth, 1);
168 XtSetValues(widget, al, 1);
170 #endif /* ! LWLIB_DIALOGS_ATHENA3D */
172 lw_remove_accelerator_spec(val->value);
173 XtSetArg(al[0], XtNlabel, val->value);
174 XtSetArg(al[1], XtNsensitive, val->enabled);
175 /* Force centered button text. See above. */
176 XtSetArg(al[2], XtNjustify, XtJustifyCenter);
177 XtSetValues(widget, al, 3);
179 XtRemoveAllCallbacks(widget, XtNcallback);
180 XtAddCallback(widget, XtNcallback, xaw_generic_callback,
182 #ifdef LWLIB_WIDGETS_ATHENA
183 /* set the selected state */
184 if (XtIsSubclass(widget, toggleWidgetClass)) {
185 XtSetArg(al[0], XtNstate, val->selected);
186 XtSetValues(widget, al, 1);
188 #endif /* LWLIB_WIDGETS_ATHENA */
190 #endif /* LWLIB_DIALOGS_ATHENA */
191 /* Lastly update our global arg values. */
192 if (val->args && val->args->nargs)
193 XtSetValues(widget, val->args->args, val->args->nargs);
197 xaw_update_one_value(widget_instance * instance, Widget widget,
200 #ifdef LWLIB_WIDGETS_ATHENA
201 widget_value *old_wv;
203 /* copy the call_data slot into the "return" widget_value */
204 for (old_wv = instance->info->val->contents; old_wv;
205 old_wv = old_wv->next)
206 if (!strcmp(val->name, old_wv->name)) {
207 val->call_data = old_wv->call_data;
211 if (XtIsSubclass(widget, toggleWidgetClass)) {
213 XtSetArg(al[0], XtNstate, &val->selected);
214 XtGetValues(widget, al, 1);
218 else if (XtIsSubclass(widget, asciiTextWidgetClass)) {
221 XtSetArg(al[0], XtNstring, &buf);
222 XtGetValues(widget, al, 1);
228 /* I don't think this causes a leak. */
230 val->value = strdup(buf);
234 #endif /* LWLIB_WIDGETS_ATHENA */
237 void xaw_destroy_instance(widget_instance * instance)
239 #ifdef LWLIB_DIALOGS_ATHENA
240 if (XtIsSubclass(instance->widget, dialogWidgetClass))
241 /* Need to destroy the Shell too. */
242 XtDestroyWidget(XtParent(instance->widget));
245 XtDestroyWidget(instance->widget);
248 void xaw_popup_menu(Widget widget, XEvent * event)
250 /* An Athena menubar has not been implemented. */
254 void xaw_pop_instance(widget_instance * instance, Boolean up)
256 Widget widget = instance->widget;
259 #ifdef LWLIB_DIALOGS_ATHENA
260 if (XtIsSubclass(widget, dialogWidgetClass)) {
261 /* For dialogs, we need to call XtPopup on the parent instead
262 of calling XtManageChild on the widget.
263 Also we need to hack the shell's WM_PROTOCOLS to get it to
264 understand what the close box is supposed to do!!
266 Display *dpy = XtDisplay(widget);
267 Widget shell = XtParent(widget);
271 XInternAtom(dpy, "WM_DELETE_WINDOW", False);
272 XChangeProperty(dpy, XtWindow(shell),
273 XInternAtom(dpy, "WM_PROTOCOLS", False),
274 XA_ATOM, 32, PropModeAppend,
275 (unsigned char *)props, i);
277 /* Center the widget in its parent. Why isn't this kind of crap
278 done automatically? I thought toolkits were supposed to make
282 unsigned int x, y, w, h;
283 Widget topmost = instance->parent;
284 w = shell->core.width;
285 h = shell->core.height;
286 while (topmost->core.parent &&
287 XtIsRealized(topmost->core.parent) &&
288 /* HAVE_SESSION adds an unmapped parent widget that
289 we should ignore here. */
290 topmost->core.parent->core.
292 topmost = topmost->core.parent;
293 if (topmost->core.width < w)
296 x = topmost->core.x +
297 ((topmost->core.width - w) / 2);
298 if (topmost->core.height < h)
301 y = topmost->core.y +
302 ((topmost->core.height - h) / 2);
303 XtMoveWidget(shell, x, y);
306 /* Finally, pop it up. */
307 XtPopup(shell, XtGrabNonexclusive);
309 #endif /* LWLIB_DIALOGS_ATHENA */
310 XtManageChild(widget);
312 #ifdef LWLIB_DIALOGS_ATHENA
313 if (XtIsSubclass(widget, dialogWidgetClass))
314 XtUnmanageChild(XtParent(widget));
317 XtUnmanageChild(widget);
321 #ifdef LWLIB_DIALOGS_ATHENA
324 static char overrideTrans[] = "<Message>WM_PROTOCOLS: lwlib_delete_dialog()";
325 static XtActionProc wm_delete_window(Widget shell, XtPointer closure,
326 XtPointer call_data);
327 static XtActionsRec xaw_actions[] = {
328 {"lwlib_delete_dialog", (XtActionProc) wm_delete_window}
330 static Boolean actions_initted = False;
333 make_dialog(const char *name, Widget parent, Boolean pop_up_p,
334 const char *shell_title, const char *icon_name,
335 Boolean text_input_slot,
336 Boolean radio_box, Boolean list,
337 int left_buttons, int right_buttons)
342 char button_name[255];
346 XtTranslations override;
349 abort(); /* not implemented */
351 abort(); /* not implemented */
353 abort(); /* not implemented */
355 abort(); /* not implemented */
357 if (!actions_initted) {
358 XtAppContext app = XtWidgetToApplicationContext(parent);
359 XtAppAddActions(app, xaw_actions,
360 sizeof(xaw_actions) / sizeof(xaw_actions[0]));
361 actions_initted = True;
364 override = XtParseTranslationTable(overrideTrans);
367 XtSetArg(av[ac], XtNtitle, shell_title);
369 XtSetArg(av[ac], XtNallowShellResize, True);
371 XtSetArg(av[ac], XtNtransientFor, parent);
373 shell = XtCreatePopupShell("dialog", transientShellWidgetClass,
375 XtOverrideTranslations(shell, override);
378 dialog = XtCreateManagedWidget(name, dialogWidgetClass, shell, av, ac);
382 for (i = 0; i < left_buttons; i++) {
384 XtSetArg(av[ac], XtNfromHoriz, button);
386 XtSetArg(av[ac], XtNleft, XtChainLeft);
388 XtSetArg(av[ac], XtNright, XtChainLeft);
390 XtSetArg(av[ac], XtNtop, XtChainBottom);
392 XtSetArg(av[ac], XtNbottom, XtChainBottom);
394 XtSetArg(av[ac], XtNresizable, True);
396 sprintf(button_name, "button%d", ++bc);
397 button = XtCreateManagedWidget(button_name, commandWidgetClass,
401 /* Create a separator
403 I want the separator to take up the slack between the buttons on
404 the right and the buttons on the left (that is I want the buttons
405 after the separator to be packed against the right edge of the
406 window) but I can't seem to make it do it.
409 XtSetArg(av[ac], XtNfromHoriz, button);
411 /* XtSetArg (av [ac], XtNfromVert, XtNameToWidget (dialog, "label")); ac++; */
412 XtSetArg(av[ac], XtNleft, XtChainLeft);
414 XtSetArg(av[ac], XtNright, XtChainRight);
416 XtSetArg(av[ac], XtNtop, XtChainBottom);
418 XtSetArg(av[ac], XtNbottom, XtChainBottom);
420 XtSetArg(av[ac], XtNlabel, "");
422 XtSetArg(av[ac], XtNwidth, 30);
423 ac++; /* #### aaack!! */
424 XtSetArg(av[ac], XtNborderWidth, 0);
426 XtSetArg(av[ac], XtNshapeStyle, XmuShapeRectangle);
428 XtSetArg(av[ac], XtNresizable, False);
430 XtSetArg(av[ac], XtNsensitive, False);
432 button = XtCreateManagedWidget("separator",
433 /* labelWidgetClass, */
434 /* This has to be Command to fake out
435 the Dialog widget... */
439 for (i = 0; i < right_buttons; i++) {
441 XtSetArg(av[ac], XtNfromHoriz, button);
443 XtSetArg(av[ac], XtNleft, XtChainRight);
445 XtSetArg(av[ac], XtNright, XtChainRight);
447 XtSetArg(av[ac], XtNtop, XtChainBottom);
449 XtSetArg(av[ac], XtNbottom, XtChainBottom);
451 XtSetArg(av[ac], XtNresizable, True);
453 sprintf(button_name, "button%d", ++bc);
454 button = XtCreateManagedWidget(button_name, commandWidgetClass,
461 Widget xaw_create_dialog(widget_instance * instance)
463 char *name = instance->info->type;
464 Widget parent = instance->parent;
466 Boolean pop_up_p = instance->pop_up_p;
467 const char *shell_name = 0;
468 const char *icon_name = 0;
469 Boolean text_input_slot = False;
470 Boolean radio_box = False;
471 Boolean list = False;
473 int left_buttons = 0;
474 int right_buttons = 1;
479 icon_name = "dbox-error";
480 shell_name = "Error";
485 icon_name = "dbox-info";
486 shell_name = "Information";
492 icon_name = "dbox-question";
493 shell_name = "Prompt";
498 text_input_slot = True;
499 icon_name = "dbox-question";
500 shell_name = "Prompt";
505 icon_name = "dbox-question";
506 shell_name = "Question";
512 total_buttons = name[1] - '0';
514 if (name[3] == 'T' || name[3] == 't') {
515 text_input_slot = False;
518 right_buttons = name[4] - '0';
520 left_buttons = total_buttons - right_buttons;
522 widget = make_dialog(name, parent, pop_up_p,
523 shell_name, icon_name, text_input_slot, radio_box,
524 list, left_buttons, right_buttons);
528 #endif /* LWLIB_DIALOGS_ATHENA */
531 xaw_generic_callback(Widget widget, XtPointer closure, XtPointer call_data)
533 widget_instance *instance = (widget_instance *) closure;
534 Widget instance_widget;
537 #ifdef LWLIB_WIDGETS_ATHENA
538 /* We want the selected status to change only when we decide it
539 should change. Yuck but correct. */
540 if (XtIsSubclass(widget, toggleWidgetClass)) {
544 XtSetArg(al[0], XtNstate, &check);
545 XtGetValues(widget, al, 1);
547 XtSetArg(al[0], XtNstate, !check);
548 XtSetValues(widget, al, 1);
550 #endif /* LWLIB_WIDGETS_ATHENA */
551 lw_internal_update_other_instances(widget, closure, call_data);
555 if (widget->core.being_destroyed)
558 instance_widget = instance->widget;
559 if (!instance_widget)
562 id = instance->info->id;
568 XtSetArg(al[0], XtNuserData, &user_data);
569 XtGetValues(widget, al, 1);
572 /* Damn! Athena doesn't give us a way to hang our own data on the
573 buttons, so we have to go find it... I guess this assumes that
574 all instances of a button have the same call data.
576 ... Which is a totally bogus assumption --andyp */
578 widget_value *val = instance->info->val;
579 /* If the widget is a buffer/gutter widget then we already have
580 the one we are looking for, so don't try and descend the widget
583 char *name = XtName(widget);
586 if (val->name && !strcmp(val->name, name))
593 user_data = val->call_data;
597 if (instance->info->selection_cb)
598 instance->info->selection_cb(widget, id, user_data);
601 #ifdef LWLIB_DIALOGS_ATHENA
604 wm_delete_window(Widget shell, XtPointer closure, XtPointer call_data)
610 if (!XtIsSubclass(shell, shellWidgetClass))
612 XtSetArg(al[0], XtNchildren, &kids);
613 XtGetValues(shell, al, 1);
617 if (!XtIsSubclass(widget, dialogWidgetClass))
619 id = lw_get_widget_id(widget);
624 widget_info *info = lw_get_widget_info(id);
627 if (info->selection_cb)
628 info->selection_cb(widget, id, (XtPointer) - 1);
631 lw_destroy_all_widgets(id);
635 #endif /* LWLIB_DIALOGS_ATHENA */
639 #ifdef LWLIB_SCROLLBARS_ATHENA
641 xaw_scrollbar_scroll(Widget widget, XtPointer closure, XtPointer call_data)
643 widget_instance *instance = (widget_instance *) closure;
645 scroll_event event_data;
647 if (!instance || widget->core.being_destroyed)
650 id = instance->info->id;
651 event_data.slider_value = (int)call_data;
654 if ((int)call_data > 0)
655 /* event_data.action = SCROLLBAR_PAGE_DOWN; */
656 event_data.action = SCROLLBAR_LINE_DOWN;
658 /* event_data.action = SCROLLBAR_PAGE_UP; */
659 event_data.action = SCROLLBAR_LINE_UP;
661 if (instance->info->pre_activate_cb)
662 instance->info->pre_activate_cb(widget, id,
663 (XtPointer) & event_data);
667 xaw_scrollbar_jump(Widget widget, XtPointer closure, XtPointer call_data)
669 widget_instance *instance = (widget_instance *) closure;
671 scroll_event event_data;
672 scrollbar_values *val =
673 (scrollbar_values *) instance->info->val->scrollbar_data;
676 if (!instance || widget->core.being_destroyed)
679 id = instance->info->id;
681 percent = *(float *)call_data;
682 event_data.slider_value =
683 (int)(percent * (float)(val->maximum - val->minimum)) +
687 event_data.action = SCROLLBAR_DRAG;
689 if (instance->info->pre_activate_cb)
690 instance->info->pre_activate_cb(widget, id,
691 (XtPointer) & event_data);
694 static Widget xaw_create_scrollbar(widget_instance * instance, int vertical)
699 static XtCallbackRec jumpCallbacks[2] =
700 { {xaw_scrollbar_jump, NULL}, {NULL, NULL} };
702 static XtCallbackRec scrollCallbacks[2] =
703 { {xaw_scrollbar_scroll, NULL}, {NULL, NULL} };
705 jumpCallbacks[0].closure = scrollCallbacks[0].closure =
706 (XtPointer) instance;
708 /* #### This is tacked onto the with and height and completely
709 screws our geometry management. We should probably make the
710 top-level aware of this so that people could have a border but so
711 few people use the Athena scrollbar now that it really isn't
712 worth the effort, at least not at the moment. */
713 XtSetArg(av[ac], XtNborderWidth, 0);
715 XtSetArg(av[ac], XtNorientation,
716 vertical ? XtorientVertical : XtorientHorizontal);
718 XtSetArg(av[ac], "jumpProc", jumpCallbacks);
720 XtSetArg(av[ac], "scrollProc", scrollCallbacks);
723 return XtCreateWidget(instance->info->name, scrollbarWidgetClass,
724 instance->parent, av, ac);
727 static Widget xaw_create_vertical_scrollbar(widget_instance * instance)
729 return xaw_create_scrollbar(instance, 1);
732 static Widget xaw_create_horizontal_scrollbar(widget_instance * instance)
734 return xaw_create_scrollbar(instance, 0);
736 #endif /* LWLIB_SCROLLBARS_ATHENA */
738 #ifdef LWLIB_WIDGETS_ATHENA
740 static Widget xaw_create_button(widget_instance * instance)
745 widget_value *val = instance->info->val;
747 XtSetArg(al[ac], XtNsensitive, val->enabled);
749 XtSetArg(al[ac], XtNmappedWhenManaged, FALSE);
751 XtSetArg(al[ac], XtNjustify, XtJustifyCenter);
753 /* The highlight doesn't appear to be dynamically set which makes it
754 look ugly. I think this may be a LessTif bug but for now we just
756 XtSetArg(al[ac], XtNhighlightThickness, (Dimension) 0);
759 /* add any args the user supplied for creation time */
760 lw_add_value_args_to_args(val, al, &ac);
763 button = XtCreateManagedWidget(val->name, labelWidgetClass,
764 instance->parent, al, ac);
767 if (val->type == TOGGLE_TYPE || val->type == RADIO_TYPE) {
768 XtSetArg(al[ac], XtNstate, val->selected);
770 button = XtCreateManagedWidget
773 TOGGLE_TYPE ? checkboxWidgetClass :
774 radioWidgetClass, instance->parent, al, ac);
777 XtCreateManagedWidget(val->name, commandWidgetClass,
778 instance->parent, al, ac);
780 XtRemoveAllCallbacks(button, XtNcallback);
781 XtAddCallback(button, XtNcallback, xaw_generic_callback,
782 (XtPointer) instance);
785 XtManageChild(button);
790 static Widget xaw_create_label_field(widget_instance * instance)
792 return xaw_create_label(instance->parent, instance->info->val);
795 Widget xaw_create_label(Widget parent, widget_value * val)
801 XtSetArg(al[ac], XtNsensitive, val->enabled);
803 XtSetArg(al[ac], XtNmappedWhenManaged, FALSE);
805 XtSetArg(al[ac], XtNjustify, XtJustifyCenter);
808 /* add any args the user supplied for creation time */
809 lw_add_value_args_to_args(val, al, &ac);
811 label = XtCreateManagedWidget(val->name, labelWidgetClass,
814 /* Do it again for arguments that have no effect until the widget is realized. */
816 lw_add_value_args_to_args(val, al, &ac);
818 abort(); /* #### need assert macro in lwlib */
819 XtSetValues(label, al, ac);
824 static Widget xaw_create_progress(widget_instance * instance)
829 widget_value *val = instance->info->val;
830 #if 0 /* This looks too awful, although more correct. */
831 if (!val->call_data) {
832 XtSetArg(al[ac], XtNsensitive, False);
835 XtSetArg(al[ac], XtNsensitive, val->enabled);
839 XtSetArg(al[ac], XtNsensitive, True);
843 XtSetArg(al[ac], XtNmappedWhenManaged, FALSE);
845 XtSetArg(al[ac], XtNorientation, XtorientHorizontal);
847 XtSetArg(al[ac], XtNhighlightThickness, (Dimension) 0);
849 XtSetArg(al[ac], XtNntics, (Cardinal) 10);
852 /* add any args the user supplied for creation time */
853 lw_add_value_args_to_args(val, al, &ac);
855 scale = XtCreateManagedWidget(val->name, gaugeWidgetClass,
856 instance->parent, al, ac);
857 /* add the callback */
859 XtAddCallback(scale, XtNgetValue, xaw_generic_callback,
860 (XtPointer) instance);
862 XtManageChild(scale);
867 #if defined(LWLIB_WIDGETS_ATHENA)
868 #define TEXT_BUFFER_SIZE 128
869 static Widget xaw_create_text_field(widget_instance * instance)
874 widget_value *val = instance->info->val;
876 XtSetArg(al[ac], XtNsensitive, val->enabled);
878 XtSetArg(al[ac], XtNmappedWhenManaged, FALSE);
880 XtSetArg(al[ac], XtNhighlightThickness, (Dimension) 0);
882 XtSetArg(al[ac], XtNtype, XawAsciiString);
884 XtSetArg(al[ac], XtNeditType, XawtextEdit);
886 XtSetArg(al[ac], XtNuseStringInPlace, False);
889 XtSetArg(al[ac], XtNlength, TEXT_BUFFER_SIZE);
893 XtSetArg(al[ac], XtNstring, val->value);
897 /* add any args the user supplied for creation time */
898 lw_add_value_args_to_args(val, al, &ac);
900 text = XtCreateManagedWidget(val->name, asciiTextWidgetClass,
901 instance->parent, al, ac);
903 /* add the callback */
905 XtAddCallback(text, XtNgetValue, xaw_generic_callback,
906 (XtPointer) instance);
914 #endif /* LWLIB_WIDGETS_ATHENA */
916 const widget_creation_entry xaw_creation_table[] = {
917 #ifdef LWLIB_SCROLLBARS_ATHENA
918 {"vertical-scrollbar", xaw_create_vertical_scrollbar},
919 {"horizontal-scrollbar", xaw_create_horizontal_scrollbar},
921 #ifdef LWLIB_WIDGETS_ATHENA
922 {"button", xaw_create_button},
923 {"label", xaw_create_label_field},
924 {"text-field", xaw_create_text_field},
925 {"progress", xaw_create_progress},