home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / lib / xaw / toggle.d < prev    next >
Encoding:
Text File  |  1991-09-25  |  1.0 KB  |  34 lines

  1. ;;; -*-Scheme-*-
  2.  
  3. (define-widget-type 'toggle "Toggle.h")
  4.  
  5. (define-widget-class 'toggle 'toggleWidgetClass)
  6.  
  7. (define-callback 'toggle 'callback #f)
  8.  
  9. (scheme->c 'toggle-radioData
  10. "   return (XtArgVal)Get_Integer (x);")
  11.  
  12. (c->scheme 'toggle-radioData
  13. "   return Make_Integer ((int)x);")
  14.  
  15. (define-primitive 'toggle-change-radio-group! '(w1 w2)
  16. "   Check_Widget_Class (w1, toggleWidgetClass);
  17.     Check_Widget_Class (w2, toggleWidgetClass);
  18.     XawToggleChangeRadioGroup (WIDGET(w1)->widget, WIDGET(w2)->widget);
  19.     return Void;")
  20.  
  21. (define-primitive 'toggle-get-current '(w)
  22. "   Check_Widget_Class (w, toggleWidgetClass);
  23.     return Make_Integer ((int)XawToggleGetCurrent (WIDGET(w)->widget));")
  24.  
  25. (define-primitive 'toggle-set-current! '(w x)
  26. "   Check_Widget_Class (w, toggleWidgetClass);
  27.     XawToggleSetCurrent (WIDGET(w)->widget, (caddr_t)Get_Integer (x));
  28.     return Void;")
  29.  
  30. (define-primitive 'toggle-unset-current! '(w)
  31. "   Check_Widget_Class (w, toggleWidgetClass);
  32.     XawToggleUnsetCurrent (WIDGET(w)->widget);
  33.     return Void;")
  34.