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 / ascii.d < prev    next >
Encoding:
Text File  |  1991-09-25  |  942 b   |  34 lines

  1. ;;; -*-Scheme-*-
  2.  
  3. (define-widget-type 'asciitext "AsciiText.h")
  4.  
  5. (define-widget-class 'ascii-text 'asciiTextWidgetClass
  6.   '(font Font FontStruct)
  7.   '(foreground Foreground Pixel)
  8.   '(dataCompression DataCompression Boolean)
  9.   '(displayNonprinting Output Boolean)
  10.   '(echo Output Boolean)
  11.   '(editType EditType EditMode)
  12.   '(length Length Int)
  13.   '(pieceSize PieceSize Int)
  14.   '(string String String)
  15.   '(type Type AsciiType))
  16.  
  17. (define bad-resource
  18. "    Primitive_Error (\"cannot get or set sink/source\");")
  19.  
  20. (scheme->c 'ascii-text-textSink   bad-resource)
  21. (scheme->c 'ascii-text-textSource bad-resource)
  22. (c->scheme 'ascii-text-textSink   bad-resource)
  23. (c->scheme 'ascii-text-textSource bad-resource)
  24.  
  25. (define-primitive 'ascii-text-string '(w)
  26. "   Arg a[1];
  27.     char *s;
  28.  
  29.     Check_Widget_Class (w, asciiTextWidgetClass);
  30.     XtSetArg (a[0], XtNstring, &s);
  31.     XtGetValues (WIDGET(w)->widget, a, 1);
  32.     return Make_String (s, strlen (s));")
  33.  
  34.