argv@island.uu.net (Dan Heller) (04/26/89)
Submitted-by: Gene Dykes <gdykes@tcgould.tn.cornell.edu> Posting-number: Volume 3, Issue 83 Archive-name: xcu/part07 #! /bin/sh # This is a shell archive. Remove anything before this line, then feed it # into a shell via "sh file" or similar. To overwrite existing files, # type "sh file -c". # The tool that generated this appeared in the comp.sources.unix newsgroup; # send mail to comp-sources-unix@uunet.uu.net if you want that tool. # If this archive is complete, you will see the following message at the end: # "End of archive 7 (of 12)." # Contents: examples/xlayout/bw_manip.wc examples/xlayout/shadow.wl # examples/xwlm/ex.wc man/CuTbl.man src/CuBmgr.c # Wrapped by argv@island on Mon Apr 24 15:41:49 1989 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'examples/xlayout/bw_manip.wc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'examples/xlayout/bw_manip.wc'\" else echo shar: Extracting \"'examples/xlayout/bw_manip.wc'\" \(17357 characters\) sed "s/^X//" >'examples/xlayout/bw_manip.wc' <<'END_OF_FILE' X#WLDL X6 X X5 CuWlm X10 X18 CuLabel.facetWidth 1 (1) 6 Global X19 CuLabel.borderColor 5 (White) 6 Global X14 CuLabel.shadow 4 (True) 6 Global X23 CuButton.internalHeight 1 (5) 6 Global X22 CuButton.internalWidth 2 (10) 6 Global X20 CuButton.borderColor 5 (White) 6 Global X17 CuTbl.borderWidth 1 (0) 6 Global X4 font 4 (9x15) 6 Global X6 shadow 4 (True) 6 Global X4 name 6 (office) 5 Local X0 X0 X2 X X 6 CuBmgr X 2 X 8 bmgrType 9 (OneOfMany) 5 Local X 4 name 10 (plus_minus) 5 Local X 0 X 18 X 11 (yo_negative) 6 String 11 (yo_negative) X 11 (yo_positive) 6 String 11 (yo_positive) X 11 (hi_negative) 6 String 11 (hi_negative) X 11 (hi_positive) 6 String 11 (hi_positive) X 11 (sc_negative) 6 String 11 (sc_negative) X 11 (sc_positive) 6 String 11 (sc_positive) X 11 (zm_negative) 6 String 11 (zm_negative) X 11 (zm_positive) 6 String 11 (zm_positive) X 11 (ry_negative) 6 String 11 (ry_negative) X 11 (ry_positive) 6 String 11 (ry_positive) X 11 (rx_negative) 6 String 11 (rx_negative) X 11 (rx_positive) 6 String 11 (rx_positive) X 11 (tz_negative) 6 String 11 (tz_negative) X 11 (tz_positive) 6 String 11 (tz_positive) X 11 (ty_negative) 6 String 11 (ty_negative) X 11 (ty_positive) 6 String 11 (ty_positive) X 11 (tx_negative) 6 String 11 (tx_negative) X 11 (tx_positive) 6 String 11 (tx_positive) X 0 X X 5 CuTbl X 5 X 14 internalHeight 2 (10) 5 Local X 13 internalWidth 2 (10) 5 Local X 11 interHeight 2 (10) 5 Local X 12 formatString 2 (c.) 5 Local X 4 name 7 (visible) 5 Local X 0 X 0 X 11 X X 5 CuTbl X 1 X 12 formatString 2 (c.) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 9 (Transient) 5 Local X 4 name 4 (quit) 5 Local X 0 X 1 X 4 (QUIT) 6 String 4 (QUIT) X 1 X X 8 CuButton X 1 X 4 name 4 (QUIT) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 1 X 12 formatString 2 (c.) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 9 (Transient) 5 Local X 4 name 7 (texture) 5 Local X 0 X 1 X 7 (TEXTURE) 6 String 7 (TEXTURE) X 1 X X 8 CuButton X 1 X 4 name 7 (TEXTURE) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 1 X 12 formatString 2 (c.) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 9 (Transient) 5 Local X 4 name 5 (reset) 5 Local X 0 X 1 X 5 (RESET) 6 String 5 (RESET) X 1 X X 8 CuButton X 1 X 4 name 5 (RESET) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 6 (c Xc Xc.) 5 Local X 4 name 3 (A11) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 9 (OneOfMany) 5 Local X 4 name 10 (read_write) 5 Local X 0 X 3 X 3 (OFF) 6 String 3 (OFF) X 6 (RECORD) 6 String 6 (RECORD) X 6 (REPLAY) 6 String 6 (REPLAY) X 3 X X 8 CuButton X 2 X 3 set 4 (True) 5 Local X 4 name 3 (OFF) 5 Local X 0 X 0 X 0 X X 8 CuButton X 1 X 4 name 6 (RECORD) 5 Local X 0 X 0 X 0 X X 8 CuButton X 1 X 4 name 6 (REPLAY) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 equalColumns 4 (True) 5 Local X 12 formatString 4 (c c.) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 12 (DoubleToggle) 5 Local X 4 name 10 (dbl_buffer) 5 Local X 0 X 2 X 14 (DBL XBUFFER XOFF) 3 Int 1 (0) X 13 (DBL XBUFFER XON) 3 Int 1 (1) X 2 X X 8 CuButton X 1 X 4 name 14 (DBL XBUFFER XOFF) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 3 set 4 (True) 5 Local X 4 name 13 (DBL XBUFFER XON) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 equalColumns 4 (True) 5 Local X 12 formatString 4 (c c.) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 12 (DoubleToggle) 5 Local X 4 name 2 (up) 5 Local X 0 X 2 X 11 (UP XVARIABLE) 3 Int 1 (0) X 11 (UP XCONSTANT) 3 Int 1 (1) X 2 X X 8 CuButton X 1 X 4 name 11 (UP XVARIABLE) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 3 set 4 (True) 5 Local X 4 name 11 (UP XCONSTANT) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 equalColumns 4 (True) 5 Local X 12 formatString 4 (c c.) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 12 (DoubleToggle) 5 Local X 4 name 5 (cycle) 5 Local X 0 X 2 X 9 (CYCLE OFF) 3 Int 1 (0) X 8 (CYCLE ON) 3 Int 1 (1) X 2 X X 8 CuButton X 1 X 4 name 8 (CYCLE ON) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 3 set 4 (True) 5 Local X 4 name 9 (CYCLE OFF) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 6 (c Xc Xc.) 5 Local X 4 name 5 (hi_yo) 5 Local X 0 X 0 X 3 X X 5 CuTbl X 3 X 12 equalColumns 4 (True) 5 Local X 12 formatString 6 (c c c.) 5 Local X 4 name 3 (A10) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 9 (OneOfMany) 5 Local X 4 name 8 (hy_value) 5 Local X 0 X 6 X 3 (hy8) 5 Float 3 (8.0) X 3 (hy4) 5 Float 3 (4.0) X 3 (hy2) 5 Float 3 (2.0) X 3 (hy1) 5 Float 3 (1.0) X 4 (hy.1) 5 Float 3 (0.1) X 3 (hy0) 5 Float 1 (0) X 6 X X 8 CuButton X 2 X 5 label 1 (8) 5 Local X 4 name 3 (hy8) 5 Local X 0 X 0 X 0 X X 8 CuButton X 3 X 3 set 4 (True) 5 Local X 5 label 1 (4) 5 Local X 4 name 3 (hy4) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (2) 5 Local X 4 name 3 (hy2) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (1) 5 Local X 4 name 3 (hy1) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (.1) 5 Local X 4 name 4 (hy.1) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (RS) 5 Local X 4 name 3 (hy0) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 10 interWidth 1 (2) 5 Local X 12 formatString 4 (c c.) 5 Local X 0 X 0 X 2 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (yo) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (yo_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (yo_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (hi) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (hi_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (hi_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 4 X 10 facetWidth 1 (0) 6 Global X 10 foreground 5 (black) 6 Global X 12 formatString 4 (c c.) 5 Local X 12 equalColumns 4 (True) 5 Local X 0 X 0 X 2 X X 7 CuLabel X 1 X 4 name 3 (YON) 5 Local X 0 X 0 X 0 X X 7 CuLabel X 1 X 4 name 6 (HITHER) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 6 (c Xc Xc.) 5 Local X 4 name 10 (zoom_scene) 5 Local X 0 X 0 X 3 X X 5 CuTbl X 3 X 12 equalColumns 4 (True) 5 Local X 12 formatString 10 (c c Xc c c.) 5 Local X 4 name 2 (A9) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 9 (OneOfMany) 5 Local X 4 name 10 (zoom_value) 5 Local X 0 X 5 X 7 (zoom1.5) 5 Float 3 (1.5) X 7 (zoom1.1) 5 Float 3 (1.1) X 6 (zoom.9) 5 Float 3 (0.9) X 6 (zoom.5) 5 Float 3 (0.5) X 5 (zoom0) 5 Float 1 (0) X 5 X X 8 CuButton X 2 X 5 label 3 (1.5) 5 Local X 4 name 7 (zoom1.5) 5 Local X 0 X 0 X 0 X X 8 CuButton X 3 X 3 set 4 (True) 5 Local X 5 label 3 (1.1) 5 Local X 4 name 7 (zoom1.1) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (.9) 5 Local X 4 name 6 (zoom.9) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (.5) 5 Local X 4 name 6 (zoom.5) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (RS) 5 Local X 4 name 5 (zoom0) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 3 X 10 interWidth 1 (2) 5 Local X 12 formatString 6 (c c c.) 5 Local X 4 name 2 (A8) 5 Local X 0 X 0 X 3 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (sc) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (sc_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (sc_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 4 X 18 layoutWhenUnmapped 4 (True) 5 Local X 17 mappedWhenManaged 5 (False) 5 Local X 12 formatString 5 (c c. X) 5 Local X 4 name 3 (A8a) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 1 ( ) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 1 ( ) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (zm) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (zm_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (zm_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 6 (c c c.) 5 Local X 4 name 2 (A7) 5 Local X 0 X 0 X 3 X X 7 CuLabel X 1 X 4 name 2 (SC) 5 Local X 0 X 0 X 0 X X 7 CuLabel X 1 X 4 name 2 ( ) 5 Local X 0 X 0 X 0 X X 7 CuLabel X 1 X 4 name 2 (ZM) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 6 (c Xc Xc.) 5 Local X 4 name 8 (rotation) 5 Local X 0 X 0 X 3 X X 5 CuTbl X 3 X 12 equalColumns 4 (True) 5 Local X 12 formatString 6 (c c c.) 5 Local X 4 name 2 (A6) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 9 (OneOfMany) 5 Local X 4 name 12 (rotate_value) 5 Local X 0 X 6 X 8 (rotate90) 5 Float 4 (90.0) X 8 (rotate30) 5 Float 4 (30.0) X 8 (rotate10) 5 Float 2 (10) X 7 (rotate5) 5 Float 1 (5) X 7 (rotate2) 5 Float 1 (2) X 7 (rotate1) 5 Float 1 (1) X 6 X X 8 CuButton X 2 X 5 label 2 (90) 5 Local X 4 name 8 (rotate90) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (30) 5 Local X 4 name 8 (rotate30) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (10) 5 Local X 4 name 8 (rotate10) 5 Local X 0 X 0 X 0 X X 8 CuButton X 3 X 3 set 4 (True) 5 Local X 5 label 1 (5) 5 Local X 4 name 7 (rotate5) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (2) 5 Local X 4 name 7 (rotate2) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (1) 5 Local X 4 name 7 (rotate1) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 3 X 10 interWidth 1 (2) 5 Local X 12 formatString 6 (c c c.) 5 Local X 4 name 2 (A5) 5 Local X 0 X 0 X 3 X X 5 CuTbl X 4 X 18 layoutWhenUnmapped 4 (True) 5 Local X 17 mappedWhenManaged 5 (False) 5 Local X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (rz) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (rz_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (rz_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (ry) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (ry_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (ry_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (rx) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (rx_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (rx_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 6 (c c c.) 5 Local X 4 name 2 (A4) 5 Local X 0 X 0 X 3 X X 7 CuLabel X 1 X 4 name 2 ( ) 5 Local X 0 X 0 X 0 X X 7 CuLabel X 1 X 4 name 2 (RY) 5 Local X 0 X 0 X 0 X X 7 CuLabel X 1 X 4 name 2 (RX) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 6 (c Xc Xc.) 5 Local X 4 name 11 (translation) 5 Local X 0 X 0 X 3 X X 5 CuTbl X 3 X 12 equalColumns 4 (True) 5 Local X 12 formatString 6 (c c c.) 5 Local X 4 name 2 (A3) 5 Local X 0 X 0 X 1 X X 6 CuBmgr X 2 X 8 bmgrType 9 (OneOfMany) 5 Local X 4 name 15 (translate_value) 5 Local X 0 X 6 X 11 (translate10) 5 Float 4 (10.0) X 10 (translate4) 5 Float 3 (4.0) X 10 (translate2) 5 Float 3 (2.0) X 10 (translate1) 5 Float 3 (1.0) X 11 (translate.5) 5 Float 3 (0.5) X 11 (translate.1) 5 Float 3 (0.1) X 6 X X 8 CuButton X 2 X 5 label 2 (10) 5 Local X 4 name 11 (translate10) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (4) 5 Local X 4 name 10 (translate4) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (2) 5 Local X 4 name 10 (translate2) 5 Local X 0 X 0 X 0 X X 8 CuButton X 3 X 3 set 4 (True) 5 Local X 5 label 1 (1) 5 Local X 4 name 10 (translate1) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (.5) 5 Local X 4 name 11 (translate.5) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 2 (.1) 5 Local X 4 name 11 (translate.1) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 3 X 10 interWidth 1 (2) 5 Local X 12 formatString 6 (c c c.) 5 Local X 4 name 2 (A2) 5 Local X 0 X 0 X 3 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (tz) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (tz_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (tz_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (ty) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (ty_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 5 label 1 (-) 5 Local X 4 name 11 (ty_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 5 (c c. X) 5 Local X 4 name 2 (tx) 5 Local X 0 X 0 X 2 X X 8 CuButton X 2 X 5 label 1 (+) 5 Local X 4 name 11 (tx_positive) 5 Local X 0 X 0 X 0 X X 8 CuButton X 3 X 3 set 4 (True) 5 Local X 5 label 1 (-) 5 Local X 4 name 11 (tx_negative) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 6 (c c c.) 5 Local X 4 name 2 (A1) 5 Local X 0 X 0 X 3 X X 7 CuLabel X 1 X 4 name 2 (TZ) 5 Local X 0 X 0 X 0 X X 7 CuLabel X 1 X 4 name 2 (TY) 5 Local X 0 X 0 X 0 X X 7 CuLabel X 1 X 4 name 2 (TX) 5 Local X 0 X 0 X 0 END_OF_FILE echo shar: NEWLINE appended to \"'examples/xlayout/bw_manip.wc'\" if test 17358 -ne `wc -c <'examples/xlayout/bw_manip.wc'`; then echo shar: \"'examples/xlayout/bw_manip.wc'\" unpacked with wrong size! fi # end of 'examples/xlayout/bw_manip.wc' fi if test -f 'examples/xlayout/shadow.wl' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'examples/xlayout/shadow.wl'\" else echo shar: Extracting \"'examples/xlayout/shadow.wl'\" \(604 characters\) sed "s/^X//" >'examples/xlayout/shadow.wl' <<'END_OF_FILE' XCuWlm X { X *dimFacetColor "SteelBlue" X *brightFacetColor "LightSteelBlue" X *facetWidth "5" X *CuCommand.background "white" X *CuCommand.foreground "black" X *CuCommand.cursor "dot" X CuRc X { X formatString "2 x 2" /* equivalent to CuTbl "c c." */ X background "LightGray" X internalWidth "20" X internalHeight "20" X interWidth "10" X interHeight "10" X X CuCommand { borderWidth "0" name "INSENSITIVE" sensitive "False" } X CuCommand { name "Sensitive" sensitive "True" } X CuCommand { name "Facets" shadow "False" } X CuCommand { name "Shadow" dimFacetColor "black" shadow "True" } X } X } X END_OF_FILE echo shar: NEWLINE appended to \"'examples/xlayout/shadow.wl'\" if test 605 -ne `wc -c <'examples/xlayout/shadow.wl'`; then echo shar: \"'examples/xlayout/shadow.wl'\" unpacked with wrong size! fi # end of 'examples/xlayout/shadow.wl' fi if test -f 'examples/xwlm/ex.wc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'examples/xwlm/ex.wc'\" else echo shar: Extracting \"'examples/xwlm/ex.wc'\" \(4750 characters\) sed "s/^X//" >'examples/xwlm/ex.wc' <<'END_OF_FILE' X#WLDL X7 X X5 CuWlm X1 X6 shadow 4 (True) 6 Global X0 X0 X1 X X 5 CuTbl X 1 X 12 formatString 16 (padding(10);c Xc.) 5 Local X 0 X 0 X 3 X X 6 CuBmgr X 2 X 8 bmgrType 9 (Transient) 5 Local X 4 name 11 (exit_button) 5 Local X 0 X 1 X 4 (EXIT) 6 String 4 (EXIT) X 1 X X 8 CuButton X 1 X 4 name 4 (EXIT) 5 Local X 0 X 0 X 0 X X 6 CuBmgr X 1 X 8 bmgrType 12 (DoubleToggle) 5 Local X 2 X 11 setCallback 6 CuDeck 5 pages 1 14 PublicFunction X 6 String 13 (ROTATION XPAGE) 0 2 == 0 : X 11 RaiseWidget 1 X 5 CuTbl 13 (rotation page) X 11 setCallback 6 CuDeck 5 pages 1 14 PublicFunction X 6 String 17 (MODIFICATION XPAGE) 0 2 == 0 : X 11 RaiseWidget 1 X 5 CuTbl 17 (modification page) X 2 X 13 (ROTATION XPAGE) 6 String 13 (ROTATION XPAGE) X 17 (MODIFICATION XPAGE) 6 String 17 (MODIFICATION XPAGE) X 1 X X 5 CuTbl X 0 X 0 X 0 X 2 X X 8 CuButton X 2 X 14 biggestCuLabel 23 (ABCDEFGHIJKLMNOPQRS X123) 5 Local X 4 name 13 (ROTATION XPAGE) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 3 set 4 (True) 5 Local X 4 name 17 (MODIFICATION XPAGE) 5 Local X 0 X 0 X 0 X X 6 CuDeck X 1 X 4 name 5 (pages) 5 Local X 0 X 0 X 2 X X 5 CuTbl X 2 X 4 name 17 (modification page) 5 Local X 12 formatString 4 (c Xc.) 5 Local X 0 X 0 X 2 X X 6 CuBmgr X 2 X 8 bmgrType 12 (SingleToggle) 5 Local X 4 name 7 (pos_neg) 5 Local X 0 X 1 X 8 (NEGATIVE) 6 String 8 (NEGATIVE) X 1 X X 8 CuButton X 2 X 3 set 5 (False) 5 Local X 4 name 8 (NEGATIVE) 5 Local X 0 X 0 X 0 X X 6 CuBmgr X 2 X 8 bmgrType 9 (OneOfMany) 5 Local X 4 name 5 (files) 5 Local X 4 X 11 setCallback 6 CuBmgr 5 files 1 11 XtSetValues X 6 String 5 (FILE3) 0 2 == 0 : X 6 CuBmgr 5 (files) 8 bmgrType 9 (AnyOfMany) X 11 setCallback 7 CuLabel 5 FILEX 1 11 XtSetValues X 6 String 5 (FILE3) 0 2 == 0 : X 7 CuLabel 5 (FILEX) 5 label 5 (File3) X 11 setCallback 7 CuLabel 5 FILEX 1 11 XtSetValues X 6 String 5 (FILE2) 0 2 == 0 : X 7 CuLabel 5 (FILEX) 5 label 5 (File2) X 11 setCallback 7 CuLabel 5 FILEX 1 11 XtSetValues X 6 String 5 (FILE1) 0 2 == 0 : X 7 CuLabel 5 (FILEX) 5 label 5 (File1) X 3 X 5 (FILE3) 6 String 5 (FILE3) X 5 (FILE2) 6 String 5 (FILE2) X 5 (FILE1) 6 String 5 (FILE1) X 1 X X 5 CuTbl X 0 X 0 X 0 X 3 X X 8 CuButton X 1 X 4 name 5 (FILE3) 5 Local X 0 X 0 X 0 X X 8 CuButton X 1 X 4 name 5 (FILE2) 5 Local X 0 X 0 X 0 X X 8 CuButton X 2 X 3 set 4 (True) 5 Local X 4 name 5 (FILE1) 5 Local X 0 X 0 X 0 X X 5 CuTbl X 2 X 12 formatString 8 (c Xc Xc Xc.) 5 Local X 4 name 13 (rotation page) 5 Local X 0 X 0 X 4 X X 7 CuLabel X 1 X 4 name 5 (FILEX) 5 Local X 0 X 0 X 0 X X 6 CuBmgr X 2 X 8 bmgrType 9 (AnyOfMany) 5 Local X 4 name 5 (banks) 5 Local X 0 X 3 X 3 (BLU) 3 Int 1 (2) X 3 (GRN) 3 Int 1 (1) X 3 (RED) 3 Int 1 (0) X 1 X X 5 CuTbl X 0 X 0 X 0 X 3 X X 8 CuButton X 1 X 4 name 3 (BLU) 5 Local X 0 X 0 X 0 X X 8 CuButton X 1 X 4 name 3 (GRN) 5 Local X 0 X 0 X 0 X X 8 CuButton X 1 X 4 name 3 (RED) 5 Local X 0 X 0 X 0 X X 6 CuBmgr X 2 X 8 bmgrType 12 (DoubleToggle) 5 Local X 4 name 6 (switch) 5 Local X 0 X 2 X 12 (ROTATION OFF) 7 Boolean 5 (False) X 11 (ROTATION ON) 7 Boolean 4 (True) X 1 X X 5 CuTbl X 0 X 0 X 0 X 2 X X 8 CuButton X 2 X 3 set 4 (True) 5 Local X 4 name 12 (ROTATION OFF) 5 Local X 0 X 0 X 0 X X 8 CuButton X 1 X 4 name 11 (ROTATION ON) 5 Local X 0 X 0 X 0 X X 6 CuBmgr X 2 X 8 bmgrType 9 (Transient) 5 Local X 4 name 18 (rotation increment) 5 Local X 0 X 1 X 18 (ROTATION INCREMENT) 6 String 18 (ROTATION INCREMENT) X 1 X X 8 CuButton X 1 X 4 name 18 (ROTATION INCREMENT) 5 Local X 0 X 0 X 0 END_OF_FILE echo shar: NEWLINE appended to \"'examples/xwlm/ex.wc'\" if test 4751 -ne `wc -c <'examples/xwlm/ex.wc'`; then echo shar: \"'examples/xwlm/ex.wc'\" unpacked with wrong size! fi # end of 'examples/xwlm/ex.wc' fi if test -f 'man/CuTbl.man' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'man/CuTbl.man'\" else echo shar: Extracting \"'man/CuTbl.man'\" \(13126 characters\) sed "s/^X//" >'man/CuTbl.man' <<'END_OF_FILE' X.TH CuTbl 3X "\fBCornell University Widget Set\fR" X.ad b X.de}F X.ds)H Program of Computer Graphics X.ev1 X.}E X.if\\n()s 'sp |\\n(.pu-1v-1p X.if\\n()t 'sp |\\n(.pu-3v X.ifn 'sp |\\n(.pu-4v X.tl\\*()H- % -\\*(]W X'bp X.ev X.. X.SH NAME XCuTbl \- Geometry management according to \fB"tbl"\fR specifications X.ne 4 X.SH CLASS HIERARCHY X\ X.br XCore / Composite / Constraint / CuTbl X X.ne 4 X.SH NEW RESOURCES X\ X.br X.TS Xallbox tab(;); Xc s s s. XCuTbl Resources X.T& XlB lB lB lB. XName;Type;Default;Description X_ X.T& XlB l l l. XXtNalignedColumns;Boolean;False;whether all items in a column have same width XXtNclipOnShrink;Boolean;False;clip children instead of shrinking them XXtNequalColumns;Boolean;False;whether all columns have same width XXtNequalRows;Boolean;False;whether all rows have same height XXtNformatFile;String;NULL;file containing layout description XXtNformatString;String;NULL;layout description XXtNinternalHeight;Dimension;0;vt distance between parent and children XXtNinternalWidth;Dimension;0;hz distance between parent and children XXtNinterHeight;Dimension;0;vt distance between adjacent children XXtNinterWidth;Dimension;0;hz distance between adjacent children XXtNresizeParticipants;CuResizeParticipants;T{ X.na XCuResizeInters | XCuResizeInternals | XCuResizeChildren X.ad XT};which things adjust during resizes X.T& XcB s s s. XConstraint Resources X.T& XlB l l l. XXtNfillColumn;Boolean;False;marks a widget to take up layout slack X.TE X X.ne 4 X.SH DESCRIPTION X\ X.br XThe \fBCuTbl\fR geometry manager Xlays out a fixed number of widgets according to a specification patterned Xafter the \fBtbl\fR preprocessor for creating tables in documents. XThis document assumes a working knowledge of \fBtbl\fR. XSee a \fBtbl\fR manual for details. X.sp XThe format letters of the \fBtbl\fR language are treated as follows: X.sp X.in +3 X.TS Xtab(;); Xl l l. Xaccepted key letters;:;cC lL rR sS ^ Xillegal key letters;:;_ = aA nN Xaccepted modifiers;:;eE tT Xignored modifiers;:; -+ 0123456789 () | || bB fF iI pP uU vV wW zZ X.TE X.in -3 X.sp XIn addition to the above \fBtbl\fR letters, Xthere are additional keyletters unique to \fBCuTbl\fR: X.sp XAny \fBCuTbl\fR item modified with the "at" sign, @, will attempt to take up any Xhorizontal "slack" there might be in a row of a layout's preferred geometry. XIf there is more than one widget in a row so marked, they will divvy any Xslack up among them. XNote that this only applies to the minimum preferred geometry, and it has Xno effect in rows with equal_columns or rows spanned to other rows. XOn resizes, if widgets resize, all widgets change proportionately. X.sp XThe key letter 'g' is used to control the gravity of the item's data. XIt is followed by one of "n", "ne", "e", "se", "s", "sw", "w", "nw", or "c" Xto set gravity to any of the 8 directions or center. XAs with other keyletters, any mix of upper and lower case letters is acceptable. XNote that the modifier "t" is equivalent to "gn". XGravity is useful not only for vertically spanned items, but any time Xthe children are larger than their minimum size. XAlso note that gravity is only effective if it is supported by the child widget. X.sp XOnly one original \fBtbl\fR option is recognized, \fItab(c)\fR, which indicates Xthe character that separates text items in the data portion of the Xlanguage. X.sp XTwo options have been added primarily for the convenience of entering layouts Xwith a string; X\fIlnl(c)\fR indicates a character that can substitute for the lexical X(syntactic) newline character, Xand \fIsnl(c)\fR indicates a character that can substitute for the string Xembedded (semantic) two-character newline sequence, "\\n", Xin data specifications. X.ne 12 XOptions to modify resources have been added: X.sp X.in +3 X\fIequal_rows\fR X.br X\fIequal_columns\fR X.br X\fIinter_width(\fRn\fI)\fR\v'0.5m'\h'2m'\fIinters(\fRn\fI)\fR\h'-2m'\v'-0.5m' X.br X\fIinter_height(\fRn\fI)\fR\h'0.6m'\v'-0.4m'\s+9}\s0\v'0.9m'\h'8m'\fIpadding(\fRn\fI)\fR\h'-7m'\v'-0.5m' X.br X\fIinternal_width(\fRn\fI)\fR\v'0.5m'\h'2m'\fIinternals(\fRn\fI)\fR\h'0.2m'\v'-0.7m'\s28}\s0'\v'-0.7m' X.br X\fIinternal_height(\fRn\fI)\fR\h'0.6m'\v'-0.4m'\s+9}\s0\v'0.4m'\h'-0.6m' X.br X\fIresize_participants(\fRr\fI)\fR X.br X\fI[c_,p_]border_width(\fRn\fI)\fR X.br X\fI[c_,p_]border_color(\fRs\fI)\fR X.br X\fI[c_,p_]background_color(\fRs\fI)\fR X.br X\fI[c_,p_]foreground_color(\fRs\fI)\fR X.in -3 X.sp Xwhere the argument "n" is an integer, "s" is a string, and "r" is one or more of X\fBinters\fR, \fBinternals\fR, or \fBchildren\fR separated by commas and/or Xwhite space. XThe latter four options can be prepended with either "c_" or "p_" to affect Xonly the children or their parent, respectively. XThe options X\fIinters\fR, X\fIinternals\fR, and X\fIpadding\fR Xare shorthand notations for specifying combinations of the width and height Xoptions (\fIpadding\fR, \fIe.g.\fR, is equivalent to specifying all four width Xand height options with the same value). X.sp X\fBCuTbl\fR looks for the layout description in one of two \fIString\fR resources: X\fBXtNformatFile\fR or \fBXtNformatString\fR, where the former is a pathname to Xa file containing the description, and the latter is the description. XWhen the description is contained in a string, the two character sequence "\\n" Xis recognized as a newline character. XIf both resources contain the default, NULL, the layout defaults to a row Xof centered widgets. X.sp XBoth the options and the data fields are optional elements of the Xlayout description. X\fII.e.\fR, a valid \fBCuTbl\fR description may Xcontain only the format specifications (terminated by a period). X.sp XJust as in \fBtbl\fR, repetitions of the last format line are used for excess Xwidgets, and the ".T&" construct is recognized. Unlike \fBtbl\fR, which Xsilently accepts many peculiar layouts and produces garbled tables, \fBCuTbl\fR Xrejects them with fatal error messages. XLong data lines in description files may be continued by terminating a line Xwith the \fIbackslash newline\fR combination. X.sp XWhen a \fBCuTbl\fR resizes, it looks at the \fIresize_participants\fR resource Xto decide how to fill the available space. XThe internal padding, inter-child padding, and child sizes are the three Xpossible variables. XIf \fIresize_participants\fR is X\fBCuResizeInternals\fR, the resized layout will appear centered. XIf \fIresize_participants\fR is X\fBCuResizeInters\fR, the children get farther apart. XIf \fIresize_participants\fR is X\fBCuResizeChildren\fR, the children expand to fill the layout. XThese may be combined. XA NULL value is equivalent to \fBCuResizeChildren\fR. XIf the size available is less than the preferred size, \fBCuTbl\fR will shrink Xthe children unless XtNclipOnShrink is True, in which case \fBCuTbl\fR Xmerely lets the minimum layout be clipped. X.sp XThere is one major difference between the interpretations of formats by X\fBtbl\fR and \fBCuTbl\fR. XWhen rows have a variable number of columns specified, X\fBtbl\fR fills out the short rows with empty columns, whereas X\fBCuTbl\fR treats each row independently, Xonly requiring a correspondence between rows when they are linked by Xvertical spanning elements. XAny row with an 's' specification in it will have equal width columns in the Xlayout, as will any rows that are joined to it with a vertical span. XThe XtNalignedColumns resource, when set to True, will also force items Xin a column to be of equal width, but only if there are the same number Xof columns in each row. X X.ne 4 X.SH DIAGNOSTICS X\ X.br XThe following situations all cause fatal errors: X.sp X.in 5 X.vs -4 XLayout description file not readable. X.sp XIllegal table specifications. X.sp XLex and yacc parsing errors (badly formed layout descriptions) X.sp XNumber of children not compatible with number of items in layout description. X.br X.vs +4 X.in -5 X X.ne 18 X.SH EXAMPLES X\ X.br X.sp 2 X.mk 1 X.TS Xtab(;); X|c s| c|. X_ XLong Widget;Tall X_; X.T& X|ce| ce| c|. XA;BC;Widget X_ X.TE X.sp 3 Xpadding (-1) X.mk 2 X.br Xtab (;) ; X.br Xc\ s\ c X.br Xce ce ^. X.br XLong Widget;Tall\\nWidget X.br XA;BC; X.sp 2 X.mk 3 X.sp |\n1u X.in +15 X.TS Xbox tab(;); Xc c c c c. X ; ; ; ; X ;_; ;_; X.T& Xc|ce|c|ce|c. X ;#1; ;#007; X.T& Xc c c c c. X ;_; ;_; X ; ; ; ; X.TE X.sp |\n2u Xequal_columns X.br Xinter_width(15) X.br Xinternal_width(10) X.br Xinternal_height(17) X.br Xtab(;); X.br Xc c. X.br X#1;#007 X.sp |\n1u X.in +15 X.TS Xlinesize(28) box tab(;); Xc s Xle|l0e. Xjustification != gravity X_ XLeft;\ \ \ \ \ Left Xjustify,;\ \ \ \ \ justify, XWest;\ \ \ \ \ East Xgravity;\ \ \ \ \ gravity X.TE X.sp |\n2u Xequal_columns tab(;); X.br Xc X.br XlgW lgE. X.br Xjustification != gravity X.br XLeft\\njustify,\\nWest\\ngravity;\\ X.br XLeft\\njustify,\\nEast\\ngravity; X.in -30 X.sp |\n3u XWhen specifying inter and internal padding, Xvalues of -1 will cause the borders to overlap, producing a layout as seen Xin the first example. XValues greater than 0 produce that Xmany pixels of space, as in the second example. XA value of 0 will cause the borders to just touch each other, producing Xa doublewidth effect, as in the third example. X X.ne 4 X.SH BUGS X\ X.br X.vs -0.5m XAttempting to get a new layout by specifying a new description via XXtSetValues doesn't work. X.sp XDoesn't handle widgets with different border sizes elegantly. \fBCuTbl\fR Xsets the border_widths of all its children equal to the border_width of Xits first child. X.br X.vs +0.5m X X.ne 4 X.SH FUTURE ENHANCEMENTS X\ X.br XThe "@" specification only compels widgets to use up the horizontal slack Xfound in a minimum size layout. XA similar notation should be available for vertical slack. XVery high on my priority list is to add a constraint resource that instructs Xwidgets how to absorb both kinds of slack on resizes. X.sp XThis version is a "row-oriented" geometry manager, as is the true \fBtbl\fR. XIt would be nice to have a "column-oriented" option, whereby a variable number Xof rows per column would be easy to specify. (Note that this Xcurrently \fIcan\fR be Xaccomplished, albeit clumsily, with the judicious use of vertical spans, or Xby nesting \fBCuTbl\fRs within \fBCuTbl\fRs.) X X.ne 4 X.SH DISCUSSION OF UNSUPPORTED TBL FEATURES X\ X.br X.ce X.ne 4 XOPTIONS X.sp XThe options X\fIcenter\fR, X\fIexpand\fR, and X\fIdelim\fR Xhave no meaning outside the \fBtbl\fR word processing context. X.sp XThe functionality of the \fIbox\fR, \fIallbox\fR, and X\fIlinesize\fR options are all easily handled by the border_width resources Xof \fBCuTbl\fR and its children. XThe \fIdoublebox\fR option is simply not supported by \fBCuTbl\fR. XI believe this should be handled more generally by embedding \fBCuTbl\fR within Xanother widget which could provide any sort of frame, not just a second border. X.sp X.ce X.ne 4 XFORMAT ITEMS X.sp XThe keyletters 'a' and 'n' could conceivably be implemented, but I don't feel Xthat they have sufficient utility to justify the effort. XFor example, if one was laying out a column of widgets that each displayed Xa floating point number, it should be satisfactory to specify EastGravity (gE) Xfor each item and display all numbers with the same precision. X.sp XThe use of an underscore or equals sign in place of a keyletter to produce a Xhorizontal single or double Xline the width of a column could be implemented by creating a special kind Xof label widget. X.sp XThe use of vertical bars between key letters is not supportable. X.sp XIn \fBtbl\fR, a number following a key letter indicates the spacing between Xthat column and the next. XThis could conceivably be supported. X.sp XThe use of 'f' to indicate font changes would be nice, of course, and just as Xsoon as somebody comes up with a suitable child widget that understands Xhow to convert its default font into italics or bold, for instance, I would Xconsider implementing that feature. XThe same goes for point size changes. X.sp XText blocks are not supported. XHowever, unlike \fBtbl\fR, newlines can be conveniently inserted Xinto data entries, since "\\n" is compressed to '\\n'. XThe keyletter 'v', therefore, could be implemented to control the Xvertical spacing between multiple lines. XFor now, it is necessary to explicitly set this via the \fBXtNlineFactor\fR Xresource of the accompanying \fBCuLabel\fR widget. X.sp XThe column width keyletter 'w' could easily be implemented. X.sp XThe staggered column keyletter 'u' could possibly be implemented. X.sp XThe zero-width keyletter 'z' is not supportable. X.sp X.ce X.ne 4 XDATA ITEMS X.sp XAlthough \fBtbl\fR is lax in requiring that there be a strict correspondence Xbetween format items and data items in a row, \fBCuTbl\fR is not. XThe rule is that the keyletters "c\ l\ r\ ^" require a data item, while "s" requires Xthat there not be a corresponding item. Thus, "c ^ c" would require 3 data Xitems, while "c s s", must have one data item in the row. XAny data corresponding to a "^" keyletter will, however, be ignored. X.sp XThe use of an underscore or an equals sign as the sole data item in a row to Xindicate a full-width single or double line is not supportable. X.sp XRepeated characters, \fI\\R<x>\fR, as a data item, or short horizontal lines, X\fI\\_\fR, would require a special child widget. X.sp XIt is not possible to indicate vertical spanning in the data section with "\\^". X X.ne 4 X.SH AUTHOR X\ X.br XGene Dykes, \fIgwd@freedom.tn.cornell.edu\fR X.br XProgram of Computer Graphics, Cornell University X END_OF_FILE echo shar: NEWLINE appended to \"'man/CuTbl.man'\" echo shar: 4 control characters may be missing from \"'man/CuTbl.man'\" if test 13127 -ne `wc -c <'man/CuTbl.man'`; then echo shar: \"'man/CuTbl.man'\" unpacked with wrong size! fi # end of 'man/CuTbl.man' fi if test -f 'src/CuBmgr.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'src/CuBmgr.c'\" else echo shar: Extracting \"'src/CuBmgr.c'\" \(16011 characters\) sed "s/^X//" >'src/CuBmgr.c' <<'END_OF_FILE' X/* * X * * This code is completely original. Permission is granted to do with X * * it as one wishes. I disclaim any responsibility whatsoever for X * * any bad things that may happen because of using it. X * */ X X/* X * CuBmgr.c - CuBmgr widget X */ X X#include <X11/IntrinsicP.h> X#include <X11/StringDefs.h> X#include <X11/Cardinals.h> X#include "CuBmgrP.h" X X/* X * Full class record constant X */ X X/* Private Data */ X X/* X * XtResource : X * name, class, type, size, X * offset, default_type, default_address X */ X Xstatic Boolean def_true = True ; Xstatic CuBmgrType def_type = CuBmgrAnyOfMany ; X X/* X * resource declarations X */ X X#define offset(field) XtOffset(CuBmgrWidget, field) X#define Offset(field) XtOffset(CuBmgrWidget, bmgr.field) X Xstatic XtResource resources[] = X{ X {XtNbmgrType, XtCCuBmgrType, XtRCuBmgrType, sizeof(CuBmgrType), X Offset(bmgr_type), XtRCuBmgrType, (caddr_t) &def_type} X X ,{XtNdownAction, XtCBoolean, XtRBoolean, sizeof(Boolean), X Offset(down_action),XtRBoolean, (caddr_t) &def_true} X X ,{XtNsetCallback, XtCCallback, XtRCallback, sizeof(caddr_t), X Offset(set_callbacks), XtRCallback, (caddr_t)NULL} X X ,{XtNunsetCallback, XtCCallback, XtRCallback, sizeof(caddr_t), X Offset(unset_callbacks), XtRCallback, (caddr_t)NULL} X X ,{XtNillegalCallback, XtCCallback, XtRCallback, sizeof(caddr_t), X Offset(illegal_callbacks), XtRCallback, (caddr_t)NULL} X X /*** intentionally undocumented ! Probably used only by CuWlm ***/ X ,{XtNprocedureList, XtCProcedureList, X XtRProcedureList, sizeof(XtProcedureList *), X Offset(procedure_list), XtRProcedureList, (caddr_t)NULL} X} ; X X#undef Offset X#undef offset X Xstatic void ClassInitialize() ; Xstatic void Initialize() ; Xstatic void Destroy() ; X Xstatic void Notification () ; Xstatic void Notify () ; X X#define superclass (&widgetClassRec) X XCuBmgrClassRec cuBmgrClassRec = X{ X { X /* core_class fields */ X /* superclass */ (WidgetClass) superclass, X /* class_name */ "CuBmgr", X /* widget_size */ sizeof(CuBmgrRec), X /* class_initialize */ ClassInitialize, X /* class_part_initialize */ NULL, X /* class_inited */ FALSE, X /* initialize */ Initialize, X /* initialize_hook */ NULL, X /* realize */ XtInheritRealize, X /* actions */ NULL, X /* num_actions */ 0, X /* resources */ resources, X /* num_resources */ XtNumber(resources), X /* xrm_class */ NULLQUARK, X /* compress_motion */ TRUE, X /* compress_exposure */ TRUE, X /* compress_enterleave */ TRUE, X /* visible_interest */ FALSE, X /* destroy */ Destroy, X /* resize */ NULL, X /* expose */ NULL, X /* set_values */ NULL, X /* set_values_hook */ NULL, X /* set_values_almost */ XtInheritSetValuesAlmost, X /* get_values_hook */ NULL, X /* accept_focus */ NULL, X /* version */ XtVersion, X /* callback_private */ NULL, X /* tm_table */ NULL, X /* query_geometry */ NULL, X /* display_accelerator */ XtInheritDisplayAccelerator, X /* extension */ NULL, X } X} ; X X/* For use by clients... */ XWidgetClass cuBmgrWidgetClass = (WidgetClass) &cuBmgrClassRec ; X X/** X *** X **** Toolkit Procedures X *** X **/ X X/***** **** *** ** * ClassInitialize * ** *** **** *****/ X Xstatic void XClassInitialize() X{ XCuAddStringToBmgrTypeConverter () ; X Xreturn ; X} X X/***** **** *** ** * Initialize * ** *** **** *****/ X Xstatic void XInitialize (request, new) X Widget request, new ; X{ XCuBmgrWidget bw = (CuBmgrWidget) new ; Xstatic String CuBmgrSampleText = "Sample" ; Xstatic String CuBmgrManageText = "Manage" ; Xstatic String CuBmgrSetAllText = "SetAll" ; Xstatic String CuBmgrUnsetAllText = "UnsetAll" ; Xstatic String CuBmgrToggleAllText = "ToggleAll" ; X Xbw->bmgr.buttons = NULL ; Xbw->bmgr.button_values = NULL ; Xbw->bmgr.n_buttons = 0 ; Xbw->core.width = 1 ; Xbw->core.height = 1 ; Xbw->core.x = -3 ; Xbw->core.y = -3 ; Xbw->bmgr.procedure_list = (XtProcedureList *) X XtMalloc (6 * sizeof (XtProcedureList)) ; Xbw->bmgr.procedure_list[0].name = CuBmgrManageText ; Xbw->bmgr.procedure_list[0].procedure = CuBmgrManage ; Xbw->bmgr.procedure_list[1].name = CuBmgrSampleText ; Xbw->bmgr.procedure_list[1].procedure = CuBmgrSample ; Xbw->bmgr.procedure_list[2].name = CuBmgrSetAllText ; Xbw->bmgr.procedure_list[2].procedure = CuBmgrSetAll ; Xbw->bmgr.procedure_list[3].name = CuBmgrUnsetAllText ; Xbw->bmgr.procedure_list[3].procedure = CuBmgrUnsetAll ; Xbw->bmgr.procedure_list[4].name = CuBmgrToggleAllText ; Xbw->bmgr.procedure_list[4].procedure = CuBmgrToggleAll ; Xbw->bmgr.procedure_list[5].name = NULL ; Xbw->bmgr.procedure_list[5].procedure = NULL ; X Xreturn ; X} X X/***** **** *** ** * Destroy * ** *** **** *****/ X Xstatic void XDestroy (widget) X Widget widget ; X{ XCuBmgrWidget bw = (CuBmgrWidget) widget ; X X/* X * free dynamically allocated data X */ X Xif (!XtIsRealized (widget)) X return ; X XXtFree ((char *)bw->bmgr.buttons) ; XXtFree ((char *)bw->bmgr.button_values) ; XXtFree ((char *)bw->bmgr.procedure_list) ; X Xreturn ; X} X X/** X *** X **** Private Procedures X *** X **/ X Xstatic void XNotification (w, client_data, child_data) X Widget w ; X caddr_t client_data ; X caddr_t child_data ; X{ XCuBmgrWidget bmgr = (CuBmgrWidget) client_data ; XCuButtonWidget button = (CuButtonWidget) w ; Xif (*child_data == 'u' && !bmgr->bmgr.down_action || X *child_data == 'd' && bmgr->bmgr.down_action) X { X Notify (bmgr, button) ; X } Xreturn ; X} X Xstatic void XNotify (bmgr, button) X CuBmgrWidget bmgr ; X CuButtonWidget button ; X{ XCardinal i_caller ; Xstatic caddr_t callback_data ; X X/* just return (with a nasty beep) if this is an unselectable button */ X/* TODO: Probably not possible any more */ X/*** Xif (bmgr->bmgr.selectable == False) X { X XtWarning ("CuBmgr is unselectable!!! (???)\n") ; X XBell (XtDisplay(button), 100) ; X return ; X } X***/ X X/* Find the button # that is notifying */ Xfor (i_caller=0; i_caller < bmgr->bmgr.n_buttons; i_caller++) X if (bmgr->bmgr.buttons[i_caller] == button) X break ; X X/** Xif (bmgr->bmgr.help_active) X { X } X**/ X Xswitch (bmgr->bmgr.bmgr_type) X { X case CuBmgrTransient : X { X Arg arg ; X /* Blink the button */ X XtSetArg (arg, XtNset, (XtArgVal) True) ; X XtSetValues ((Widget)button, &arg, 1) ; X XtSetArg (arg, XtNset, (XtArgVal) False) ; X XtSetValues ((Widget)button, &arg, 1) ; X /* send selected event and value */ X callback_data = (caddr_t) bmgr->bmgr.button_values[i_caller] ; X XtCallCallbacks ((Widget)bmgr, XtNsetCallback, callback_data) ; X break ; X } X case CuBmgrHelp : X { X /* return a special help string */ X /* Let client take care of set/unset instructions */ X break ; X } X case CuBmgrAnyOfMany : X case CuBmgrSingleToggle : X { X Arg arg ; X if (button->button.set) X { X XtSetArg (arg, XtNset, (XtArgVal) False) ; X XtSetValues ((Widget)button, &arg, 1) ; X /* send unselected event and value */ X callback_data = (caddr_t) bmgr->bmgr.button_values[i_caller] ; X XtCallCallbacks ((Widget)bmgr, XtNunsetCallback, callback_data) ; X } X else X { X XtSetArg (arg, XtNset, (XtArgVal) True) ; X XtSetValues ((Widget)button, &arg, 1) ; X /* send selected event and value */ X callback_data = (caddr_t) bmgr->bmgr.button_values[i_caller] ; X XtCallCallbacks ((Widget)bmgr, XtNsetCallback, callback_data) ; X } X break ; X } X case CuBmgrDoubleToggle : X { X /* Although it might seem that this is just a degenerate case of X * ONE_OF_MANY, toggles allow either the set or unset buttons to X * be clicked, whereas ONE_OF_MANY insists on clicking an unset X * button X */ X CuButtonWidget calling_button, sibling_button, set_button ; X Arg calling_arg, sibling_arg ; X X if (bmgr->bmgr.buttons[0] == button) X { X calling_button = bmgr->bmgr.buttons[0] ; X sibling_button = bmgr->bmgr.buttons[1] ; X } X else X { X calling_button = bmgr->bmgr.buttons[1] ; X sibling_button = bmgr->bmgr.buttons[0] ; X } X X if (calling_button->button.set) X { X XtSetArg (calling_arg, XtNset, (XtArgVal) False) ; X XtSetArg (sibling_arg, XtNset, (XtArgVal) True) ; X set_button = sibling_button ; X } X else X { X XtSetArg (calling_arg, XtNset, (XtArgVal) True) ; X XtSetArg (sibling_arg, XtNset, (XtArgVal) False) ; X set_button = calling_button ; X } X X XtSetValues ((Widget)calling_button, &calling_arg, ONE) ; X XtSetValues ((Widget)sibling_button, &sibling_arg, ONE) ; X i_caller = (set_button == bmgr->bmgr.buttons[1]) ? 1 : 0 ; X callback_data = (caddr_t) bmgr->bmgr.button_values[i_caller] ; X XtCallCallbacks ((Widget)bmgr, XtNsetCallback, callback_data) ; X X callback_data = (caddr_t) bmgr->bmgr.button_values[1 - i_caller] ; X XtCallCallbacks ((Widget)bmgr, XtNunsetCallback, callback_data) ; X break ; X } X case CuBmgrOneOfMany : X { X Cardinal i ; X Arg arg ; X X /* search for the button that is currently set */ X for (i=0; i < bmgr->bmgr.n_buttons; i++) X { X if (bmgr->bmgr.buttons[i]->button.set) X break ; X } X X if (i < bmgr->bmgr.n_buttons && bmgr->bmgr.buttons[i] == button) X { X /* Can't select the one button that is selected */ X callback_data = (caddr_t) bmgr->bmgr.button_values[i] ; X XtCallCallbacks ((Widget)bmgr, XtNillegalCallback, callback_data) ; X /* XBell (XtDisplay(bmgr->bmgr.buttons[i]), 100) ; */ X return ; X } X X if (i < bmgr->bmgr.n_buttons) X { X XtSetArg (arg, XtNset, (XtArgVal) False) ; X XtSetValues ((Widget)bmgr->bmgr.buttons[i], &arg, ONE) ; X callback_data = (caddr_t) bmgr->bmgr.button_values[i] ; X XtCallCallbacks ((Widget)bmgr, XtNunsetCallback, callback_data) ; X } X X XtSetArg (arg, XtNset, (XtArgVal) True) ; X XtSetValues ((Widget)button, &arg, ONE) ; X callback_data = (caddr_t) bmgr->bmgr.button_values[i_caller] ; X XtCallCallbacks ((Widget)bmgr, XtNsetCallback, callback_data) ; X X break ; X } X default : X { X break ; X } X } Xreturn ; X} X X/** X *** X **** Public Procedures X *** X **/ X Xvoid XCuBmgrManage (bmgr, buttons, values, n_buttons) X CuBmgrWidget bmgr ; X CuButtonWidget *buttons ; X caddr_t *values ; X Cardinal n_buttons ; X{ XCardinal i ; Xif (!XtIsSubclass ((Widget)bmgr, (WidgetClass)cuBmgrWidgetClass)) { X XtError ("CuBmgrManage requires first arg to be a cuBmgrWidgetClass") ; X } Xbmgr->bmgr.n_buttons = n_buttons ; Xif (bmgr->bmgr.buttons) X { X XtFree ((char *)bmgr->bmgr.buttons) ; X XtFree ((char *)bmgr->bmgr.button_values) ; X } Xbmgr->bmgr.buttons = (CuButtonWidget *) X XtMalloc (n_buttons * sizeof (CuButtonWidget)) ; Xbmgr->bmgr.button_values = (caddr_t *) X XtMalloc (n_buttons * sizeof (caddr_t)) ; Xfor (i=0; i < n_buttons; i++) X { X if (!XtIsSubclass ((Widget)buttons[i], (WidgetClass)cuButtonWidgetClass)) { X XtError ("CuBmgrManage requires an array of cuButtonWidgetClass") ; X } X bmgr->bmgr.buttons[i] = buttons[i] ; X bmgr->bmgr.button_values[i] = values[i] ; X } X Xswitch (bmgr->bmgr.bmgr_type) X { X case (int) CuBmgrTransient : X { X Arg arg ; X XtSetArg (arg, XtNset, False) ; X for (i=0; i < bmgr->bmgr.n_buttons; i++) X if (bmgr->bmgr.buttons[i]->button.set) X XtSetValues ((Widget)bmgr->bmgr.buttons[i], &arg, ONE) ; X break ; X } X case (int) CuBmgrDoubleToggle : X case (int) CuBmgrOneOfMany : X { X Cardinal n_set = 0 ; X Cardinal first_set = 0 ; X char error_text[100] ; X /* There must be more than one child and one and only one of them set */ X if (bmgr->bmgr.n_buttons < 2) X { X sprintf (error_text, X "CuBmgrManage/OneOfMany (%s) : must be .gt. 1 button managed\n", X bmgr->core.name ? bmgr->core.name : "") ; X XtWarning (error_text) ; X return ; X } X for (i=0; i < bmgr->bmgr.n_buttons; i++) X { X Boolean set ; X set = bmgr->bmgr.buttons[i]->button.set ; X if (set) X { X if (n_set == 0) X first_set = i ; X n_set++ ; X } X } X if (n_set < 1) X { X Arg arg ; X XtSetArg (arg, XtNset, True) ; X /* We'll set the first one */ X XtSetValues ((Widget)bmgr->bmgr.buttons[0], &arg, ONE) ; X sprintf (error_text, X "CuBmgrManage/OneOfMany (%s) : No buttons set. Setting first.\n", X bmgr->core.name ? bmgr->core.name : "") ; X XtWarning (error_text) ; X } X else X if (n_set > 1) X { X Arg arg ; X XtSetArg (arg, XtNset, False) ; X /* We'll unset all but the first one set */ X sprintf (error_text, X "CuBmgrManage/OneOfMany (%s) : Too many set. Unsetting extras.\n", X bmgr->core.name ? bmgr->core.name : "") ; X XtWarning (error_text) ; X for (i=first_set+1; i < bmgr->bmgr.n_buttons; i++) X XtSetValues ((Widget)bmgr->bmgr.buttons[i], &arg, ONE) ; X } X break ; X } X } X Xfor (i=0; i < bmgr->bmgr.n_buttons; i++) X { X /* add callbacks for button down and button up */ X XtAddCallback ((Widget)bmgr->bmgr.buttons[i], XtNcallback, X Notification, (caddr_t) bmgr) ; X } Xreturn ; X} X X/***** **** *** ** * CuBmgrSample * ** *** **** *****/ X Xvoid XCuBmgrSample (bmgr) X CuBmgrWidget bmgr ; X{ Xstatic caddr_t callback_data ; XCardinal i ; X Xif (!XtIsSubclass ((Widget)bmgr, (WidgetClass)cuBmgrWidgetClass)) { X XtError("CuBmgrSample requires a subclass of cuBmgrWidgetClass"); X } Xswitch (bmgr->bmgr.bmgr_type) X { X case CuBmgrTransient : { break ; } /* sampling not meaningful */ X case CuBmgrOneOfMany : X case CuBmgrAnyOfMany : X case CuBmgrSingleToggle : X case CuBmgrDoubleToggle : X { X /* for each button, call set or unsetCallback as appropriate */ X for (i=0; i < bmgr->bmgr.n_buttons; i++) X { X callback_data = (caddr_t) bmgr->bmgr.button_values[i] ; X if (bmgr->bmgr.buttons[i]->button.set) X { X /* send selected event and value */ X XtCallCallbacks ((Widget)bmgr, XtNsetCallback, callback_data) ; X } X else X { X /* send unselected event and value */ X XtCallCallbacks ((Widget)bmgr, XtNunsetCallback, callback_data) ; X } X } X break ; X } X } X Xreturn ; X} X X/***** **** *** ** * CuBmgrToggleAll * ** *** **** *****/ X X/* Toggle the states of DoubleToggle, SingleToggle, and AnyOfMany children */ X/* Accomplished by faking a callback from all children */ X Xvoid XCuBmgrToggleAll (bmgr) X CuBmgrWidget bmgr ; X{ Xint i ; X Xif (bmgr->bmgr.bmgr_type != CuBmgrDoubleToggle && X bmgr->bmgr.bmgr_type != CuBmgrSingleToggle && X bmgr->bmgr.bmgr_type != CuBmgrAnyOfMany) X { X char text[200] ; X sprintf (text, "CuBmgr(%s)/CuBmgrSetAll must have a bmgrType of\n%s\n", X bmgr->core.name, X "CuBmgrAnyOfMany, CuBmgrSingleToggle, or CuBmgrAnyOfMany") ; X XtWarning (text) ; X return ; X } X Xfor (i=0; i < bmgr->bmgr.n_buttons; i++) X { X Notify (bmgr, bmgr->bmgr.buttons[i]); X } Xreturn ; X} X X/***** **** *** ** * CuBmgrSetAll * ** *** **** *****/ X X/* Change the states of AnyOfMany or SingleToggle children to Set */ X/* Accomplished by faking a callback from all unset children */ X Xvoid XCuBmgrSetAll (bmgr) X CuBmgrWidget bmgr ; X{ Xint i ; X Xif (bmgr->bmgr.bmgr_type != CuBmgrAnyOfMany && X bmgr->bmgr.bmgr_type != CuBmgrSingleToggle) X { X char text[200] ; X sprintf (text, "CuBmgr(%s)/CuBmgrSetAll must have a bmgrType of\n%s\n", X bmgr->core.name, X "CuBmgrAnyOfMany or CuBmgrSingleToggle") ; X XtWarning (text) ; X return ; X } X Xfor (i=0; i < bmgr->bmgr.n_buttons; i++) X { X if (!bmgr->bmgr.buttons[i]->button.set) X Notify (bmgr, bmgr->bmgr.buttons[i]); X } Xreturn ; X} X X/***** **** *** ** * CuBmgrSetAll * ** *** **** *****/ X X/* Change the states of AnyOfMany or SingleToggle children to Unset */ X/* Accomplished by faking a callback from all set children */ X Xvoid XCuBmgrUnsetAll (bmgr) X CuBmgrWidget bmgr ; X{ Xint i ; X Xif (bmgr->bmgr.bmgr_type != CuBmgrAnyOfMany && X bmgr->bmgr.bmgr_type != CuBmgrSingleToggle) X { X char text[200] ; X sprintf (text, "CuBmgr(%s)/CuBmgrUnsetAll must have a bmgrType of\n%s\n", X bmgr->core.name, X "CuBmgrAnyOfMany or CuBmgrSingleToggle") ; X XtWarning (text) ; X return ; X } X Xfor (i=0; i < bmgr->bmgr.n_buttons; i++) X { X if (bmgr->bmgr.buttons[i]->button.set) X Notify (bmgr, bmgr->bmgr.buttons[i]); X } Xreturn ; X} X END_OF_FILE echo shar: NEWLINE appended to \"'src/CuBmgr.c'\" if test 16012 -ne `wc -c <'src/CuBmgr.c'`; then echo shar: \"'src/CuBmgr.c'\" unpacked with wrong size! fi # end of 'src/CuBmgr.c' fi echo shar: End of archive 7 \(of 12\). cp /dev/null ark7isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 12 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0