comparison lwlib/lwlib-Xaw.c @ 4521:383ab474a241

Fix docstring typo.
author Stephen J. Turnbull <stephen@xemacs.org>
date Tue, 28 Oct 2008 10:38:26 +0900
parents 7bc12bb1a2cf
children fc7067b7f407
comparison
equal deleted inserted replaced
4520:279cadceaa13 4521:383ab474a241
86 float widget_shown, widget_topOfThumb; 86 float widget_shown, widget_topOfThumb;
87 float new_shown, new_topOfThumb; 87 float new_shown, new_topOfThumb;
88 Arg al [10]; 88 Arg al [10];
89 89
90 /* First size and position the scrollbar widget. */ 90 /* First size and position the scrollbar widget. */
91 XtSetArg (al [0], XtNx, data->scrollbar_x); 91 Xt_SET_ARG (al [0], XtNx, data->scrollbar_x);
92 XtSetArg (al [1], XtNy, data->scrollbar_y); 92 Xt_SET_ARG (al [1], XtNy, data->scrollbar_y);
93 XtSetArg (al [2], XtNwidth, data->scrollbar_width); 93 Xt_SET_ARG (al [2], XtNwidth, data->scrollbar_width);
94 XtSetArg (al [3], XtNheight, data->scrollbar_height); 94 Xt_SET_ARG (al [3], XtNheight, data->scrollbar_height);
95 XtSetValues (widget, al, 4); 95 XtSetValues (widget, al, 4);
96 96
97 /* Now size the scrollbar's slider. */ 97 /* Now size the scrollbar's slider. */
98 XtSetArg (al [0], XtNtopOfThumb, &widget_topOfThumb); 98 Xt_SET_ARG (al [0], XtNtopOfThumb, &widget_topOfThumb);
99 XtSetArg (al [1], XtNshown, &widget_shown); 99 Xt_SET_ARG (al [1], XtNshown, &widget_shown);
100 XtGetValues (widget, al, 2); 100 XtGetValues (widget, al, 2);
101 101
102 new_shown = (double) data->slider_size / 102 new_shown = (double) data->slider_size /
103 (double) (data->maximum - data->minimum); 103 (double) (data->maximum - data->minimum);
104 104
140 } 140 }
141 #endif 141 #endif
142 #endif 142 #endif
143 #ifdef LWLIB_DIALOGS_ATHENA 143 #ifdef LWLIB_DIALOGS_ATHENA
144 else if (XtIsSubclass (widget, dialogWidgetClass)) 144 else if (XtIsSubclass (widget, dialogWidgetClass))
145 { 145 Xt_SET_VALUE (widget, XtNlabel, val->contents->value);
146 Arg al [1];
147 XtSetArg (al [0], XtNlabel, val->contents->value);
148 XtSetValues (widget, al, 1);
149 }
150 #endif /* LWLIB_DIALOGS_ATHENA */ 146 #endif /* LWLIB_DIALOGS_ATHENA */
151 #ifdef LWLIB_WIDGETS_ATHENA 147 #ifdef LWLIB_WIDGETS_ATHENA
152 else if (XtClass (widget) == labelWidgetClass) 148 else if (XtClass (widget) == labelWidgetClass)
153 { 149 Xt_SET_VALUE (widget, XtNlabel, val->value);
154 Arg al [1];
155 XtSetArg (al [0], XtNlabel, val->value);
156 XtSetValues (widget, al, 1);
157 }
158 #endif /* LWLIB_WIDGETS_ATHENA */ 150 #endif /* LWLIB_WIDGETS_ATHENA */
159 #if defined (LWLIB_DIALOGS_ATHENA) || defined (LWLIB_WIDGETS_ATHENA) 151 #if defined (LWLIB_DIALOGS_ATHENA) || defined (LWLIB_WIDGETS_ATHENA)
160 else if (XtIsSubclass (widget, commandWidgetClass)) 152 else if (XtIsSubclass (widget, commandWidgetClass))
161 { 153 {
162 Dimension bw = 0;
163 Arg al [3]; 154 Arg al [3];
164 XtSetArg (al [0], XtNborderWidth, &bw);
165 XtGetValues (widget, al, 1);
166 155
167 #ifndef LWLIB_DIALOGS_ATHENA3D 156 #ifndef LWLIB_DIALOGS_ATHENA3D
168 if (bw == 0) 157 {
169 /* Don't let buttons end up with 0 borderwidth, that's ugly... 158 Dimension bw = 0;
170 Yeah, all this should really be done through app-defaults files 159 Xt_GET_VALUE (widget, XtNborderWidth, &bw);
171 or fallback resources, but that's a whole different can of worms 160 if (bw == 0)
172 that I don't feel like opening right now. Making Athena widgets 161 /* Don't let buttons end up with 0 borderwidth, that's ugly...
173 not look like shit is just entirely too much work. 162 Yeah, all this should really be done through app-defaults files
174 */ 163 or fallback resources, but that's a whole different can of worms
175 { 164 that I don't feel like opening right now. Making Athena widgets
176 XtSetArg (al [0], XtNborderWidth, 1); 165 not look like shit is just entirely too much work.
177 XtSetValues (widget, al, 1); 166 */
167 Xt_SET_VALUE (widget, XtNborderWidth, 1);
178 } 168 }
179 #endif /* ! LWLIB_DIALOGS_ATHENA3D */ 169 #endif /* ! LWLIB_DIALOGS_ATHENA3D */
180 170
181 lw_remove_accelerator_spec (val->value); 171 lw_remove_accelerator_spec (val->value);
182 XtSetArg (al [0], XtNlabel, val->value); 172 Xt_SET_ARG (al [0], XtNlabel, val->value);
183 XtSetArg (al [1], XtNsensitive, val->enabled); 173 Xt_SET_ARG (al [1], XtNsensitive, val->enabled);
184 /* Force centered button text. See above. */ 174 /* Force centered button text. See above. */
185 XtSetArg (al [2], XtNjustify, XtJustifyCenter); 175 Xt_SET_ARG (al [2], XtNjustify, XtJustifyCenter);
186 XtSetValues (widget, al, 3); 176 XtSetValues (widget, al, 3);
187 177
188 XtRemoveAllCallbacks (widget, XtNcallback); 178 XtRemoveAllCallbacks (widget, XtNcallback);
189 XtAddCallback (widget, XtNcallback, xaw_generic_callback, instance); 179 XtAddCallback (widget, XtNcallback, xaw_generic_callback, instance);
190 #ifdef LWLIB_WIDGETS_ATHENA 180 #ifdef LWLIB_WIDGETS_ATHENA
191 /* set the selected state */ 181 /* set the selected state */
192 if (XtIsSubclass (widget, toggleWidgetClass)) 182 if (XtIsSubclass (widget, toggleWidgetClass))
193 { 183 Xt_SET_VALUE (widget, XtNstate, val->selected);
194 XtSetArg (al [0], XtNstate, val->selected);
195 XtSetValues (widget, al, 1);
196 }
197 #endif /* LWLIB_WIDGETS_ATHENA */ 184 #endif /* LWLIB_WIDGETS_ATHENA */
198 } 185 }
199 #endif /* LWLIB_DIALOGS_ATHENA */ 186 #endif /* LWLIB_DIALOGS_ATHENA */
200 /* Lastly update our global arg values. */ 187 /* Lastly update our global arg values. */
201 if (val->args && val->args->nargs) 188 if (val->args && val->args->nargs)
217 break; 204 break;
218 } 205 }
219 206
220 if (XtIsSubclass (widget, toggleWidgetClass)) 207 if (XtIsSubclass (widget, toggleWidgetClass))
221 { 208 {
222 Arg al [1]; 209 Xt_GET_VALUE (widget, XtNstate, &val->selected);
223 XtSetArg (al [0], XtNstate, &val->selected);
224 XtGetValues (widget, al, 1);
225 val->edited = True; 210 val->edited = True;
226 } 211 }
227 #ifndef NEED_MOTIF 212 #ifndef NEED_MOTIF
228 else if (XtIsSubclass (widget, asciiTextWidgetClass)) 213 else if (XtIsSubclass (widget, asciiTextWidgetClass))
229 { 214 {
230 Arg al [2];
231 String buf = 0; 215 String buf = 0;
232 XtSetArg (al [0], XtNstring, &buf); 216
233 XtGetValues (widget, al, 1); 217 Xt_GET_VALUE (widget, XtNstring, &buf);
234
235 if (val->value) 218 if (val->value)
236 { 219 {
237 free (val->value); 220 free (val->value);
238 val->value = 0; 221 val->value = 0;
239 } 222 }
337 static char overrideTrans[] = 320 static char overrideTrans[] =
338 "<Message>WM_PROTOCOLS: lwlib_delete_dialog()"; 321 "<Message>WM_PROTOCOLS: lwlib_delete_dialog()";
339 static XtActionProc wm_delete_window (Widget shell, XtPointer closure, 322 static XtActionProc wm_delete_window (Widget shell, XtPointer closure,
340 XtPointer call_data); 323 XtPointer call_data);
341 static XtActionsRec xaw_actions [] = { 324 static XtActionsRec xaw_actions [] = {
342 {"lwlib_delete_dialog", (XtActionProc) wm_delete_window} 325 { (String) "lwlib_delete_dialog", (XtActionProc) wm_delete_window}
343 }; 326 };
344 static Boolean actions_initted = False; 327 static Boolean actions_initted = False;
345 328
346 static Widget 329 static Widget
347 make_dialog (const char* name, Widget parent, Boolean pop_up_p, 330 make_dialog (const char* name, Widget parent, Boolean pop_up_p,
373 } 356 }
374 357
375 override = XtParseTranslationTable (overrideTrans); 358 override = XtParseTranslationTable (overrideTrans);
376 359
377 ac = 0; 360 ac = 0;
378 XtSetArg (av[ac], XtNtitle, shell_title); ac++; 361 Xt_SET_ARG (av[ac], XtNtitle, shell_title); ac++;
379 XtSetArg (av[ac], XtNallowShellResize, True); ac++; 362 Xt_SET_ARG (av[ac], XtNallowShellResize, True); ac++;
380 XtSetArg (av[ac], XtNtransientFor, parent); ac++; 363 Xt_SET_ARG (av[ac], XtNtransientFor, parent); ac++;
381 shell = XtCreatePopupShell ("dialog", transientShellWidgetClass, 364 shell = XtCreatePopupShell ("dialog", transientShellWidgetClass,
382 parent, av, ac); 365 parent, av, ac);
383 XtOverrideTranslations (shell, override); 366 XtOverrideTranslations (shell, override);
384 367
385 ac = 0; 368 ac = 0;
388 bc = 0; 371 bc = 0;
389 button = 0; 372 button = 0;
390 for (i = 0; i < left_buttons; i++) 373 for (i = 0; i < left_buttons; i++)
391 { 374 {
392 ac = 0; 375 ac = 0;
393 XtSetArg (av [ac], XtNfromHoriz, button); ac++; 376 Xt_SET_ARG (av [ac], XtNfromHoriz, button); ac++;
394 XtSetArg (av [ac], XtNleft, XtChainLeft); ac++; 377 Xt_SET_ARG (av [ac], XtNleft, XtChainLeft); ac++;
395 XtSetArg (av [ac], XtNright, XtChainLeft); ac++; 378 Xt_SET_ARG (av [ac], XtNright, XtChainLeft); ac++;
396 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++; 379 Xt_SET_ARG (av [ac], XtNtop, XtChainBottom); ac++;
397 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++; 380 Xt_SET_ARG (av [ac], XtNbottom, XtChainBottom); ac++;
398 XtSetArg (av [ac], XtNresizable, True); ac++; 381 Xt_SET_ARG (av [ac], XtNresizable, True); ac++;
399 sprintf (button_name, "button%d", ++bc); 382 sprintf (button_name, "button%d", ++bc);
400 button = XtCreateManagedWidget (button_name, commandWidgetClass, 383 button = XtCreateManagedWidget (button_name, commandWidgetClass,
401 dialog, av, ac); 384 dialog, av, ac);
402 } 385 }
403 if (right_buttons) 386 if (right_buttons)
408 the right and the buttons on the left (that is I want the buttons 391 the right and the buttons on the left (that is I want the buttons
409 after the separator to be packed against the right edge of the 392 after the separator to be packed against the right edge of the
410 window) but I can't seem to make it do it. 393 window) but I can't seem to make it do it.
411 */ 394 */
412 ac = 0; 395 ac = 0;
413 XtSetArg (av [ac], XtNfromHoriz, button); ac++; 396 Xt_SET_ARG (av [ac], XtNfromHoriz, button); ac++;
414 /* XtSetArg (av [ac], XtNfromVert, XtNameToWidget (dialog, "label")); ac++; */ 397 /* Xt_SET_ARG (av [ac], XtNfromVert, XtNameToWidget (dialog, "label")); ac++; */
415 XtSetArg (av [ac], XtNleft, XtChainLeft); ac++; 398 Xt_SET_ARG (av [ac], XtNleft, XtChainLeft); ac++;
416 XtSetArg (av [ac], XtNright, XtChainRight); ac++; 399 Xt_SET_ARG (av [ac], XtNright, XtChainRight); ac++;
417 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++; 400 Xt_SET_ARG (av [ac], XtNtop, XtChainBottom); ac++;
418 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++; 401 Xt_SET_ARG (av [ac], XtNbottom, XtChainBottom); ac++;
419 XtSetArg (av [ac], XtNlabel, ""); ac++; 402 Xt_SET_ARG (av [ac], XtNlabel, ""); ac++;
420 XtSetArg (av [ac], XtNwidth, 30); ac++; /* #### aaack!! */ 403 Xt_SET_ARG (av [ac], XtNwidth, 30); /* #### aaack!! */ ac++;
421 XtSetArg (av [ac], XtNborderWidth, 0); ac++; 404 Xt_SET_ARG (av [ac], XtNborderWidth, 0); ac++;
422 XtSetArg (av [ac], XtNshapeStyle, XmuShapeRectangle); ac++; 405 Xt_SET_ARG (av [ac], XtNshapeStyle, XmuShapeRectangle); ac++;
423 XtSetArg (av [ac], XtNresizable, False); ac++; 406 Xt_SET_ARG (av [ac], XtNresizable, False); ac++;
424 XtSetArg (av [ac], XtNsensitive, False); ac++; 407 Xt_SET_ARG (av [ac], XtNsensitive, False); ac++;
425 button = XtCreateManagedWidget ("separator", 408 button = XtCreateManagedWidget ("separator",
426 /* labelWidgetClass, */ 409 /* labelWidgetClass, */
427 /* This has to be Command to fake out 410 /* This has to be Command to fake out
428 the Dialog widget... */ 411 the Dialog widget... */
429 commandWidgetClass, 412 commandWidgetClass,
430 dialog, av, ac); 413 dialog, av, ac);
431 } 414 }
432 for (i = 0; i < right_buttons; i++) 415 for (i = 0; i < right_buttons; i++)
433 { 416 {
434 ac = 0; 417 ac = 0;
435 XtSetArg (av [ac], XtNfromHoriz, button); ac++; 418 Xt_SET_ARG (av [ac], XtNfromHoriz, button); ac++;
436 XtSetArg (av [ac], XtNleft, XtChainRight); ac++; 419 Xt_SET_ARG (av [ac], XtNleft, XtChainRight); ac++;
437 XtSetArg (av [ac], XtNright, XtChainRight); ac++; 420 Xt_SET_ARG (av [ac], XtNright, XtChainRight); ac++;
438 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++; 421 Xt_SET_ARG (av [ac], XtNtop, XtChainBottom); ac++;
439 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++; 422 Xt_SET_ARG (av [ac], XtNbottom, XtChainBottom); ac++;
440 XtSetArg (av [ac], XtNresizable, True); ac++; 423 Xt_SET_ARG (av [ac], XtNresizable, True); ac++;
441 sprintf (button_name, "button%d", ++bc); 424 sprintf (button_name, "button%d", ++bc);
442 button = XtCreateManagedWidget (button_name, commandWidgetClass, 425 button = XtCreateManagedWidget (button_name, commandWidgetClass,
443 dialog, av, ac); 426 dialog, av, ac);
444 } 427 }
445 428
523 /* We want the selected status to change only when we decide it 506 /* We want the selected status to change only when we decide it
524 should change. Yuck but correct. */ 507 should change. Yuck but correct. */
525 if (XtIsSubclass (widget, toggleWidgetClass)) 508 if (XtIsSubclass (widget, toggleWidgetClass))
526 { 509 {
527 Boolean check; 510 Boolean check;
528 Arg al [1]; 511
529 512 Xt_GET_VALUE (widget, XtNstate, &check);
530 XtSetArg (al [0], XtNstate, &check); 513
531 XtGetValues (widget, al, 1); 514 Xt_SET_VALUE (widget, XtNstate, !check);
532
533 XtSetArg (al [0], XtNstate, !check);
534 XtSetValues (widget, al, 1);
535 } 515 }
536 #endif /* LWLIB_WIDGETS_ATHENA */ 516 #endif /* LWLIB_WIDGETS_ATHENA */
537 lw_internal_update_other_instances (widget, closure, call_data); 517 lw_internal_update_other_instances (widget, closure, call_data);
538 518
539 if (! instance) 519 if (! instance)
547 527
548 id = instance->info->id; 528 id = instance->info->id;
549 529
550 #if 0 530 #if 0
551 user_data = NULL; 531 user_data = NULL;
552 { 532 Xt_GET_VALUE (widget, XtNuserData, &user_data);
553 Arg al [1];
554 XtSetArg (al [0], XtNuserData, &user_data);
555 XtGetValues (widget, al, 1);
556 }
557 #else 533 #else
558 /* Damn! Athena doesn't give us a way to hang our own data on the 534 /* Damn! Athena doesn't give us a way to hang our own data on the
559 buttons, so we have to go find it... I guess this assumes that 535 buttons, so we have to go find it... I guess this assumes that
560 all instances of a button have the same call data. 536 all instances of a button have the same call data.
561 537
592 XtPointer UNUSED (call_data)) 568 XtPointer UNUSED (call_data))
593 { 569 {
594 LWLIB_ID id; 570 LWLIB_ID id;
595 Widget *kids = 0; 571 Widget *kids = 0;
596 Widget widget; 572 Widget widget;
597 Arg al [1]; 573
598 if (! XtIsSubclass (shell, shellWidgetClass)) 574 if (! XtIsSubclass (shell, shellWidgetClass))
599 abort (); 575 abort ();
600 XtSetArg (al [0], XtNchildren, &kids); 576 Xt_GET_VALUE (shell, XtNchildren, &kids);
601 XtGetValues (shell, al, 1);
602 if (!kids || !*kids) abort (); 577 if (!kids || !*kids) abort ();
603 578
604 for (widget = *kids; 579 for (widget = *kids;
605 widget && ! XtIsSubclass (widget, dialogWidgetClass); 580 widget && ! XtIsSubclass (widget, dialogWidgetClass);
606 widget = *++kids) 581 widget = *++kids)
695 /* #### This is tacked onto the with and height and completely 670 /* #### This is tacked onto the with and height and completely
696 screws our geometry management. We should probably make the 671 screws our geometry management. We should probably make the
697 top-level aware of this so that people could have a border but so 672 top-level aware of this so that people could have a border but so
698 few people use the Athena scrollbar now that it really isn't 673 few people use the Athena scrollbar now that it really isn't
699 worth the effort, at least not at the moment. */ 674 worth the effort, at least not at the moment. */
700 XtSetArg (av [ac], XtNborderWidth, 0); ac++; 675 Xt_SET_ARG (av [ac], XtNborderWidth, 0); ac++;
701 XtSetArg (av [ac], XtNorientation, 676 Xt_SET_ARG (av [ac], XtNorientation,
702 vertical ? XtorientVertical : XtorientHorizontal); ac++; 677 vertical ? XtorientVertical : XtorientHorizontal); ac++;
703 XtSetArg (av [ac], "jumpProc", jumpCallbacks); ac++; 678 Xt_SET_ARG (av [ac], "jumpProc", jumpCallbacks); ac++;
704 XtSetArg (av [ac], "scrollProc", scrollCallbacks); ac++; 679 Xt_SET_ARG (av [ac], "scrollProc", scrollCallbacks); ac++;
705 680
706 return XtCreateWidget (instance->info->name, scrollbarWidgetClass, 681 return XtCreateWidget (instance->info->name, scrollbarWidgetClass,
707 instance->parent, av, ac); 682 instance->parent, av, ac);
708 } 683 }
709 684
728 Arg al[20]; 703 Arg al[20];
729 int ac = 0; 704 int ac = 0;
730 Widget button = 0; 705 Widget button = 0;
731 widget_value* val = instance->info->val; 706 widget_value* val = instance->info->val;
732 707
733 XtSetArg (al [ac], XtNsensitive, val->enabled); ac++; 708 Xt_SET_ARG (al [ac], XtNsensitive, val->enabled); ac++;
734 XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; 709 Xt_SET_ARG (al [ac], XtNmappedWhenManaged, FALSE); ac++;
735 XtSetArg (al [ac], XtNjustify, XtJustifyCenter); ac++; 710 Xt_SET_ARG (al [ac], XtNjustify, XtJustifyCenter); ac++;
736 /* The highlight doesn't appear to be dynamically set which makes it 711 /* The highlight doesn't appear to be dynamically set which makes it
737 look ugly. I think this may be a LessTif bug but for now we just 712 look ugly. I think this may be a LessTif bug but for now we just
738 get rid of it. */ 713 get rid of it. */
739 XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0);ac++; 714 Xt_SET_ARG (al [ac], XtNhighlightThickness, (Dimension)0); ac++;
740 715
741 /* add any args the user supplied for creation time */ 716 /* add any args the user supplied for creation time */
742 lw_add_value_args_to_args (val, al, &ac); 717 lw_add_value_args_to_args (val, al, &ac);
743 718
744 if (!val->call_data) 719 if (!val->call_data)
747 722
748 else 723 else
749 { 724 {
750 if (val->type == TOGGLE_TYPE || val->type == RADIO_TYPE) 725 if (val->type == TOGGLE_TYPE || val->type == RADIO_TYPE)
751 { 726 {
752 XtSetArg (al [ac], XtNstate, val->selected); ac++; 727 Xt_SET_ARG (al [ac], XtNstate, val->selected); ac++;
753 button = XtCreateWidget 728 button = XtCreateWidget
754 (val->name, 729 (val->name,
755 val->type == TOGGLE_TYPE ? checkboxWidgetClass : radioWidgetClass, 730 val->type == TOGGLE_TYPE ? checkboxWidgetClass : radioWidgetClass,
756 instance->parent, al, ac); 731 instance->parent, al, ac);
757 } 732 }
781 { 756 {
782 Arg al[20]; 757 Arg al[20];
783 int ac = 0; 758 int ac = 0;
784 Widget label = 0; 759 Widget label = 0;
785 760
786 XtSetArg (al [ac], XtNsensitive, val->enabled); ac++; 761 Xt_SET_ARG (al [ac], XtNsensitive, val->enabled); ac++;
787 XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; 762 Xt_SET_ARG (al [ac], XtNmappedWhenManaged, FALSE); ac++;
788 XtSetArg (al [ac], XtNjustify, XtJustifyCenter); ac++; 763 Xt_SET_ARG (al [ac], XtNjustify, XtJustifyCenter); ac++;
789 764
790 /* add any args the user supplied for creation time */ 765 /* add any args the user supplied for creation time */
791 lw_add_value_args_to_args (val, al, &ac); 766 lw_add_value_args_to_args (val, al, &ac);
792 767
793 label = XtCreateManagedWidget (val->name, labelWidgetClass, 768 label = XtCreateManagedWidget (val->name, labelWidgetClass,
866 Widget scale = 0; 841 Widget scale = 0;
867 widget_value* val = instance->info->val; 842 widget_value* val = instance->info->val;
868 #if 0 /* This looks too awful, although more correct. */ 843 #if 0 /* This looks too awful, although more correct. */
869 if (!val->call_data) 844 if (!val->call_data)
870 { 845 {
871 XtSetArg (al [ac], XtNsensitive, False); ac++; 846 Xt_SET_ARG (al [ac], XtNsensitive, False); ac++;
872 } 847 }
873 else 848 else
874 { 849 {
875 XtSetArg (al [ac], XtNsensitive, val->enabled); ac++; 850 Xt_SET_ARG (al [ac], XtNsensitive, val->enabled); ac++;
876 } 851 }
877 #else 852 #else
878 XtSetArg (al [ac], XtNsensitive, True); ac++; 853 Xt_SET_ARG (al [ac], XtNsensitive, True); ac++;
879 #endif 854 #endif
880 855
881 XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; 856 Xt_SET_ARG (al [ac], XtNmappedWhenManaged, FALSE); ac++;
882 XtSetArg (al [ac], XtNorientation, XtorientHorizontal); ac++; 857 Xt_SET_ARG (al [ac], XtNorientation, XtorientHorizontal); ac++;
883 XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0);ac++; 858 Xt_SET_ARG (al [ac], XtNhighlightThickness, (Dimension)0); ac++;
884 XtSetArg (al [ac], XtNntics, (Cardinal)10);ac++; 859 Xt_SET_ARG (al [ac], XtNntics, (Cardinal)10); ac++;
885 860
886 /* add any args the user supplied for creation time */ 861 /* add any args the user supplied for creation time */
887 lw_add_value_args_to_args (val, al, &ac); 862 lw_add_value_args_to_args (val, al, &ac);
888 863
889 if (debug_gauge > 1) 864 if (debug_gauge > 1)
913 Arg al[20]; 888 Arg al[20];
914 int ac = 0; 889 int ac = 0;
915 Widget text = 0; 890 Widget text = 0;
916 widget_value* val = instance->info->val; 891 widget_value* val = instance->info->val;
917 892
918 XtSetArg (al [ac], XtNsensitive, val->enabled); ac++; 893 Xt_SET_ARG (al [ac], XtNsensitive, val->enabled); ac++;
919 XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++; 894 Xt_SET_ARG (al [ac], XtNmappedWhenManaged, FALSE); ac++;
920 XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0); ac++; 895 Xt_SET_ARG (al [ac], XtNhighlightThickness, (Dimension)0); ac++;
921 XtSetArg (al [ac], XtNtype, XawAsciiString); ac++; 896 Xt_SET_ARG (al [ac], XtNtype, XawAsciiString); ac++;
922 XtSetArg (al [ac], XtNeditType, XawtextEdit); ac++; 897 Xt_SET_ARG (al [ac], XtNeditType, XawtextEdit); ac++;
923 XtSetArg (al [ac], XtNuseStringInPlace, False); ac++; 898 Xt_SET_ARG (al [ac], XtNuseStringInPlace, False); ac++;
924 #if 0 899 #if 0
925 XtSetArg (al [ac], XtNlength, TEXT_BUFFER_SIZE); ac++; 900 Xt_SET_ARG (al [ac], XtNlength, TEXT_BUFFER_SIZE); ac++;
926 #endif 901 #endif
927 if (val->value) 902 if (val->value)
928 { 903 {
929 XtSetArg (al [ac], XtNstring, val->value); ac++; 904 Xt_SET_ARG (al [ac], XtNstring, val->value); ac++;
930 } 905 }
931 906
932 /* add any args the user supplied for creation time */ 907 /* add any args the user supplied for creation time */
933 lw_add_value_args_to_args (val, al, &ac); 908 lw_add_value_args_to_args (val, al, &ac);
934 909
954 {"vertical-scrollbar", xaw_create_vertical_scrollbar }, 929 {"vertical-scrollbar", xaw_create_vertical_scrollbar },
955 {"horizontal-scrollbar", xaw_create_horizontal_scrollbar }, 930 {"horizontal-scrollbar", xaw_create_horizontal_scrollbar },
956 #endif 931 #endif
957 #ifdef LWLIB_WIDGETS_ATHENA 932 #ifdef LWLIB_WIDGETS_ATHENA
958 {"button", xaw_create_button }, 933 {"button", xaw_create_button },
959 { "label", xaw_create_label_field }, 934 {"label", xaw_create_label_field },
960 {"text-field", xaw_create_text_field }, 935 {"text-field", xaw_create_text_field },
961 {"progress", xaw_create_progress }, 936 {"progress", xaw_create_progress },
962 #endif 937 #endif
963 {NULL, NULL} 938 {NULL, NULL}
964 }; 939 };
965 940