home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / 2577 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  51.5 KB

  1. Path: sparky!uunet!stanford.edu!morrow.stanford.edu!sep!steve
  2. From: steve@sep.Stanford.EDU (Steve Cole)
  3. Newsgroups: alt.sources
  4. Subject: xtpanel 2.0 - interactive program builder - part 01/10
  5. Followup-To: alt.sources.d
  6. Date: 21 Nov 1992 00:27:26 GMT
  7. Organization: Stanford Exploration Project
  8. Lines: 1971
  9. Distribution: world
  10. Message-ID: <1ejvpeINN194@morrow.stanford.edu>
  11. NNTP-Posting-Host: taal.stanford.edu
  12.  
  13.  
  14. Submitted-by: steve@sep.Stanford.EDU
  15. Archive-name: xtpanel/part01
  16.  
  17. xtpanel - build an interactive program, from the command line
  18.       or using a simple scripting language
  19.  
  20. This is xtpanel version 2.00. Changes since version 1.01:
  21. -added new objects: toggle, scrollbar, graph.
  22. -added new actions: ASSIGN, SET. Allow one object to modify another.
  23. -objects can have multiple actions.
  24. -backquoted strings in actions get executed at action time.
  25. -new examples: xtpanel-based calculator, color selection tool,
  26.  bitmap browser.
  27.  
  28. xtpanel is also available for anonymous ftp from
  29. hanauma.Stanford.EDU (36.51.0.16) as pub/X/xtpanel.tar.Z.
  30. Size of version 2.00 is 172489 bytes.
  31. Note hanauma's ftp daemon doesn't like you using "ls" and "cd .."
  32. use "dir" and "cdup" instead.
  33.  
  34. Here is some information from the README file:
  35.  
  36. xtpanel provides a quick and easy way of producing a panel
  37. containing interactive objects such as buttons, sliders, and text
  38. fields, either from the command line or from an xtpanel script file.
  39. Each panel object maintains a string representation of its value. When
  40. the object is modified it updates its value and it can also perform an
  41. action such as printing its value or calling a system command. Objects
  42. can make use of the values of other objects in constructing their
  43. actions, and they can set the values of other objects as the result of
  44. an action. The result is an interactive X windows program, without the
  45. need for conventional programming.
  46.  
  47. This program is not intended as a replacement for a full featured
  48. interface programming toolkit like Tk or Dirt or as a replacement for a 
  49. simple menu builder like xmenu, it falls somewhere in the gap between the two.
  50. It is intended as an easy to use tool that can be used to add an
  51. interactive wrapper to all those old programs and shells that you have 
  52. lying around. 
  53.  
  54.  
  55. Three utilities are provided with xtpanel. All three utilities are
  56. written as xtpanel scripts. 
  57.  
  58. The first is a script generator. This is a collection af xtpanel scripts 
  59. that can be used to build, examine and test xtpanel script files. 
  60. It is invoked using the command "xtpanel-generator". The second utility is a
  61. collection of example scripts and a master script that can be use to
  62. view and run the examples. It is invoked using the command
  63. "xtpanel-examples".  A particularly powerful demo is the "lister"
  64. script example, which is a tool for maneuvering through a Unix
  65. filesystem and viewing files at any level. The third is a set of
  66. xtpanel scripts that present information about xtpanel, mostly taken
  67. from this manual page, in an interactive, menu-driven form. This
  68. is invoked by doing "xtpanel -help".
  69.  
  70. This program uses the X toolkit and the MIT Athena widget
  71. set.
  72.  
  73. COPYRIGHT
  74. Although xtpanel is not in the public domain, its copyright is not
  75. very restrictive. Here is the official xtpanel copyright notice:
  76. .PP
  77. Copyright 1992 the Board of Trustees of the Leland Stanford Junior
  78. University.  All Rights Reserved.  Permission is hereby given
  79. to use, copy, modify, and distribute this software provided
  80. that (1) copyright and proprietary notices are retained in
  81. each copy, (2) any files which are modified are identified as such,
  82. and (3) you do not copy or distribute the software for payment or
  83. for commercial use without prior written consent from Stanford.
  84. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND
  85. concerning this software or its use.
  86.  
  87. Machines tested:
  88. ----------------
  89.  
  90. Sun 4, OS 4.1.1, MIT X11R5
  91. Sun 4, OS 4.1.1, Openwindows-3 (see the file OW3 for more info)
  92. Sun 3, OS 3.5, MIT X11R5
  93. DEC 3100, ULTRIX V4.2, MIT X11R5
  94. DEC 3100, ULTRIX V4.2, UWS V4.2 (with optional MIT compatible subset)
  95. IBM RS6000, AIX V3.2, MIT X11R5
  96. IBM RS6000, AIX V3.2, IBM X11R4
  97. HP 700, HP-UX 8.05, HP X11R4
  98. Convex C-1, OS 9.0, MIT X11R4
  99.  
  100. AUTHORS
  101. Steve Cole (steve@sep.stanford.edu)
  102. Dave Nichols (dave@sep.stanford.edu)
  103. Stanford Exploration Project, Department of Geophysics
  104. Stanford University, Stanford, CA 94305-2215
  105.  
  106. #!/bin/sh
  107. # This is a shell archive (produced by shar 3.50)
  108. # To extract the files from this archive, save it to a file, remove
  109. # everything above the "!/bin/sh" line above, and type "sh file_name".
  110. #
  111. # made 11/20/1992 22:59 UTC by steve@sep.stanford.edu
  112. # Source directory /home/taal/src/our/interact
  113. #
  114. # existing files will NOT be overwritten unless -c is specified
  115. #
  116. # This shar contains:
  117. # length  mode       name
  118. # ------ ---------- ------------------------------------------
  119. #    491 -rw-rw-r-- xtpanel/examples/Imakefile
  120. #    441 -rw-rw-r-- xtpanel/examples/script/lister
  121. #    209 -rw-rw-r-- xtpanel/examples/script/choice
  122. #   1138 -rw-rw-r-- xtpanel/examples/script/all
  123. #     60 -rw-rw-r-- xtpanel/examples/script/text
  124. #    483 -rw-rw-r-- xtpanel/examples/script/list
  125. #    210 -rw-rw-r-- xtpanel/examples/script/menubutton
  126. #    362 -rw-rw-r-- xtpanel/examples/script/Imakefile
  127. #     72 -rw-rw-r-- xtpanel/examples/script/message
  128. #    163 -rw-rw-r-- xtpanel/examples/script/slider
  129. #    180 -rw-rw-r-- xtpanel/examples/script/scrollbar
  130. #   9953 -rw-rw-r-- xtpanel/examples/script/Makefile
  131. #     82 -rw-rw-r-- xtpanel/examples/script/button
  132. #    516 -rw-rw-r-- xtpanel/examples/script/graph
  133. #    186 -rw-rw-r-- xtpanel/examples/script/dialog
  134. #   7975 -rw-rw-r-- xtpanel/examples/script/color_selector
  135. #    247 -rw-rw-r-- xtpanel/examples/script/.bitmap_browser
  136. #   5191 -rw-rw-r-- xtpanel/examples/script/calculator
  137. #    188 -rw-rw-r-- xtpanel/examples/script/toggle
  138. #    383 -rw-rw-r-- xtpanel/examples/script/bitmap_browser
  139. #  12622 -rw-rw-r-- xtpanel/examples/Makefile
  140. #    947 -rw-rw-r-- xtpanel/examples/all_examples.sed
  141. #    583 -rwxrwxr-x xtpanel/examples/commandline/all
  142. #     43 -rwxrwxr-x xtpanel/examples/commandline/message
  143. #     73 -rwxrwxr-x xtpanel/examples/commandline/button
  144. #     92 -rwxrwxr-x xtpanel/examples/commandline/slider
  145. #    111 -rwxrwxr-x xtpanel/examples/commandline/list
  146. #    103 -rwxrwxr-x xtpanel/examples/commandline/menubutton
  147. #     87 -rwxrwxr-x xtpanel/examples/commandline/dialog
  148. #     32 -rwxrwxr-x xtpanel/examples/commandline/text
  149. #     95 -rwxrwxr-x xtpanel/examples/commandline/choice
  150. #    256 -rw-rw-r-- xtpanel/examples/commandline/Imakefile
  151. #   9860 -rw-rw-r-- xtpanel/examples/commandline/Makefile
  152. #     64 -rwxrwxr-x xtpanel/examples/commandline/scrollbar
  153. #    105 -rwxrwxr-x xtpanel/examples/commandline/graph
  154. #    663 -rw-rw-r-- xtpanel/generator/actionstring
  155. #    787 -rw-rw-r-- xtpanel/generator/box
  156. #   1121 -rw-rw-r-- xtpanel/generator/button
  157. #   1276 -rw-rw-r-- xtpanel/generator/choice
  158. #    151 -rw-rw-r-- xtpanel/generator/confirm
  159. #   1127 -rw-rw-r-- xtpanel/generator/dialog
  160. #    158 -rw-rw-r-- xtpanel/generator/field
  161. #   1208 -rw-rw-r-- xtpanel/generator/item
  162. #   1253 -rw-rw-r-- xtpanel/generator/list
  163. #  10168 -rw-rw-r-- xtpanel/generator/Makefile
  164. #    875 -rw-rw-r-- xtpanel/generator/message
  165. #   1553 -rw-rw-r-- xtpanel/generator/slider
  166. #    978 -rw-rw-r-- xtpanel/generator/text
  167. #   1322 -rw-rw-r-- xtpanel/generator/menubutton
  168. #   2328 -rw-rw-r-- xtpanel/generator/generator
  169. #   1538 -rw-rw-r-- xtpanel/generator/action
  170. #    451 -rw-rw-r-- xtpanel/generator/Imakefile
  171. #   4234 -rw-rw-r-- xtpanel/generator/help
  172. #    745 -rw-rw-r-- xtpanel/generator/assignstring
  173. #    821 -rw-rw-r-- xtpanel/generator/setstring
  174. #   1636 -rw-rw-r-- xtpanel/generator/extras
  175. #   1121 -rw-rw-r-- xtpanel/generator/toggle
  176. #   1452 -rw-rw-r-- xtpanel/generator/scrollbar
  177. #   1698 -rw-rw-r-- xtpanel/generator/graph
  178. #   1659 -rw-rw-r-- xtpanel/Imakefile
  179. #  30583 -rw-rw-r-- xtpanel/Makefile
  180. #   1227 -rw-rw-r-- xtpanel/builders.h
  181. #   2737 -rw-rw-r-- xtpanel/item.c
  182. #  12032 -rw-rw-r-- xtpanel/actions.c
  183. #   1205 -rw-rw-r-- xtpanel/CHANGES
  184. #   7865 -rw-rw-r-- xtpanel/main.c
  185. #  22092 -rw-rw-r-- xtpanel/parse.c
  186. #   4270 -rw-rw-r-- xtpanel/tree.c
  187. #   1134 -rw-rw-r-- xtpanel/tree.h
  188. #   2377 -rw-rw-r-- xtpanel/XTpanel.ad.sed
  189. #   2871 -rw-rw-r-- xtpanel/README
  190. #   6855 -rw-rw-r-- xtpanel/xtpanel_scan.l
  191. #     51 -rw-rw-r-- xtpanel/patchlevel.h
  192. #   1457 -rw-rw-r-- xtpanel/NoImake.cpp
  193. #   2598 -rw-rw-r-- xtpanel/NoImake.m4
  194. #   4189 -rw-rw-r-- xtpanel/button.c
  195. #    679 -rw-rw-r-- xtpanel/object.h
  196. #   1423 -rw-rw-r-- xtpanel/INSTALL
  197. #   4381 -rw-rw-r-- xtpanel/dialog.c
  198. #   5904 -rw-rw-r-- xtpanel/list.c
  199. #    360 -rw-rw-r-- xtpanel/xtpanel-examples.script.sed
  200. #    471 -rw-rw-r-- xtpanel/item.h
  201. #   6487 -rw-rw-r-- xtpanel/menubutton.c
  202. #   2221 -rw-rw-r-- xtpanel/message.c
  203. #   9457 -rw-rw-r-- xtpanel/slider.c
  204. #    205 -rw-rw-r-- xtpanel/Imake.config
  205. #   6770 -rw-rw-r-- xtpanel/choice.c
  206. #   3373 -rw-rw-r-- xtpanel/text.c
  207. #   1532 -rw-rw-r-- xtpanel/variable.c
  208. #  38445 -rw-rw-r-- xtpanel/xtpanel.man.sed
  209. #     75 -rw-rw-r-- xtpanel/xtpanel-generator.script
  210. #   1708 -rwxrwxr-x xtpanel/NoImake
  211. #    145 -rw-rw-r-- xtpanel/eval_command.h
  212. #   2031 -rw-rw-r-- xtpanel/eval_command.c
  213. #   5609 -rw-rw-r-- xtpanel/help/general
  214. #    874 -rw-rw-r-- xtpanel/help/message
  215. #   1367 -rw-rw-r-- xtpanel/help/objects
  216. #   1012 -rw-rw-r-- xtpanel/help/text
  217. #    720 -rw-rw-r-- xtpanel/help/dialog
  218. #    713 -rw-rw-r-- xtpanel/help/button
  219. #    300 -rw-rw-r-- xtpanel/help/toggle
  220. #   2132 -rw-rw-r-- xtpanel/help/slider
  221. #    198 -rw-rw-r-- xtpanel/help/scrollbar
  222. #   1537 -rw-rw-r-- xtpanel/help/choice
  223. #   1384 -rw-rw-r-- xtpanel/help/list
  224. #   1326 -rw-rw-r-- xtpanel/help/menubutton
  225. #    654 -rw-rw-r-- xtpanel/help/item
  226. #    847 -rw-rw-r-- xtpanel/help/itemlist
  227. #   2208 -rw-rw-r-- xtpanel/help/graph
  228. #    677 -rw-rw-r-- xtpanel/help/var
  229. #   1689 -rw-rw-r-- xtpanel/help/params
  230. #   6610 -rw-rw-r-- xtpanel/help/actions
  231. #   1967 -rw-rw-r-- xtpanel/help/boxes
  232. #    843 -rw-rw-r-- xtpanel/help/copyright
  233. #    616 -rw-rw-r-- xtpanel/help/about
  234. #   5812 -rw-rw-r-- xtpanel/help/commandline
  235. #   2094 -rw-rw-r-- xtpanel/help/syntax
  236. #   1669 -rw-rw-r-- xtpanel/help/resources
  237. #    258 -rw-rw-r-- xtpanel/help/examples
  238. #    509 -rw-rw-r-- xtpanel/help/generator
  239. #   1524 -rw-rw-r-- xtpanel/help/help
  240. #   1500 -rw-rw-r-- xtpanel/help/help.sed
  241. #   1758 -rw-rw-r-- xtpanel/help/scriptvcomm
  242. #    642 -rw-rw-r-- xtpanel/help/Imakefile
  243. #  10345 -rw-rw-r-- xtpanel/help/Makefile
  244. #  13634 -rw-rw-r-- xtpanel/help/dave.xbm
  245. #  13800 -rw-rw-r-- xtpanel/help/steve.xbm
  246. #   3409 -rw-rw-r-- xtpanel/string_buf.c
  247. #   1091 -rw-rw-r-- xtpanel/string_buf.h
  248. #   6167 -rw-rw-r-- xtpanel/builders.c
  249. #   1003 -rw-rw-r-- xtpanel/actions.h
  250. #   5219 -rw-rw-r-- xtpanel/object.c
  251. #  11318 -rw-rw-r-- xtpanel/graph.c
  252. #    317 -rw-rw-r-- xtpanel/README.OW3
  253. #
  254. # ============= xtpanel/examples/Imakefile ==============
  255. if test ! -d 'xtpanel'; then
  256.     echo 'x - creating directory xtpanel'
  257.     mkdir 'xtpanel'
  258. fi
  259. if test ! -d 'xtpanel/examples'; then
  260.     echo 'x - creating directory xtpanel/examples'
  261.     mkdir 'xtpanel/examples'
  262. fi
  263. if test -f 'xtpanel/examples/Imakefile' -a X"$1" != X"-c"; then
  264.     echo 'x - skipping xtpanel/examples/Imakefile (File already exists)'
  265. else
  266. echo 'x - extracting xtpanel/examples/Imakefile (Text)'
  267. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/Imakefile' &&
  268. X
  269. #include "../Imake.config"
  270. X
  271. SUBDIRS = commandline script
  272. X
  273. X
  274. FILES =  all_examples
  275. X
  276. all_examples: all_examples.sed
  277. X    sed -e 's,CPP,$(CPP),g' <$? >$@
  278. X
  279. MakeDirectories(install,$(SYS_XTPANELDIR)/examples \
  280. X               $(SYS_XTPANELDIR)/examples/commandline \
  281. X               $(SYS_XTPANELDIR)/examples/script)
  282. X
  283. X
  284. InstallMultipleFlags( $(FILES), $(SYS_XTPANELDIR)/examples, -m 644 )
  285. X
  286. MakefileSubdirs($(SUBDIRS))
  287. X
  288. InstallSubdirs($(SUBDIRS))
  289. X
  290. CleanSubdirs($(SUBDIRS))
  291. X
  292. clean::
  293. X    $(RM) all_examples
  294. X
  295. SHAR_EOF
  296. chmod 0664 xtpanel/examples/Imakefile ||
  297. echo 'restore of xtpanel/examples/Imakefile failed'
  298. Wc_c="`wc -c < 'xtpanel/examples/Imakefile'`"
  299. test 491 -eq "$Wc_c" ||
  300.     echo 'xtpanel/examples/Imakefile: original size 491, current size' "$Wc_c"
  301. fi
  302. # ============= xtpanel/examples/script/lister ==============
  303. if test ! -d 'xtpanel/examples/script'; then
  304.     echo 'x - creating directory xtpanel/examples/script'
  305.     mkdir 'xtpanel/examples/script'
  306. fi
  307. if test -f 'xtpanel/examples/script/lister' -a X"$1" != X"-c"; then
  308.     echo 'x - skipping xtpanel/examples/script/lister (File already exists)'
  309. else
  310. echo 'x - extracting xtpanel/examples/script/lister (Text)'
  311. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/lister' &&
  312. X
  313. button={ label=DONE action=QUIT }
  314. X
  315. hbox={
  316. message={ value="Directory:" }
  317. message={ value=`pwd` }
  318. }
  319. X
  320. dialog={ name=command label="Command for files" value="xterm -e vi" }
  321. X
  322. list={ name=name label="NAMES" 
  323. X  action=" if test -d $val 
  324. X           then 
  325. X               cd $val  
  326. X              xtpanel -file examples/script/lister &
  327. X           else 
  328. X              $command $val & 
  329. X           fi" 
  330. X  itemlist={ list=`echo  .* * ` separator=" " }
  331. }
  332. SHAR_EOF
  333. chmod 0664 xtpanel/examples/script/lister ||
  334. echo 'restore of xtpanel/examples/script/lister failed'
  335. Wc_c="`wc -c < 'xtpanel/examples/script/lister'`"
  336. test 441 -eq "$Wc_c" ||
  337.     echo 'xtpanel/examples/script/lister: original size 441, current size' "$Wc_c"
  338. fi
  339. # ============= xtpanel/examples/script/choice ==============
  340. if test -f 'xtpanel/examples/script/choice' -a X"$1" != X"-c"; then
  341.     echo 'x - skipping xtpanel/examples/script/choice (File already exists)'
  342. else
  343. echo 'x - extracting xtpanel/examples/script/choice (Text)'
  344. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/choice' &&
  345. button={ label=quit action=QUIT }
  346. choice={ label=colors action="PRINT choice is $val"
  347. X     item={ label=red foreground=red }
  348. X     item={ label=blue foreground=blue }
  349. X     item={ label=green foreground=green }
  350. X       }
  351. SHAR_EOF
  352. chmod 0664 xtpanel/examples/script/choice ||
  353. echo 'restore of xtpanel/examples/script/choice failed'
  354. Wc_c="`wc -c < 'xtpanel/examples/script/choice'`"
  355. test 209 -eq "$Wc_c" ||
  356.     echo 'xtpanel/examples/script/choice: original size 209, current size' "$Wc_c"
  357. fi
  358. # ============= xtpanel/examples/script/all ==============
  359. if test -f 'xtpanel/examples/script/all' -a X"$1" != X"-c"; then
  360.     echo 'x - skipping xtpanel/examples/script/all (File already exists)'
  361. else
  362. echo 'x - extracting xtpanel/examples/script/all (Text)'
  363. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/all' &&
  364. button={ label=quit action=QUIT }
  365. text={ value=`cat all` }
  366. button={ label="hit me" action="PRINT AARGH!" }
  367. toggle={ label="this is a toggle" }
  368. dialog={ label="what is your favorite color?" value="red" 
  369. X    action="PRINT Your favorite color is $val" }
  370. list={ label=colors value="255 0 0" action="PRINT color is $val"
  371. X         item={ label=red value="255 0 0" }
  372. X         item={ label=green value="0 255 0" }
  373. X         item={ label=blue value="0 0 255" }
  374. X         item={ label=cyan value="0 255 255" }
  375. X         item={ label=yellow value="255 255 0" }
  376. X         item={ label=magenta value="255 0 255" }
  377. X         item={ label=black value="0 0 0" }
  378. X         item={ label=white value="255 255 255" }
  379. X       }
  380. menubutton={ label=numbers action="PRINT choice is $val"
  381. X         item={ label=one value=1 }
  382. X         item={ label=two value=2 }
  383. X         item={ label=three value=3 }
  384. X       }
  385. message={ value="this is a message" }
  386. slider={ label="this is a slider" min=0 max=100 value=50 
  387. X    format="%.2f" width=300
  388. X    action="PRINT slider value is $val" }
  389. choice={ label=colors action="PRINT choice is $val"
  390. X         itemlist={ list="red green blue" }
  391. X       }
  392. SHAR_EOF
  393. chmod 0664 xtpanel/examples/script/all ||
  394. echo 'restore of xtpanel/examples/script/all failed'
  395. Wc_c="`wc -c < 'xtpanel/examples/script/all'`"
  396. test 1138 -eq "$Wc_c" ||
  397.     echo 'xtpanel/examples/script/all: original size 1138, current size' "$Wc_c"
  398. fi
  399. # ============= xtpanel/examples/script/text ==============
  400. if test -f 'xtpanel/examples/script/text' -a X"$1" != X"-c"; then
  401.     echo 'x - skipping xtpanel/examples/script/text (File already exists)'
  402. else
  403. echo 'x - extracting xtpanel/examples/script/text (Text)'
  404. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/text' &&
  405. button={ label=quit action=QUIT }
  406. text={ value=`cat text` }
  407. SHAR_EOF
  408. chmod 0664 xtpanel/examples/script/text ||
  409. echo 'restore of xtpanel/examples/script/text failed'
  410. Wc_c="`wc -c < 'xtpanel/examples/script/text'`"
  411. test 60 -eq "$Wc_c" ||
  412.     echo 'xtpanel/examples/script/text: original size 60, current size' "$Wc_c"
  413. fi
  414. # ============= xtpanel/examples/script/list ==============
  415. if test -f 'xtpanel/examples/script/list' -a X"$1" != X"-c"; then
  416.     echo 'x - skipping xtpanel/examples/script/list (File already exists)'
  417. else
  418. echo 'x - extracting xtpanel/examples/script/list (Text)'
  419. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/list' &&
  420. button={ label=quit action=QUIT }
  421. list={ label=colors value="255 0 0" action="PRINT color is $val"
  422. X         item={ label=red value="255 0 0" }
  423. X         item={ label=green value="0 255 0" }
  424. X         item={ label=blue value="0 0 255" }
  425. X         item={ label=cyan value="0 255 255" }
  426. X         item={ label=yellow value="255 255 0" }
  427. X         item={ label=magenta value="255 0 255" }
  428. X         item={ label=black value="0 0 0" }
  429. X         item={ label=white value="255 255 255" }
  430. X       }
  431. SHAR_EOF
  432. chmod 0664 xtpanel/examples/script/list ||
  433. echo 'restore of xtpanel/examples/script/list failed'
  434. Wc_c="`wc -c < 'xtpanel/examples/script/list'`"
  435. test 483 -eq "$Wc_c" ||
  436.     echo 'xtpanel/examples/script/list: original size 483, current size' "$Wc_c"
  437. fi
  438. # ============= xtpanel/examples/script/menubutton ==============
  439. if test -f 'xtpanel/examples/script/menubutton' -a X"$1" != X"-c"; then
  440.     echo 'x - skipping xtpanel/examples/script/menubutton (File already exists)'
  441. else
  442. echo 'x - extracting xtpanel/examples/script/menubutton (Text)'
  443. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/menubutton' &&
  444. button={ label=quit action=QUIT }
  445. menubutton={ label=numbers action="PRINT choice is $val"
  446. X         item={ label=one value=1 }
  447. X         item={ label=two value=2 }
  448. X         item={ label=three value=3 }
  449. X       }
  450. SHAR_EOF
  451. chmod 0664 xtpanel/examples/script/menubutton ||
  452. echo 'restore of xtpanel/examples/script/menubutton failed'
  453. Wc_c="`wc -c < 'xtpanel/examples/script/menubutton'`"
  454. test 210 -eq "$Wc_c" ||
  455.     echo 'xtpanel/examples/script/menubutton: original size 210, current size' "$Wc_c"
  456. fi
  457. # ============= xtpanel/examples/script/Imakefile ==============
  458. if test -f 'xtpanel/examples/script/Imakefile' -a X"$1" != X"-c"; then
  459.     echo 'x - skipping xtpanel/examples/script/Imakefile (File already exists)'
  460. else
  461. echo 'x - extracting xtpanel/examples/script/Imakefile (Text)'
  462. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/Imakefile' &&
  463. X
  464. #include "../../Imake.config"
  465. X
  466. X
  467. FILES = lister     choice      menubutton  text \
  468. X        all        dialog      message     scrollbar \
  469. X        button     list        slider        bitmap_browser \
  470. X        color_selector         graph       calculator \
  471. X        toggle    .bitmap_browser
  472. X
  473. X
  474. InstallMultipleFlags($(FILES),$(SYS_XTPANELDIR)/examples/script,-m 644)
  475. X
  476. SHAR_EOF
  477. chmod 0664 xtpanel/examples/script/Imakefile ||
  478. echo 'restore of xtpanel/examples/script/Imakefile failed'
  479. Wc_c="`wc -c < 'xtpanel/examples/script/Imakefile'`"
  480. test 362 -eq "$Wc_c" ||
  481.     echo 'xtpanel/examples/script/Imakefile: original size 362, current size' "$Wc_c"
  482. fi
  483. # ============= xtpanel/examples/script/message ==============
  484. if test -f 'xtpanel/examples/script/message' -a X"$1" != X"-c"; then
  485.     echo 'x - skipping xtpanel/examples/script/message (File already exists)'
  486. else
  487. echo 'x - extracting xtpanel/examples/script/message (Text)'
  488. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/message' &&
  489. button={ label=quit action=QUIT }
  490. message={ value="this is a message" }
  491. SHAR_EOF
  492. chmod 0664 xtpanel/examples/script/message ||
  493. echo 'restore of xtpanel/examples/script/message failed'
  494. Wc_c="`wc -c < 'xtpanel/examples/script/message'`"
  495. test 72 -eq "$Wc_c" ||
  496.     echo 'xtpanel/examples/script/message: original size 72, current size' "$Wc_c"
  497. fi
  498. # ============= xtpanel/examples/script/slider ==============
  499. if test -f 'xtpanel/examples/script/slider' -a X"$1" != X"-c"; then
  500.     echo 'x - skipping xtpanel/examples/script/slider (File already exists)'
  501. else
  502. echo 'x - extracting xtpanel/examples/script/slider (Text)'
  503. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/slider' &&
  504. button={ label=quit action=QUIT }
  505. slider={ label="this is a slider object" min=0 max=100 value=50 
  506. X    format="%.2f" width=300
  507. X    action="PRINT slider value is $val" }
  508. SHAR_EOF
  509. chmod 0664 xtpanel/examples/script/slider ||
  510. echo 'restore of xtpanel/examples/script/slider failed'
  511. Wc_c="`wc -c < 'xtpanel/examples/script/slider'`"
  512. test 163 -eq "$Wc_c" ||
  513.     echo 'xtpanel/examples/script/slider: original size 163, current size' "$Wc_c"
  514. fi
  515. # ============= xtpanel/examples/script/scrollbar ==============
  516. if test -f 'xtpanel/examples/script/scrollbar' -a X"$1" != X"-c"; then
  517.     echo 'x - skipping xtpanel/examples/script/scrollbar (File already exists)'
  518. else
  519. echo 'x - extracting xtpanel/examples/script/scrollbar (Text)'
  520. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/scrollbar' &&
  521. button={ label=quit action=QUIT }
  522. scrollbar={ min=0 max=100 value=50 
  523. X    format="%.2f" orient=horizontal height=50 width=300
  524. X    border=salmon
  525. X    action="PRINT scrollbar value is $val" }
  526. SHAR_EOF
  527. chmod 0664 xtpanel/examples/script/scrollbar ||
  528. echo 'restore of xtpanel/examples/script/scrollbar failed'
  529. Wc_c="`wc -c < 'xtpanel/examples/script/scrollbar'`"
  530. test 180 -eq "$Wc_c" ||
  531.     echo 'xtpanel/examples/script/scrollbar: original size 180, current size' "$Wc_c"
  532. fi
  533. # ============= xtpanel/examples/script/Makefile ==============
  534. if test -f 'xtpanel/examples/script/Makefile' -a X"$1" != X"-c"; then
  535.     echo 'x - skipping xtpanel/examples/script/Makefile (File already exists)'
  536. else
  537. echo 'x - extracting xtpanel/examples/script/Makefile (Text)'
  538. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/Makefile' &&
  539. # Makefile generated by imake - do not edit!
  540. # $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  541. #
  542. # The cpp used on this machine replaces all newlines and multiple tabs and
  543. # spaces in a macro expansion with a single space.  Imake tries to compensate
  544. # for this, but is not always successful.
  545. #
  546. X
  547. # -------------------------------------------------------------------------
  548. # Makefile generated from "Imake.tmpl" and <Imakefile>
  549. # $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
  550. #
  551. # Platform-specific parameters may be set in the appropriate <vendor>.cf
  552. # configuration files.  Site-specific parameters should be set in the file
  553. # site.def.  Full rebuilds are recommended if any parameters are changed.
  554. #
  555. # If your C preprocessor does not define any unique symbols, you will need
  556. # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  557. # "make World" the first time).
  558. #
  559. X
  560. # -------------------------------------------------------------------------
  561. # site-specific configuration parameters that need to come before
  562. # the platform-specific parameters - edit site.def to change
  563. X
  564. # site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  565. X
  566. # -------------------------------------------------------------------------
  567. # platform-specific configuration parameters - edit sun.cf to change
  568. X
  569. # platform:  $XConsortium: sun.cf,v 1.72.1.1 92/03/18 13:13:37 rws Exp $
  570. X
  571. # operating system:  SunOS 4.1.1
  572. X
  573. # $XConsortium: sunLib.rules,v 1.7 91/12/20 11:19:47 rws Exp $
  574. X
  575. # -------------------------------------------------------------------------
  576. # site-specific configuration parameters that go after
  577. # the platform-specific parameters - edit site.def to change
  578. X
  579. # site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  580. X
  581. X            SHELL = /bin/sh
  582. X
  583. X              TOP = ../../.
  584. X      CURRENT_DIR = ./examples/script
  585. X
  586. X               AR = ar clq
  587. X  BOOTSTRAPCFLAGS =
  588. X               CC = cc
  589. X               AS = as
  590. X
  591. X         COMPRESS = compress
  592. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  593. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  594. X          INSTALL = install
  595. X               LD = ld
  596. X             LINT = lint
  597. X      LINTLIBFLAG = -C
  598. X         LINTOPTS = -axz
  599. X               LN = ln -s
  600. X             MAKE = make
  601. X               MV = mv
  602. X               CP = cp
  603. X
  604. X           RANLIB = ranlib
  605. X  RANLIBINSTFLAGS =
  606. X
  607. X               RM = rm -f
  608. X            TROFF = psroff
  609. X         MSMACROS = -ms
  610. X              TBL = tbl
  611. X              EQN = eqn
  612. X     STD_INCLUDES =
  613. X  STD_CPP_DEFINES = -D_NO_PROTO
  614. X      STD_DEFINES = -D_NO_PROTO
  615. X EXTRA_LOAD_FLAGS =
  616. X  EXTRA_LIBRARIES =
  617. X             TAGS = ctags
  618. X
  619. X    SHAREDCODEDEF = -DSHAREDCODE
  620. X         SHLIBDEF = -DSUNSHLIB
  621. X
  622. X    PROTO_DEFINES =
  623. X
  624. X     INSTPGMFLAGS =
  625. X
  626. X     INSTBINFLAGS = -m 0755
  627. X     INSTUIDFLAGS = -m 4755
  628. X     INSTLIBFLAGS = -m 0644
  629. X     INSTINCFLAGS = -m 0444
  630. X     INSTMANFLAGS = -m 0444
  631. X     INSTDATFLAGS = -m 0444
  632. X    INSTKMEMFLAGS = -g kmem -m 2755
  633. X
  634. X      PROJECTROOT = /usr/local
  635. X
  636. X     TOP_INCLUDES = -I$(INCROOT)
  637. X
  638. X      CDEBUGFLAGS = -O
  639. X        CCOPTIONS = -pipe
  640. X
  641. X      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
  642. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
  643. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  644. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  645. X
  646. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  647. X
  648. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
  649. X
  650. X   LDCOMBINEFLAGS = -X -r
  651. X      DEPENDFLAGS =
  652. X
  653. X        MACROFILE = sun.cf
  654. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  655. X
  656. X    IMAKE_DEFINES =
  657. X
  658. X         IRULESRC = $(CONFIGDIR)
  659. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  660. X
  661. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  662. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  663. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  664. X
  665. # -------------------------------------------------------------------------
  666. # X Window System Build Parameters
  667. # $XConsortium: Project.tmpl,v 1.138 91/09/10 09:02:12 rws Exp $
  668. X
  669. # -------------------------------------------------------------------------
  670. # X Window System make variables; this need to be coordinated with rules
  671. X
  672. X          PATHSEP = /
  673. X        USRLIBDIR = /usr/local/lib
  674. X           BINDIR = /usr/local/bin/X5
  675. X          INCROOT = /usr/local/include
  676. X     BUILDINCROOT = $(TOP)
  677. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  678. X      BUILDINCTOP = ..
  679. X           INCDIR = $(INCROOT)/X11
  680. X           ADMDIR = /usr/adm
  681. X           LIBDIR = $(USRLIBDIR)/X11
  682. X        CONFIGDIR = $(LIBDIR)/config
  683. X       LINTLIBDIR = $(USRLIBDIR)/lint
  684. X
  685. X          FONTDIR = $(LIBDIR)/fonts
  686. X         XINITDIR = $(LIBDIR)/xinit
  687. X           XDMDIR = $(LIBDIR)/xdm
  688. X           TWMDIR = $(LIBDIR)/twm
  689. X          MANPATH = /usr/local/man
  690. X    MANSOURCEPATH = $(MANPATH)/man
  691. X        MANSUFFIX = n
  692. X     LIBMANSUFFIX = 3
  693. X           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
  694. X        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
  695. X           NLSDIR = $(LIBDIR)/nls
  696. X        PEXAPIDIR = $(LIBDIR)/PEX
  697. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  698. X       FONTCFLAGS = -t
  699. X
  700. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  701. X
  702. X            IMAKE = imake
  703. X           DEPEND = makedepend
  704. X              RGB = rgb
  705. X
  706. X            FONTC = bdftopcf
  707. X
  708. X        MKFONTDIR = mkfontdir
  709. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier
  710. X
  711. X        CONFIGSRC = $(TOP)/config
  712. X       DOCUTILSRC = $(TOP)/doc/util
  713. X        CLIENTSRC = $(TOP)/clients
  714. X          DEMOSRC = $(TOP)/demos
  715. X           LIBSRC = $(TOP)/lib
  716. X          FONTSRC = $(TOP)/fonts
  717. X       INCLUDESRC = $(TOP)/X11
  718. X        SERVERSRC = $(TOP)/server
  719. X          UTILSRC = $(TOP)/util
  720. X        SCRIPTSRC = $(UTILSRC)/scripts
  721. X       EXAMPLESRC = $(TOP)/examples
  722. X       CONTRIBSRC = $(TOP)/../contrib
  723. X           DOCSRC = $(TOP)/doc
  724. X           RGBSRC = $(TOP)/rgb
  725. X        DEPENDSRC = $(UTILSRC)/makedepend
  726. X         IMAKESRC = $(CONFIGSRC)
  727. X         XAUTHSRC = $(LIBSRC)/Xau
  728. X          XLIBSRC = $(LIBSRC)/X
  729. X           XMUSRC = $(LIBSRC)/Xmu
  730. X       TOOLKITSRC = $(LIBSRC)/Xt
  731. X       AWIDGETSRC = $(LIBSRC)/Xaw
  732. X       OLDXLIBSRC = $(LIBSRC)/oldX
  733. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  734. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  735. X      BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
  736. X      BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
  737. X     MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
  738. X         FSLIBSRC = $(FONTSRC)/lib/fs
  739. X    FONTSERVERSRC = $(FONTSRC)/server
  740. X     EXTENSIONSRC = $(TOP)/extensions
  741. X         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
  742. X      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
  743. X
  744. # $XConsortium: sunLib.tmpl,v 1.14.1.1 92/03/17 14:58:46 rws Exp $
  745. X
  746. SHLIBLDFLAGS = -assert pure-text
  747. PICFLAGS = -pic
  748. X
  749. X  DEPEXTENSIONLIB =
  750. X     EXTENSIONLIB = -lXext
  751. X
  752. X          DEPXLIB = $(DEPEXTENSIONLIB)
  753. X             XLIB = $(EXTENSIONLIB) -lX11
  754. X
  755. X        DEPXMULIB = $(USRLIBDIR)/libXmu.sa.$(SOXMUREV)
  756. X       XMULIBONLY = -lXmu
  757. X           XMULIB = -lXmu
  758. X
  759. X       DEPOLDXLIB =
  760. X          OLDXLIB = -loldX
  761. X
  762. X      DEPXTOOLLIB = $(USRLIBDIR)/libXt.sa.$(SOXTREV)
  763. X         XTOOLLIB = -lXt
  764. X
  765. X        DEPXAWLIB = $(USRLIBDIR)/libXaw.sa.$(SOXAWREV)
  766. X           XAWLIB = -lXaw
  767. X
  768. X        DEPXILIB =
  769. X           XILIB = -lXi
  770. X
  771. X        SOXLIBREV = 4.10
  772. X          SOXTREV = 4.10
  773. X         SOXAWREV = 5.0
  774. X        SOOLDXREV = 4.10
  775. X         SOXMUREV = 4.10
  776. X        SOXEXTREV = 4.10
  777. X      SOXINPUTREV = 4.10
  778. X
  779. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  780. X         XAUTHLIB =  -lXau
  781. X      DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
  782. X         XDMCPLIB =  -lXdmcp
  783. X
  784. X        DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
  785. X           PHIGSLIB =  -lphigs
  786. X
  787. X       DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
  788. X          XBSDLIB =  -lXbsd
  789. X
  790. X LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
  791. X         LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
  792. X          LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
  793. X        LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
  794. X          LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
  795. X           LINTXI = $(LINTLIBDIR)/llib-lXi.ln
  796. X        LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
  797. X
  798. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  799. X
  800. X         DEPLIBS1 = $(DEPLIBS)
  801. X         DEPLIBS2 = $(DEPLIBS)
  802. X         DEPLIBS3 = $(DEPLIBS)
  803. X
  804. # -------------------------------------------------------------------------
  805. # Imake rules for building libraries, programs, scripts, and data files
  806. # rules:  $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
  807. X
  808. # -------------------------------------------------------------------------
  809. # start of Imakefile
  810. X
  811. SYS_XTPANELDIR = $(LIBDIR)/xtpanel
  812. X
  813. FILES = lister     choice      menubutton  text \
  814. X        all        dialog      message     scrollbar \
  815. X        button     list        slider        bitmap_browser \
  816. X        color_selector         graph       calculator \
  817. X        toggle    .bitmap_browser
  818. X
  819. install:: $(FILES)
  820. X    @if [ -d $(DESTDIR)$(SYS_XTPANELDIR)/examples/script ]; then set +x; \
  821. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(SYS_XTPANELDIR)/examples/script); fi
  822. X    @case '${MFLAGS}' in *[i]*) set +e;; esac; \
  823. X    for i in $(FILES); do \
  824. X    (set -x; $(INSTALL) -c -m 644 $$i $(DESTDIR)$(SYS_XTPANELDIR)/examples/script); \
  825. X    done
  826. X
  827. # -------------------------------------------------------------------------
  828. # common rules for all Makefiles - do not edit
  829. X
  830. emptyrule::
  831. X
  832. clean::
  833. X    $(RM_CMD) "#"*
  834. X
  835. Makefile::
  836. X    -@if [ -f Makefile ]; then set -x; \
  837. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  838. X    else exit 0; fi
  839. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  840. X
  841. tags::
  842. X    $(TAGS) -w *.[ch]
  843. X    $(TAGS) -xw *.[ch] > TAGS
  844. X
  845. saber:
  846. X    # load $(ALLDEFINES) $(SRCS)
  847. X
  848. osaber:
  849. X    # load $(ALLDEFINES) $(OBJS)
  850. X
  851. # -------------------------------------------------------------------------
  852. # empty rules for directories that do not have SUBDIRS - do not edit
  853. X
  854. install::
  855. X    @echo "install in $(CURRENT_DIR) done"
  856. X
  857. install.man::
  858. X    @echo "install.man in $(CURRENT_DIR) done"
  859. X
  860. Makefiles::
  861. X
  862. includes::
  863. X
  864. # -------------------------------------------------------------------------
  865. # dependencies generated by makedepend
  866. X
  867. SHAR_EOF
  868. chmod 0664 xtpanel/examples/script/Makefile ||
  869. echo 'restore of xtpanel/examples/script/Makefile failed'
  870. Wc_c="`wc -c < 'xtpanel/examples/script/Makefile'`"
  871. test 9953 -eq "$Wc_c" ||
  872.     echo 'xtpanel/examples/script/Makefile: original size 9953, current size' "$Wc_c"
  873. fi
  874. # ============= xtpanel/examples/script/button ==============
  875. if test -f 'xtpanel/examples/script/button' -a X"$1" != X"-c"; then
  876.     echo 'x - skipping xtpanel/examples/script/button (File already exists)'
  877. else
  878. echo 'x - extracting xtpanel/examples/script/button (Text)'
  879. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/button' &&
  880. button={ label=QUIT action=QUIT }
  881. button={ label="hit me" action="PRINT AARGH!" }
  882. SHAR_EOF
  883. chmod 0664 xtpanel/examples/script/button ||
  884. echo 'restore of xtpanel/examples/script/button failed'
  885. Wc_c="`wc -c < 'xtpanel/examples/script/button'`"
  886. test 82 -eq "$Wc_c" ||
  887.     echo 'xtpanel/examples/script/button: original size 82, current size' "$Wc_c"
  888. fi
  889. # ============= xtpanel/examples/script/graph ==============
  890. if test -f 'xtpanel/examples/script/graph' -a X"$1" != X"-c"; then
  891.     echo 'x - skipping xtpanel/examples/script/graph (File already exists)'
  892. else
  893. echo 'x - extracting xtpanel/examples/script/graph (Text)'
  894. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/graph' &&
  895. button={ label=QUIT action=QUIT }
  896. vbox={ name=noborder
  897. message={ value="Below is a graph object." }
  898. message={ value="You can adjust the scrollbars individually with the" }
  899. message={ value="mouse, or hold down the meta key to ""draw"". " }
  900. graph={ nsamp=50 action="PRINT $val" max=100 min=0 format="%.0f" 
  901. X    value=50 
  902. X        label=""
  903. X    orientation=vertical
  904. X    foreground=red
  905. X        height=10 width=300 }
  906. }
  907. button={ label="Reset values" action="ASSIGN graph1 50" }
  908. button={ label="Print values" action="PRINT $graph1" }
  909. SHAR_EOF
  910. chmod 0664 xtpanel/examples/script/graph ||
  911. echo 'restore of xtpanel/examples/script/graph failed'
  912. Wc_c="`wc -c < 'xtpanel/examples/script/graph'`"
  913. test 516 -eq "$Wc_c" ||
  914.     echo 'xtpanel/examples/script/graph: original size 516, current size' "$Wc_c"
  915. fi
  916. # ============= xtpanel/examples/script/dialog ==============
  917. if test -f 'xtpanel/examples/script/dialog' -a X"$1" != X"-c"; then
  918.     echo 'x - skipping xtpanel/examples/script/dialog (File already exists)'
  919. else
  920. echo 'x - extracting xtpanel/examples/script/dialog (Text)'
  921. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/dialog' &&
  922. button={ label=quit action=QUIT }
  923. dialog={ name=diag label="what is your favorite color?" value="red" 
  924. X    action="PRINT Your favorite color is $val" 
  925. X    action="SET diag background $val" }
  926. X
  927. SHAR_EOF
  928. chmod 0664 xtpanel/examples/script/dialog ||
  929. echo 'restore of xtpanel/examples/script/dialog failed'
  930. Wc_c="`wc -c < 'xtpanel/examples/script/dialog'`"
  931. test 186 -eq "$Wc_c" ||
  932.     echo 'xtpanel/examples/script/dialog: original size 186, current size' "$Wc_c"
  933. fi
  934. # ============= xtpanel/examples/script/color_selector ==============
  935. if test -f 'xtpanel/examples/script/color_selector' -a X"$1" != X"-c"; then
  936.     echo 'x - skipping xtpanel/examples/script/color_selector (File already exists)'
  937. else
  938. echo 'x - extracting xtpanel/examples/script/color_selector (Text)'
  939. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/color_selector' &&
  940. X
  941. button={ label=DONE action=QUIT }
  942. X
  943. button={ 
  944. X  label="select a color, then press foreground/background/border to change me"
  945. X  name=test
  946. }
  947. X
  948. var={ name=testcolor }
  949. X
  950. vbox={ name=noborder
  951. hbox={ name=noborder
  952. button={ label=foreground action="SET test foreground $testcolor" 
  953. action="ASSIGN fgname $testcolor" 
  954. }
  955. message={ name=fgname value=black }
  956. }
  957. hbox={ name=noborder
  958. button={ label=background action="SET test background $testcolor" 
  959. action="ASSIGN bgname $testcolor" 
  960. }
  961. message={ name=bgname value=white }
  962. }
  963. hbox={ name=noborder
  964. button={ label=border action="SET test borderColor $testcolor" 
  965. action="ASSIGN bordername $testcolor" 
  966. }
  967. message={ name=bordername value=black }
  968. }
  969. X
  970. list={ name=name label="COLORS" 
  971. X  action="SET name background $val"
  972. X  action="ASSIGN testcolor $val"
  973. X  height=300 width=400
  974. X  value=snow
  975. X  itemlist={ 
  976. X  separator="\n"
  977. X  list="
  978. snow
  979. ghost white
  980. GhostWhite
  981. white smoke
  982. WhiteSmoke
  983. gainsboro
  984. floral white
  985. FloralWhite
  986. old lace
  987. OldLace
  988. linen
  989. antique white
  990. AntiqueWhite
  991. papaya whip
  992. PapayaWhip
  993. blanched almond
  994. BlanchedAlmond
  995. bisque
  996. peach puff
  997. PeachPuff
  998. navajo white
  999. NavajoWhite
  1000. moccasin
  1001. cornsilk
  1002. ivory
  1003. lemon chiffon
  1004. LemonChiffon
  1005. seashell
  1006. honeydew
  1007. mint cream
  1008. MintCream
  1009. azure
  1010. alice blue
  1011. AliceBlue
  1012. lavender
  1013. lavender blush
  1014. LavenderBlush
  1015. misty rose
  1016. MistyRose
  1017. white
  1018. black
  1019. dark slate
  1020. DarkSlateGray
  1021. dark slate
  1022. DarkSlateGrey
  1023. dim gray
  1024. DimGray
  1025. dim grey
  1026. DimGrey
  1027. slate gray
  1028. SlateGray
  1029. slate grey
  1030. SlateGrey
  1031. light slate
  1032. LightSlateGray
  1033. light slate
  1034. LightSlateGrey
  1035. gray
  1036. grey
  1037. light grey
  1038. LightGrey
  1039. light gray
  1040. LightGray
  1041. midnight blue
  1042. MidnightBlue
  1043. navy
  1044. navy blue
  1045. NavyBlue
  1046. cornflower blue
  1047. CornflowerBlue
  1048. dark slate
  1049. DarkSlateBlue
  1050. slate blue
  1051. SlateBlue
  1052. medium slate
  1053. MediumSlateBlue
  1054. light slate
  1055. LightSlateBlue
  1056. medium blue
  1057. MediumBlue
  1058. royal blue
  1059. RoyalBlue
  1060. blue
  1061. dodger blue
  1062. DodgerBlue
  1063. deep sky
  1064. DeepSkyBlue
  1065. sky blue
  1066. SkyBlue
  1067. light sky
  1068. LightSkyBlue
  1069. steel blue
  1070. SteelBlue
  1071. light steel
  1072. LightSteelBlue
  1073. light blue
  1074. LightBlue
  1075. powder blue
  1076. PowderBlue
  1077. pale turquoise
  1078. PaleTurquoise
  1079. dark turquoise
  1080. DarkTurquoise
  1081. medium turquoise
  1082. MediumTurquoise
  1083. turquoise
  1084. cyan
  1085. light cyan
  1086. LightCyan
  1087. cadet blue
  1088. CadetBlue
  1089. medium aquamarine
  1090. MediumAquamarine
  1091. aquamarine
  1092. dark green
  1093. DarkGreen
  1094. dark olive
  1095. DarkOliveGreen
  1096. dark sea
  1097. DarkSeaGreen
  1098. sea green
  1099. SeaGreen
  1100. medium sea
  1101. MediumSeaGreen
  1102. light sea
  1103. LightSeaGreen
  1104. pale green
  1105. PaleGreen
  1106. spring green
  1107. SpringGreen
  1108. lawn green
  1109. LawnGreen
  1110. green
  1111. chartreuse
  1112. medium spring
  1113. MediumSpringGreen
  1114. green yellow
  1115. GreenYellow
  1116. lime green
  1117. LimeGreen
  1118. yellow green
  1119. YellowGreen
  1120. forest green
  1121. ForestGreen
  1122. olive drab
  1123. OliveDrab
  1124. dark khaki
  1125. DarkKhaki
  1126. khaki
  1127. pale goldenrod
  1128. PaleGoldenrod
  1129. light goldenrod
  1130. LightGoldenrodYellow
  1131. light yellow
  1132. LightYellow
  1133. yellow
  1134. gold
  1135. light goldenrod
  1136. LightGoldenrod
  1137. goldenrod
  1138. dark goldenrod
  1139. DarkGoldenrod
  1140. rosy brown
  1141. RosyBrown
  1142. indian red
  1143. IndianRed
  1144. saddle brown
  1145. SaddleBrown
  1146. sienna
  1147. peru
  1148. burlywood
  1149. beige
  1150. wheat
  1151. sandy brown
  1152. SandyBrown
  1153. tan
  1154. chocolate
  1155. firebrick
  1156. brown
  1157. dark salmon
  1158. DarkSalmon
  1159. salmon
  1160. light salmon
  1161. LightSalmon
  1162. orange
  1163. dark orange
  1164. DarkOrange
  1165. coral
  1166. light coral
  1167. LightCoral
  1168. tomato
  1169. orange red
  1170. OrangeRed
  1171. red
  1172. hot pink
  1173. HotPink
  1174. deep pink
  1175. DeepPink
  1176. pink
  1177. light pink
  1178. LightPink
  1179. pale violet
  1180. PaleVioletRed
  1181. maroon
  1182. medium violet
  1183. MediumVioletRed
  1184. violet red
  1185. VioletRed
  1186. magenta
  1187. violet
  1188. plum
  1189. orchid
  1190. medium orchid
  1191. MediumOrchid
  1192. dark orchid
  1193. DarkOrchid
  1194. dark violet
  1195. DarkViolet
  1196. blue violet
  1197. BlueViolet
  1198. purple
  1199. medium purple
  1200. MediumPurple
  1201. thistle
  1202. snow1
  1203. snow2
  1204. snow3
  1205. snow4
  1206. seashell1
  1207. seashell2
  1208. seashell3
  1209. seashell4
  1210. AntiqueWhite1
  1211. AntiqueWhite2
  1212. AntiqueWhite3
  1213. AntiqueWhite4
  1214. bisque1
  1215. bisque2
  1216. bisque3
  1217. bisque4
  1218. PeachPuff1
  1219. PeachPuff2
  1220. PeachPuff3
  1221. PeachPuff4
  1222. NavajoWhite1
  1223. NavajoWhite2
  1224. NavajoWhite3
  1225. NavajoWhite4
  1226. LemonChiffon1
  1227. LemonChiffon2
  1228. LemonChiffon3
  1229. LemonChiffon4
  1230. cornsilk1
  1231. cornsilk2
  1232. cornsilk3
  1233. cornsilk4
  1234. ivory1
  1235. ivory2
  1236. ivory3
  1237. ivory4
  1238. honeydew1
  1239. honeydew2
  1240. honeydew3
  1241. honeydew4
  1242. LavenderBlush1
  1243. LavenderBlush2
  1244. LavenderBlush3
  1245. LavenderBlush4
  1246. MistyRose1
  1247. MistyRose2
  1248. MistyRose3
  1249. MistyRose4
  1250. azure1
  1251. azure2
  1252. azure3
  1253. azure4
  1254. SlateBlue1
  1255. SlateBlue2
  1256. SlateBlue3
  1257. SlateBlue4
  1258. RoyalBlue1
  1259. RoyalBlue2
  1260. RoyalBlue3
  1261. RoyalBlue4
  1262. blue1
  1263. blue2
  1264. blue3
  1265. blue4
  1266. DodgerBlue1
  1267. DodgerBlue2
  1268. DodgerBlue3
  1269. DodgerBlue4
  1270. SteelBlue1
  1271. SteelBlue2
  1272. SteelBlue3
  1273. SteelBlue4
  1274. DeepSkyBlue1
  1275. DeepSkyBlue2
  1276. DeepSkyBlue3
  1277. DeepSkyBlue4
  1278. SkyBlue1
  1279. SkyBlue2
  1280. SkyBlue3
  1281. SkyBlue4
  1282. LightSkyBlue1
  1283. LightSkyBlue2
  1284. LightSkyBlue3
  1285. LightSkyBlue4
  1286. SlateGray1
  1287. SlateGray2
  1288. SlateGray3
  1289. SlateGray4
  1290. LightSteelBlue1
  1291. LightSteelBlue2
  1292. LightSteelBlue3
  1293. LightSteelBlue4
  1294. LightBlue1
  1295. LightBlue2
  1296. LightBlue3
  1297. LightBlue4
  1298. LightCyan1
  1299. LightCyan2
  1300. LightCyan3
  1301. LightCyan4
  1302. PaleTurquoise1
  1303. PaleTurquoise2
  1304. PaleTurquoise3
  1305. PaleTurquoise4
  1306. CadetBlue1
  1307. CadetBlue2
  1308. CadetBlue3
  1309. CadetBlue4
  1310. turquoise1
  1311. turquoise2
  1312. turquoise3
  1313. turquoise4
  1314. cyan1
  1315. cyan2
  1316. cyan3
  1317. cyan4
  1318. DarkSlateGray1
  1319. DarkSlateGray2
  1320. DarkSlateGray3
  1321. DarkSlateGray4
  1322. aquamarine1
  1323. aquamarine2
  1324. aquamarine3
  1325. aquamarine4
  1326. DarkSeaGreen1
  1327. DarkSeaGreen2
  1328. DarkSeaGreen3
  1329. DarkSeaGreen4
  1330. SeaGreen1
  1331. SeaGreen2
  1332. SeaGreen3
  1333. SeaGreen4
  1334. PaleGreen1
  1335. PaleGreen2
  1336. PaleGreen3
  1337. PaleGreen4
  1338. SpringGreen1
  1339. SpringGreen2
  1340. SpringGreen3
  1341. SpringGreen4
  1342. green1
  1343. green2
  1344. green3
  1345. green4
  1346. chartreuse1
  1347. chartreuse2
  1348. chartreuse3
  1349. chartreuse4
  1350. OliveDrab1
  1351. OliveDrab2
  1352. OliveDrab3
  1353. OliveDrab4
  1354. DarkOliveGreen1
  1355. DarkOliveGreen2
  1356. DarkOliveGreen3
  1357. DarkOliveGreen4
  1358. khaki1
  1359. khaki2
  1360. khaki3
  1361. khaki4
  1362. LightGoldenrod1
  1363. LightGoldenrod2
  1364. LightGoldenrod3
  1365. LightGoldenrod4
  1366. LightYellow1
  1367. LightYellow2
  1368. LightYellow3
  1369. LightYellow4
  1370. yellow1
  1371. yellow2
  1372. yellow3
  1373. yellow4
  1374. gold1
  1375. gold2
  1376. gold3
  1377. gold4
  1378. goldenrod1
  1379. goldenrod2
  1380. goldenrod3
  1381. goldenrod4
  1382. DarkGoldenrod1
  1383. DarkGoldenrod2
  1384. DarkGoldenrod3
  1385. DarkGoldenrod4
  1386. RosyBrown1
  1387. RosyBrown2
  1388. RosyBrown3
  1389. RosyBrown4
  1390. IndianRed1
  1391. IndianRed2
  1392. IndianRed3
  1393. IndianRed4
  1394. sienna1
  1395. sienna2
  1396. sienna3
  1397. sienna4
  1398. burlywood1
  1399. burlywood2
  1400. burlywood3
  1401. burlywood4
  1402. wheat1
  1403. wheat2
  1404. wheat3
  1405. wheat4
  1406. tan1
  1407. tan2
  1408. tan3
  1409. tan4
  1410. chocolate1
  1411. chocolate2
  1412. chocolate3
  1413. chocolate4
  1414. firebrick1
  1415. firebrick2
  1416. firebrick3
  1417. firebrick4
  1418. brown1
  1419. brown2
  1420. brown3
  1421. brown4
  1422. salmon1
  1423. salmon2
  1424. salmon3
  1425. salmon4
  1426. LightSalmon1
  1427. LightSalmon2
  1428. LightSalmon3
  1429. LightSalmon4
  1430. orange1
  1431. orange2
  1432. orange3
  1433. orange4
  1434. DarkOrange1
  1435. DarkOrange2
  1436. DarkOrange3
  1437. DarkOrange4
  1438. coral1
  1439. coral2
  1440. coral3
  1441. coral4
  1442. tomato1
  1443. tomato2
  1444. tomato3
  1445. tomato4
  1446. OrangeRed1
  1447. OrangeRed2
  1448. OrangeRed3
  1449. OrangeRed4
  1450. red1
  1451. red2
  1452. red3
  1453. red4
  1454. DeepPink1
  1455. DeepPink2
  1456. DeepPink3
  1457. DeepPink4
  1458. HotPink1
  1459. HotPink2
  1460. HotPink3
  1461. HotPink4
  1462. pink1
  1463. pink2
  1464. pink3
  1465. pink4
  1466. LightPink1
  1467. LightPink2
  1468. LightPink3
  1469. LightPink4
  1470. PaleVioletRed1
  1471. PaleVioletRed2
  1472. PaleVioletRed3
  1473. PaleVioletRed4
  1474. maroon1
  1475. maroon2
  1476. maroon3
  1477. maroon4
  1478. VioletRed1
  1479. VioletRed2
  1480. VioletRed3
  1481. VioletRed4
  1482. magenta1
  1483. magenta2
  1484. magenta3
  1485. magenta4
  1486. orchid1
  1487. orchid2
  1488. orchid3
  1489. orchid4
  1490. plum1
  1491. plum2
  1492. plum3
  1493. plum4
  1494. MediumOrchid1
  1495. MediumOrchid2
  1496. MediumOrchid3
  1497. MediumOrchid4
  1498. DarkOrchid1
  1499. DarkOrchid2
  1500. DarkOrchid3
  1501. DarkOrchid4
  1502. purple1
  1503. purple2
  1504. purple3
  1505. purple4
  1506. MediumPurple1
  1507. MediumPurple2
  1508. MediumPurple3
  1509. MediumPurple4
  1510. thistle1
  1511. thistle2
  1512. thistle3
  1513. thistle4
  1514. gray0
  1515. grey0
  1516. gray1
  1517. grey1
  1518. gray2
  1519. grey2
  1520. gray3
  1521. grey3
  1522. gray4
  1523. grey4
  1524. gray5
  1525. grey5
  1526. gray6
  1527. grey6
  1528. gray7
  1529. grey7
  1530. gray8
  1531. grey8
  1532. gray9
  1533. grey9
  1534. gray10
  1535. grey10
  1536. gray11
  1537. grey11
  1538. gray12
  1539. grey12
  1540. gray13
  1541. grey13
  1542. gray14
  1543. grey14
  1544. gray15
  1545. grey15
  1546. gray16
  1547. grey16
  1548. gray17
  1549. grey17
  1550. gray18
  1551. grey18
  1552. gray19
  1553. grey19
  1554. gray20
  1555. grey20
  1556. gray21
  1557. grey21
  1558. gray22
  1559. grey22
  1560. gray23
  1561. grey23
  1562. gray24
  1563. grey24
  1564. gray25
  1565. grey25
  1566. gray26
  1567. grey26
  1568. gray27
  1569. grey27
  1570. gray28
  1571. grey28
  1572. gray29
  1573. grey29
  1574. gray30
  1575. grey30
  1576. gray31
  1577. grey31
  1578. gray32
  1579. grey32
  1580. gray33
  1581. grey33
  1582. gray34
  1583. grey34
  1584. gray35
  1585. grey35
  1586. gray36
  1587. grey36
  1588. gray37
  1589. grey37
  1590. gray38
  1591. grey38
  1592. gray39
  1593. grey39
  1594. gray40
  1595. grey40
  1596. gray41
  1597. grey41
  1598. gray42
  1599. grey42
  1600. gray43
  1601. grey43
  1602. gray44
  1603. grey44
  1604. gray45
  1605. grey45
  1606. gray46
  1607. grey46
  1608. gray47
  1609. grey47
  1610. gray48
  1611. grey48
  1612. gray49
  1613. grey49
  1614. gray50
  1615. grey50
  1616. gray51
  1617. grey51
  1618. gray52
  1619. grey52
  1620. gray53
  1621. grey53
  1622. gray54
  1623. grey54
  1624. gray55
  1625. grey55
  1626. gray56
  1627. grey56
  1628. gray57
  1629. grey57
  1630. gray58
  1631. grey58
  1632. gray59
  1633. grey59
  1634. gray60
  1635. grey60
  1636. gray61
  1637. grey61
  1638. gray62
  1639. grey62
  1640. gray63
  1641. grey63
  1642. gray64
  1643. grey64
  1644. gray65
  1645. grey65
  1646. gray66
  1647. grey66
  1648. gray67
  1649. grey67
  1650. gray68
  1651. grey68
  1652. gray69
  1653. grey69
  1654. gray70
  1655. grey70
  1656. gray71
  1657. grey71
  1658. gray72
  1659. grey72
  1660. gray73
  1661. grey73
  1662. gray74
  1663. grey74
  1664. gray75
  1665. grey75
  1666. gray76
  1667. grey76
  1668. gray77
  1669. grey77
  1670. gray78
  1671. grey78
  1672. gray79
  1673. grey79
  1674. gray80
  1675. grey80
  1676. gray81
  1677. grey81
  1678. gray82
  1679. grey82
  1680. gray83
  1681. grey83
  1682. gray84
  1683. grey84
  1684. gray85
  1685. grey85
  1686. gray86
  1687. grey86
  1688. gray87
  1689. grey87
  1690. gray88
  1691. grey88
  1692. gray89
  1693. grey89
  1694. gray90
  1695. grey90
  1696. gray91
  1697. grey91
  1698. gray92
  1699. grey92
  1700. gray93
  1701. grey93
  1702. gray94
  1703. grey94
  1704. gray95
  1705. grey95
  1706. gray96
  1707. grey96
  1708. gray97
  1709. grey97
  1710. gray98
  1711. grey98
  1712. gray99
  1713. grey99
  1714. gray100
  1715. grey100"
  1716. X  }
  1717. }
  1718. }
  1719. SHAR_EOF
  1720. chmod 0664 xtpanel/examples/script/color_selector ||
  1721. echo 'restore of xtpanel/examples/script/color_selector failed'
  1722. Wc_c="`wc -c < 'xtpanel/examples/script/color_selector'`"
  1723. test 7975 -eq "$Wc_c" ||
  1724.     echo 'xtpanel/examples/script/color_selector: original size 7975, current size' "$Wc_c"
  1725. fi
  1726. # ============= xtpanel/examples/script/.bitmap_browser ==============
  1727. if test -f 'xtpanel/examples/script/.bitmap_browser' -a X"$1" != X"-c"; then
  1728.     echo 'x - skipping xtpanel/examples/script/.bitmap_browser (File already exists)'
  1729. else
  1730. echo 'x - extracting xtpanel/examples/script/.bitmap_browser (Text)'
  1731. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/.bitmap_browser' &&
  1732. button={ label=DONE action=QUIT }
  1733. message={ name=thebitmap label=" " height=200 width=200 }
  1734. list={ label="click on files that are bitmaps" height=400 width=400 
  1735. X  action="SET thebitmap bitmap $val"
  1736. X  itemlist={ list=`echo -n * ` separator=" " }
  1737. }
  1738. SHAR_EOF
  1739. chmod 0664 xtpanel/examples/script/.bitmap_browser ||
  1740. echo 'restore of xtpanel/examples/script/.bitmap_browser failed'
  1741. Wc_c="`wc -c < 'xtpanel/examples/script/.bitmap_browser'`"
  1742. test 247 -eq "$Wc_c" ||
  1743.     echo 'xtpanel/examples/script/.bitmap_browser: original size 247, current size' "$Wc_c"
  1744. fi
  1745. # ============= xtpanel/examples/script/calculator ==============
  1746. if test -f 'xtpanel/examples/script/calculator' -a X"$1" != X"-c"; then
  1747.     echo 'x - skipping xtpanel/examples/script/calculator (File already exists)'
  1748. else
  1749. echo 'x - extracting xtpanel/examples/script/calculator (Text)'
  1750. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/calculator' &&
  1751. button={ label=Quit action=QUIT }
  1752. var={ name=calc value=" | bc -l " }
  1753. var={ name=trigcon value="*3.14159265/180" }
  1754. var={ name=buffer value="" }
  1755. var={ name=todisp value="" }
  1756. var={ name=tobuff value="" }
  1757. hbox={ name=noborder
  1758. vbox={ name=noborder
  1759. vbox={ 
  1760. message={ value="Display" }
  1761. text={ name=display value="0" height=50 width=300 }
  1762. }
  1763. vbox={
  1764. message={ value="Memory" }
  1765. text={ name=mem value="0" height=50 width=300 }
  1766. }
  1767. }
  1768. vbox={ name=noborder
  1769. button={ label="Clear display" action="ASSIGN display 0" }
  1770. button={ label="Clear memory " action="ASSIGN mem 0" }
  1771. button={ label="Clear all    " action="ASSIGN display 0" 
  1772. X      action="ASSIGN buffer " action="ASSIGN mem 0" 
  1773. X      action="ASSIGN todisp " action="ASSIGN tobuff " }
  1774. choice={ label="Trig units" action="ASSIGN trigcon $val"
  1775. X    item={ label="DEG" value="*3.14159265/180" }
  1776. X    item={ label="RAD" value="" }
  1777. }
  1778. }
  1779. }
  1780. hbox={ name=noborder
  1781. vbox={ name=noborder
  1782. hbox={ name=noborder
  1783. button={ label=" 7 " 
  1784. X action="ASSIGN todisp $(todisp)7" 
  1785. X action="ASSIGN display $(todisp)" 
  1786. X action="ASSIGN tobuff $(display)" 
  1787. }
  1788. button={ label=" 8 " 
  1789. X action="ASSIGN todisp $(todisp)8" 
  1790. X action="ASSIGN display $(todisp)" 
  1791. X action="ASSIGN tobuff $(display)" 
  1792. }
  1793. button={ label=" 9 " 
  1794. X action="ASSIGN todisp $(todisp)9" 
  1795. X action="ASSIGN display $(todisp)" 
  1796. X action="ASSIGN tobuff $(display)" 
  1797. }
  1798. }
  1799. hbox={ name=noborder
  1800. button={ label=" 4 " 
  1801. X action="ASSIGN todisp $(todisp)4" 
  1802. X action="ASSIGN display $(todisp)" 
  1803. X action="ASSIGN tobuff $(display)" 
  1804. }
  1805. button={ label=" 5 " 
  1806. X action="ASSIGN todisp $(todisp)5" 
  1807. X action="ASSIGN display $(todisp)" 
  1808. X action="ASSIGN tobuff $(display)" 
  1809. }
  1810. button={ label=" 6 " 
  1811. X action="ASSIGN todisp $(todisp)6" 
  1812. X action="ASSIGN display $(todisp)" 
  1813. X action="ASSIGN tobuff $(display)" 
  1814. }
  1815. }
  1816. hbox={ name=noborder
  1817. button={ label=" 1 " 
  1818. X action="ASSIGN todisp $(todisp)1" 
  1819. X action="ASSIGN display $(todisp)" 
  1820. X action="ASSIGN tobuff $(display)" 
  1821. }
  1822. button={ label=" 2 " 
  1823. X action="ASSIGN todisp $(todisp)2" 
  1824. X action="ASSIGN display $(todisp)" 
  1825. X action="ASSIGN tobuff $(display)" 
  1826. }
  1827. button={ label=" 3 " 
  1828. X action="ASSIGN todisp $(todisp)3" 
  1829. X action="ASSIGN display $(todisp)" 
  1830. X action="ASSIGN tobuff $(display)" 
  1831. }
  1832. }
  1833. hbox={ name=noborder
  1834. button={ label=" 0 " 
  1835. X action="ASSIGN todisp $(todisp)0" 
  1836. X action="ASSIGN display $(todisp)" 
  1837. X action="ASSIGN tobuff $(display)" 
  1838. }
  1839. button={ label=" . " 
  1840. X action="ASSIGN todisp $(todisp)." 
  1841. X action="ASSIGN display $(todisp)" 
  1842. X action="ASSIGN tobuff $(display)" 
  1843. }
  1844. button={ label="+/-" 
  1845. X action="ASSIGN display `echo ""-$(display)"" | sed -e 's,--,,g' `" 
  1846. X action="ASSIGN tobuff $(display)" 
  1847. }
  1848. }
  1849. }
  1850. vbox={ name=noborder
  1851. button={ label=" + " 
  1852. X action="ASSIGN buffer $(buffer)$(tobuff)+" action="ASSIGN todisp " }
  1853. button={ label=" - " 
  1854. X action="ASSIGN buffer $(buffer)$(tobuff)-" action="ASSIGN todisp " }
  1855. button={ label=" * " 
  1856. X action="ASSIGN buffer $(buffer)$(tobuff)*" action="ASSIGN todisp " }
  1857. button={ label=" / " 
  1858. X action="ASSIGN buffer $(buffer)$(tobuff)/" action="ASSIGN todisp " }
  1859. button={ label=" = " 
  1860. X action="ASSIGN buffer $(buffer)$(tobuff)" 
  1861. X action="ASSIGN display `echo ""$(buffer)"" $calc  `" 
  1862. X action="ASSIGN buffer "  
  1863. X action="ASSIGN tobuff $(display) "  
  1864. X action="ASSIGN todisp " }
  1865. }
  1866. vbox={ name=noborder
  1867. hbox={ name=noborder
  1868. button={ label="x^2" 
  1869. X action="ASSIGN display `echo ""$(display)^2"" $calc `"
  1870. X action="ASSIGN tobuff $(display) "  
  1871. }
  1872. button={ label="SQT" 
  1873. X action="ASSIGN display `echo ""sqrt($(display))"" $calc `"
  1874. X action="ASSIGN tobuff $(display) "  
  1875. }
  1876. button={ label="1/x" 
  1877. X action="ASSIGN display `echo ""1/$(display)"" $calc `"
  1878. X action="ASSIGN tobuff $(display) "  
  1879. }
  1880. button={ label="x^y" 
  1881. X action="ASSIGN buffer $(buffer)$(display)^" action="ASSIGN todisp "
  1882. }
  1883. }
  1884. hbox={ name=noborder
  1885. button={ label=" ( " 
  1886. X action="ASSIGN buffer $(buffer)(" action="ASSIGN todisp "
  1887. X action="ASSIGN tobuff " }
  1888. button={ label=" ) " 
  1889. X action="ASSIGN buffer $(buffer)$(tobuff))" action="ASSIGN todisp "
  1890. X action="ASSIGN tobuff " }
  1891. button={ label="e^x" 
  1892. X action="ASSIGN display `echo ""e($(display))"" $calc `"
  1893. X action="ASSIGN tobuff $(display) "  }
  1894. button={ label=" ln" action="ASSIGN display `echo ""l($(display))"" $calc `"
  1895. X action="ASSIGN tobuff $(display) "  }
  1896. }
  1897. hbox={ name=noborder
  1898. button={ label="sin" 
  1899. X action="ASSIGN display `echo ""s($(display)$(trigcon))"" $calc `"
  1900. X action="ASSIGN tobuff $(display) "  }
  1901. button={ label="cos" 
  1902. X action="ASSIGN display `echo ""c($(display)$(trigcon))"" $calc `"
  1903. X action="ASSIGN tobuff $(display) "  }
  1904. button={ label="tan" 
  1905. X action="ASSIGN display \
  1906. X `echo ""s($(display)$(trigcon))/c($(display)$(trigcon))"" $calc `"
  1907. X action="ASSIGN tobuff $(display) "  }
  1908. button={ label=" PI" action="ASSIGN display 3.14159265" 
  1909. X action="ASSIGN tobuff $(display) "  }
  1910. }
  1911. hbox={ name=noborder
  1912. var={ name=temp value="" }
  1913. button={ label="STO" action="ASSIGN mem $display" 
  1914. X action="ASSIGN todisp " }
  1915. button={ label="RCL" action="ASSIGN display $mem" 
  1916. X action="ASSIGN tobuff $(display) "  }
  1917. button={ label="SUM" action="ASSIGN mem `echo ""$mem + $display"" $calc `" 
  1918. X action="ASSIGN todisp " }
  1919. button={ label="EXC" 
  1920. X action="ASSIGN temp $mem" 
  1921. X action="ASSIGN mem $display" action="ASSIGN display $temp" 
  1922. X action="ASSIGN todisp " 
  1923. X action="ASSIGN tobuff $(display) "  }
  1924. }
  1925. }
  1926. }
  1927. SHAR_EOF
  1928. chmod 0664 xtpanel/examples/script/calculator ||
  1929. echo 'restore of xtpanel/examples/script/calculator failed'
  1930. Wc_c="`wc -c < 'xtpanel/examples/script/calculator'`"
  1931. test 5191 -eq "$Wc_c" ||
  1932.     echo 'xtpanel/examples/script/calculator: original size 5191, current size' "$Wc_c"
  1933. fi
  1934. # ============= xtpanel/examples/script/toggle ==============
  1935. if test -f 'xtpanel/examples/script/toggle' -a X"$1" != X"-c"; then
  1936.     echo 'x - skipping xtpanel/examples/script/toggle (File already exists)'
  1937. else
  1938. echo 'x - extracting xtpanel/examples/script/toggle (Text)'
  1939. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/toggle' &&
  1940. button={ label=QUIT action=QUIT }
  1941. toggle={ label="toggle me" name=mytoggle value="the toggle is on" 
  1942. X  action="ASSIGN mymessage $val"
  1943. }
  1944. message={ name=mymessage value="                " }
  1945. SHAR_EOF
  1946. chmod 0664 xtpanel/examples/script/toggle ||
  1947. echo 'restore of xtpanel/examples/script/toggle failed'
  1948. Wc_c="`wc -c < 'xtpanel/examples/script/toggle'`"
  1949. test 188 -eq "$Wc_c" ||
  1950.     echo 'xtpanel/examples/script/toggle: original size 188, current size' "$Wc_c"
  1951. fi
  1952. # ============= xtpanel/examples/script/bitmap_browser ==============
  1953. if test -f 'xtpanel/examples/script/bitmap_browser' -a X"$1" != X"-c"; then
  1954.     echo 'x - skipping xtpanel/examples/script/bitmap_browser (File already exists)'
  1955. else
  1956. echo 'x - extracting xtpanel/examples/script/bitmap_browser (Text)'
  1957. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/examples/script/bitmap_browser' &&
  1958. X
  1959. button={ label=QUIT action=QUIT }
  1960. X
  1961. message={ value="Enter name of directory containing bitmaps." }
  1962. message={ value="This brings up a second panel where you can browse them." }
  1963. vbox={ name=noborder
  1964. text={ name=dir height=25 width=400 editType=edit
  1965. X value="/usr/local/include/X11/bitmaps" 
  1966. }
  1967. button={ label="Go" 
  1968. X action="cd $(dir); xtpanel -file examples/script/.bitmap_browser"
  1969. }
  1970. }
  1971. SHAR_EOF
  1972. chmod 0664 xtpanel/examples/script/bitmap_browser ||
  1973. echo 'restore of xtpanel/examples/script/bitmap_browser failed'
  1974. Wc_c="`wc -c < 'xtpanel/examples/script/bitmap_browser'`"
  1975. test 383 -eq "$Wc_c" ||
  1976.     echo 'xtpanel/examples/script/bitmap_browser: original size 383, current size' "$Wc_c"
  1977. fi
  1978. true || echo 'restore of xtpanel/examples/Makefile failed'
  1979. echo End of part 1, continue with part 2
  1980. exit 0
  1981. -----------------------------------------------------------------
  1982. Steve Cole  (steve@sep.stanford.edu, apple!sep!steve)
  1983. Department of Geophysics, Stanford University, Stanford, CA 94305
  1984.