home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / 2584 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  52.8 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 08/10
  5. Followup-To: alt.sources.d
  6. Date: 21 Nov 1992 00:34:09 GMT
  7. Organization: Stanford Exploration Project
  8. Lines: 1268
  9. Distribution: world
  10. Message-ID: <1ek061INN194@morrow.stanford.edu>
  11. NNTP-Posting-Host: taal.stanford.edu
  12.  
  13.  
  14. Submitted-by: steve@sep.Stanford.EDU
  15. Archive-name: xtpanel/part08
  16.  
  17. #!/bin/sh
  18. # This is part 08 of a multipart archive
  19. # ============= xtpanel/help/button ==============
  20. if test ! -d 'xtpanel'; then
  21.     echo 'x - creating directory xtpanel'
  22.     mkdir 'xtpanel'
  23. fi
  24. if test ! -d 'xtpanel/help'; then
  25.     echo 'x - creating directory xtpanel/help'
  26.     mkdir 'xtpanel/help'
  27. fi
  28. if test -f 'xtpanel/help/button' -a X"$1" != X"-c"; then
  29.     echo 'x - skipping xtpanel/help/button (File already exists)'
  30. else
  31. echo 'x - extracting xtpanel/help/button (Text)'
  32. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/button' &&
  33. X
  34. X     button
  35. X        Button is the first of the interactive objects.  Pressing
  36. X        the button will cause a specified action to take place.
  37. X
  38. X        button={ label=... value=... name=... action=... }
  39. X
  40. X        name defaults to "button1", "button2" etc.  label is  the
  41. X        text   that  appears  on  the button. value is the string
  42. X        value associated with the button.  action  is  an  action
  43. X        that occurs when the button is pressed.
  44. X
  45. X        Assigning a new value to a button  does  not  change  the
  46. X        appearance  of  the  button  but it will change the value
  47. X        used in an action.
  48. X
  49. X        example:
  50. X        button={ label="Press  me"  action="PRINT  Aargh!  I  was
  51. X        pressed" }
  52. SHAR_EOF
  53. chmod 0664 xtpanel/help/button ||
  54. echo 'restore of xtpanel/help/button failed'
  55. Wc_c="`wc -c < 'xtpanel/help/button'`"
  56. test 713 -eq "$Wc_c" ||
  57.     echo 'xtpanel/help/button: original size 713, current size' "$Wc_c"
  58. fi
  59. # ============= xtpanel/help/toggle ==============
  60. if test -f 'xtpanel/help/toggle' -a X"$1" != X"-c"; then
  61.     echo 'x - skipping xtpanel/help/toggle (File already exists)'
  62. else
  63. echo 'x - extracting xtpanel/help/toggle (Text)'
  64. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/toggle' &&
  65. X
  66. X     toggle
  67. X        A toggle object is similar to a button except that it can
  68. X        be  toggled  between its on (highlighted) and off states,
  69. X        while a button returns to its off state immediately.  The
  70. X        value  of  a toggle object is blank when the toggle is in
  71. X        its off state.
  72. SHAR_EOF
  73. chmod 0664 xtpanel/help/toggle ||
  74. echo 'restore of xtpanel/help/toggle failed'
  75. Wc_c="`wc -c < 'xtpanel/help/toggle'`"
  76. test 300 -eq "$Wc_c" ||
  77.     echo 'xtpanel/help/toggle: original size 300, current size' "$Wc_c"
  78. fi
  79. # ============= xtpanel/help/slider ==============
  80. if test -f 'xtpanel/help/slider' -a X"$1" != X"-c"; then
  81.     echo 'x - skipping xtpanel/help/slider (File already exists)'
  82. else
  83. echo 'x - extracting xtpanel/help/slider (Text)'
  84. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/slider' &&
  85. X
  86. X     slider
  87. X        A slider lets the user choose a value  from  a  range  of
  88. X        integer or floating point values. Syntax:
  89. X
  90. X        slider={ label=... value=... name=... action=...  min=...
  91. X        max=... format=... width=... height=... }
  92. X
  93. X        A slider object has a label, a slider and  a  text  field
  94. X        that  displays the current slider value, and an "OK" but-
  95. X        ton to allow the user to trigger the slider's action.
  96. X
  97. X        name defaults to "slider1", "slider2" etc. label  appears
  98. X        above  the  slider.   value is the starting value for the
  99. X        slider; defaults to  the  minimum.   action:  For  action
  100. X        types  SYSTEM  and  PRINT the action occurs when the "ok"
  101. X        button is pressed. For  action  type  STRING  the  action
  102. X        occurs when the slider position changes.
  103. X
  104. X        Assigning a new value to  a  slider  changes  the  slider
  105. X        position  to match the new value. If the new value string
  106. X        is not a number (as intepreted by the  routine  atof()  )
  107. X        the slider will be set to zero.
  108. X
  109. X        min is the minimum value for the slider; defaults  to  0.
  110. X        max is the maximum value for the slider; defaults to 1.
  111. X
  112. X        format is the format with which the slider label and  its
  113. X        internal  string  will  be  printed.  The slider value is
  114. X        stored internally as a floating point number; the default
  115. X        value  for format is %f, which prints the value with five
  116. X        decimal places.  You  can  specify  a  different  format,
  117. X        according  to the format specification for the C program-
  118. X        ming language. To obtain in integer-only  slider,  use  a
  119. X        format  of  %.0f  (the  0  indicates  no digits after the
  120. X        decimal point).
  121. X
  122. X        width and height are the lengths of the major  and  minor
  123. X        axes of the slider. By default, sliders are oriented hor-
  124. X        izontally.  This can be changed by using the  orientation
  125. X        parameter described below in the MISCELLANEOUS PARAMETERS
  126. X        section.
  127. X
  128. X        example
  129. X        slider={  label=Velocity  min=1000  max=4000   value=2000
  130. X        format=%4.0f }
  131. SHAR_EOF
  132. chmod 0664 xtpanel/help/slider ||
  133. echo 'restore of xtpanel/help/slider failed'
  134. Wc_c="`wc -c < 'xtpanel/help/slider'`"
  135. test 2132 -eq "$Wc_c" ||
  136.     echo 'xtpanel/help/slider: original size 2132, current size' "$Wc_c"
  137. fi
  138. # ============= xtpanel/help/scrollbar ==============
  139. if test -f 'xtpanel/help/scrollbar' -a X"$1" != X"-c"; then
  140.     echo 'x - skipping xtpanel/help/scrollbar (File already exists)'
  141. else
  142. echo 'x - extracting xtpanel/help/scrollbar (Text)'
  143. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/scrollbar' &&
  144. X
  145. X     scrollbar
  146. X        A scrollbar object is similar to a slider, except that it
  147. X        has no label or ok button. A scrollbar's actions are per-
  148. X        formed whenever the scrollbar is changed.
  149. SHAR_EOF
  150. chmod 0664 xtpanel/help/scrollbar ||
  151. echo 'restore of xtpanel/help/scrollbar failed'
  152. Wc_c="`wc -c < 'xtpanel/help/scrollbar'`"
  153. test 198 -eq "$Wc_c" ||
  154.     echo 'xtpanel/help/scrollbar: original size 198, current size' "$Wc_c"
  155. fi
  156. # ============= xtpanel/help/choice ==============
  157. if test -f 'xtpanel/help/choice' -a X"$1" != X"-c"; then
  158.     echo 'x - skipping xtpanel/help/choice (File already exists)'
  159. else
  160. echo 'x - extracting xtpanel/help/choice (Text)'
  161. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/choice' &&
  162. X
  163. X     choice
  164. X        A choice object is a set of toggle buttons.  Each  button
  165. X        may  be  set on or off, but only one button may be active
  166. X        at a time. Syntax:
  167. X
  168. X        choice={ label=... value=... name=... action=... item=...
  169. X        itemlist=... }
  170. X
  171. X        The choice object consists of a text label and a  set  of
  172. X        buttons.  The value of the object on output is set to the
  173. X        value associated with the active button.
  174. X
  175. X        name   defaults  to  "choice1",  "choice2"  etc.    label
  176. X        appears  adjacent  to  the buttons.  value is the initial
  177. X        value associated with the choice. It must match the value
  178. X        of  one  of  the  buttons, or by default it is set to the
  179. X        value of the first button.   action  is  an  action  that
  180. X        occurs when a button is pressed.
  181. X
  182. X        Assigning a new value to a choice changes the  choice  to
  183. X        match  the new value. If the new value does not match any
  184. X        item's value the choice will be unchanged.
  185. X
  186. X        item and itemlist are used to describe the  buttons  con-
  187. X        tained in a choice. You can either specify buttons one at
  188. X        a time with item, or in groups  with  itemlist.  See  the
  189. X        detailed  descriptions  of item and itemlist below. There
  190. X        is no limit on the number of items or itemlists used in a
  191. X        choice object.
  192. X
  193. X        example:
  194. X        choice={ label="english colors" action="PRINT use $val "
  195. X                  item={ label=red } item={ label=green } item={ label=blue }
  196. X                    }
  197. SHAR_EOF
  198. chmod 0664 xtpanel/help/choice ||
  199. echo 'restore of xtpanel/help/choice failed'
  200. Wc_c="`wc -c < 'xtpanel/help/choice'`"
  201. test 1537 -eq "$Wc_c" ||
  202.     echo 'xtpanel/help/choice: original size 1537, current size' "$Wc_c"
  203. fi
  204. # ============= xtpanel/help/list ==============
  205. if test -f 'xtpanel/help/list' -a X"$1" != X"-c"; then
  206.     echo 'x - skipping xtpanel/help/list (File already exists)'
  207. else
  208. echo 'x - extracting xtpanel/help/list (Text)'
  209. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/list' &&
  210. X
  211. X     list
  212. X        A list of items; the user clicks on one of the  items  to
  213. X        select it.  Syntax:
  214. X
  215. X        list={ label=... value=... name=...  action=...  item=...
  216. X        itemlist=... }
  217. X
  218. X        The list object has a text label and a list of items.
  219. X
  220. X        name  defaults to "list1", "list2"  etc.   label  appears
  221. X        adjacent to the list.  value is the initial value associ-
  222. X        ated with the list. It must match the value of one of the
  223. X        list items, or it defaults to be the same as the value of
  224. X        the first list item.   action  occurs  when  an  item  is
  225. X        selected.
  226. X
  227. X        item and itemlist are used to  describe  the  items  con-
  228. X        tained  in  a list. You can either specify items one at a
  229. X        time with item, or  in  groups  with  itemlist.  See  the
  230. X        detailed  descriptions  of item and itemlist below. There
  231. X        is no limit on the number of items or itemlists used in a
  232. X        list object.
  233. X
  234. X        Assigning a new value to a list changes the list value to
  235. X        match  the new value. If the new value does not match any
  236. X        item's value the list will be unchanged.
  237. X
  238. X        example:
  239. X        list={ label="german color" action="PRINT benutze $val "
  240. X             item={ label=red value=rot }
  241. X                item={ label=green value=gruen }
  242. X                item={ label=blue value=blau }
  243. X                    }
  244. SHAR_EOF
  245. chmod 0664 xtpanel/help/list ||
  246. echo 'restore of xtpanel/help/list failed'
  247. Wc_c="`wc -c < 'xtpanel/help/list'`"
  248. test 1384 -eq "$Wc_c" ||
  249.     echo 'xtpanel/help/list: original size 1384, current size' "$Wc_c"
  250. fi
  251. # ============= xtpanel/help/menubutton ==============
  252. if test -f 'xtpanel/help/menubutton' -a X"$1" != X"-c"; then
  253.     echo 'x - skipping xtpanel/help/menubutton (File already exists)'
  254. else
  255. echo 'x - extracting xtpanel/help/menubutton (Text)'
  256. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/menubutton' &&
  257. X
  258. X     menubutton
  259. X        A button with a pulldown menu. Syntax:
  260. X
  261. X        menubutton={  label=...  value=...  name=...   action=...
  262. X        item=... itemlist=... }
  263. X
  264. X        name  defaults to "menubutton1", "menubutton2" etc. label
  265. X        appears  on the button.  value is the initial value asso-
  266. X        ciated with the menu. It must match the value of  one  of
  267. X        the  menu  items,  or  it  defaults to be the same as the
  268. X        value of the first menu item. action  occurs when a  menu
  269. X        item is selected.
  270. X
  271. X        item and itemlist are used to describe the  options  con-
  272. X        tained in a menu. You can either specify buttons one at a
  273. X        time with item, or  in  groups  with  itemlist.  See  the
  274. X        detailed  descriptions  of item and itemlist below. There
  275. X        is no limit on the number of items or itemlists used in a
  276. X        menubutton object.
  277. X
  278. X        Assigning a new value to a menubutton changes  the  menu-
  279. X        button  to match the new value. If the new value does not
  280. X        match any item's value the menubutton will be unchanged.
  281. X
  282. X        example
  283. X        menubutton={ label="french color" action="PRINT utilisez $val "
  284. X             item={ label=red value=rouge }
  285. X                item={ label=green value=vert }
  286. X                item={ label=blue value=bleu }
  287. X                    }
  288. SHAR_EOF
  289. chmod 0664 xtpanel/help/menubutton ||
  290. echo 'restore of xtpanel/help/menubutton failed'
  291. Wc_c="`wc -c < 'xtpanel/help/menubutton'`"
  292. test 1326 -eq "$Wc_c" ||
  293.     echo 'xtpanel/help/menubutton: original size 1326, current size' "$Wc_c"
  294. fi
  295. # ============= xtpanel/help/item ==============
  296. if test -f 'xtpanel/help/item' -a X"$1" != X"-c"; then
  297.     echo 'x - skipping xtpanel/help/item (File already exists)'
  298. else
  299. echo 'x - extracting xtpanel/help/item (Text)'
  300. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/item' &&
  301. X
  302. X     item
  303. X        Item is used to specify a single item for a choice,  menu
  304. X        or list.  Syntax:
  305. X
  306. X        item={ label=... value=... }
  307. X
  308. X        label is the label that appears on  the  screen,  as  the
  309. X        name  of  the button (for choice) or on the menu or list.
  310. X        Defaults to "item1", "item2" etc.   value  is  the  value
  311. X        that  is  set  in  the  parent  object  when this item is
  312. X        selected. Defaults to be the same as label.  Item is pre-
  313. X        ferred  over  itemlist  when  the  text  displayed on the
  314. X        screen for an item and that used for its value differ.
  315. X
  316. X        example:
  317. X        item={ label=Two value=2 }
  318. SHAR_EOF
  319. chmod 0664 xtpanel/help/item ||
  320. echo 'restore of xtpanel/help/item failed'
  321. Wc_c="`wc -c < 'xtpanel/help/item'`"
  322. test 654 -eq "$Wc_c" ||
  323.     echo 'xtpanel/help/item: original size 654, current size' "$Wc_c"
  324. fi
  325. # ============= xtpanel/help/itemlist ==============
  326. if test -f 'xtpanel/help/itemlist' -a X"$1" != X"-c"; then
  327.     echo 'x - skipping xtpanel/help/itemlist (File already exists)'
  328. else
  329. echo 'x - extracting xtpanel/help/itemlist (Text)'
  330. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/itemlist' &&
  331. X
  332. X     itemlist
  333. X        Itemlist is used to specify several items for  a  choice,
  334. X        menu or list.  Syntax:
  335. X
  336. X        itemlist={ list=... separator=... }
  337. X
  338. X        list is a single string containing a list of  items.  The
  339. X        string will be parsed to obtain the individual items. The
  340. X        label and value of each item will be the same, set to the
  341. X        string  taken  from  the  list.   Thus  itemlist  is  not
  342. X        appropriate when the text displayed on the screen for  an
  343. X        item  (the  label)  and  that  used  for the value are to
  344. X        differ.  separator is a string of characters that is used
  345. X        to  separate different items in the list string. Defaults
  346. X        to separator=" " (the blank character.)
  347. X
  348. X        examples:
  349. X        itemlist={ list="red white blue" }
  350. X        itemlist={ list=`ls -aF` separator=" \n" }
  351. SHAR_EOF
  352. chmod 0664 xtpanel/help/itemlist ||
  353. echo 'restore of xtpanel/help/itemlist failed'
  354. Wc_c="`wc -c < 'xtpanel/help/itemlist'`"
  355. test 847 -eq "$Wc_c" ||
  356.     echo 'xtpanel/help/itemlist: original size 847, current size' "$Wc_c"
  357. fi
  358. # ============= xtpanel/help/graph ==============
  359. if test -f 'xtpanel/help/graph' -a X"$1" != X"-c"; then
  360.     echo 'x - skipping xtpanel/help/graph (File already exists)'
  361. else
  362. echo 'x - extracting xtpanel/help/graph (Text)'
  363. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/graph' &&
  364. X
  365. X     graph
  366. X        A graph is a composite object, made up  of  a  number  of
  367. X        scrollbars.  Syntax:
  368. X
  369. X        graph={ nsamp=... label=... value=... name=... action=...
  370. X        min=... max=... format=... width=... height=... }
  371. X
  372. X        A graph object has a label, and nsamp scrollbars, each of
  373. X        which  sets  the  value  of  one sample in the graph. The
  374. X        value of a  graph  is  a  string  containing  the  sample
  375. X        values, separated by spaces.
  376. X
  377. X        nsamp number of samples in the graph.  name  defaults  to
  378. X        "graph1",  "graph2"  etc.  label appears above the graph.
  379. X        value is the starting value for the  graph;  defaults  to
  380. X        the  minimum.   You  can  specify up to nsamp values in a
  381. X        blank-separated list. If you specify  fewer  than  nsamp,
  382. X        the  last  value specified is re-used as needed. Thus you
  383. X        can use value=0 to set  all  samples  to  zero.   action:
  384. X        Graph  objects cannot do PRINT or SYSTEM actions by them-
  385. X        selves. You must supply  another  button  that  uses  the
  386. X        graph's value to perform an action.
  387. X
  388. X        min, max, and format are the same as for sliders.
  389. X
  390. X        width and height are the lengths of the major  and  minor
  391. X        axes of the scrollbars in the graph. These are the dimen-
  392. X        sions of each scrollbar, not the graph as a whole.
  393. X
  394. X        By default, the  scrollbars  are  oriented  horizontally.
  395. X        This  can  be changed by using the orientation parameter;
  396. X        see the MISCELLANEOUS PARAMETERS section below.
  397. X
  398. X        Assigning a new value to a graph will change the value of
  399. X        the  samples.  You  can  specify  up to nsamp values in a
  400. X        blank-separated list. If you specify  fewer  than  nsamp,
  401. X        the last value specified is re-used as needed.
  402. X
  403. X        Holding down the meta key while the cursor  is  inside  a
  404. X        graph  object allows the user to "draw" the graph without
  405. X        having to press mouse buttons. This drawing can  be  slow
  406. X        for graphs with a large number of samples, because of the
  407. X        number of widgets involved.
  408. X
  409. X        example
  410. X        graph={ nsamp=100 label="A(t)"  min=-100 max=100  value=0
  411. X        format=%4.0f }
  412. SHAR_EOF
  413. chmod 0664 xtpanel/help/graph ||
  414. echo 'restore of xtpanel/help/graph failed'
  415. Wc_c="`wc -c < 'xtpanel/help/graph'`"
  416. test 2208 -eq "$Wc_c" ||
  417.     echo 'xtpanel/help/graph: original size 2208, current size' "$Wc_c"
  418. fi
  419. # ============= xtpanel/help/var ==============
  420. if test -f 'xtpanel/help/var' -a X"$1" != X"-c"; then
  421.     echo 'x - skipping xtpanel/help/var (File already exists)'
  422. else
  423. echo 'x - extracting xtpanel/help/var (Text)'
  424. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/var' &&
  425. X
  426. X     var
  427. X        Var is an object that has a value and no screen represen-
  428. X        tation.
  429. X
  430. X        Syntax: var={ name=...  value=...  }  name   defaults  to
  431. X        "var1", "var2" etc. value is the value of the var.
  432. X
  433. X
  434. X        Variables can be used for adding arbitrary  arguments  on
  435. X        the  command line. See the command line syntax below. The
  436. X        values of var objects may be used in the action of  other
  437. X        objects  so  that  an xtpanel's behaviour can be modified
  438. X        without changing the script file. Also the value of a var
  439. X        may  be  changed  by the ASSIGN action. Thus a var can be
  440. X        used to pass information from one object to another.
  441. SHAR_EOF
  442. chmod 0664 xtpanel/help/var ||
  443. echo 'restore of xtpanel/help/var failed'
  444. Wc_c="`wc -c < 'xtpanel/help/var'`"
  445. test 677 -eq "$Wc_c" ||
  446.     echo 'xtpanel/help/var: original size 677, current size' "$Wc_c"
  447. fi
  448. # ============= xtpanel/help/params ==============
  449. if test -f 'xtpanel/help/params' -a X"$1" != X"-c"; then
  450.     echo 'x - skipping xtpanel/help/params (File already exists)'
  451. else
  452. echo 'x - extracting xtpanel/help/params (Text)'
  453. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/params' &&
  454. X
  455. MISCELLANEOUS PARAMETERS
  456. X     In addition to the parameters described above, there  are  a
  457. X     number of general parameters that apply to many objects that
  458. X     customize the appearance of the  object.  These  are  listed
  459. X     below,  along  with a list for each of the objects it can be
  460. X     applied to. These general parameters can also be modified by
  461. X     xtpanel using the SET action. See the section on ACTIONS.
  462. X
  463. X
  464. X     height    height of object, in pixels.
  465. X
  466. X     width     width in pixels. Height and width can be used  for
  467. X               most objects.
  468. X
  469. X     foreground
  470. X               foreground color. Colors are appropriate for  most
  471. X               object types.
  472. X
  473. X     background
  474. X               background color
  475. X
  476. X     borderColor
  477. X               border color.
  478. X
  479. X     font      text font. Appropriate for message objects only.
  480. X
  481. X     orientation
  482. X               for boxes, scrollbars, choice objects. Choices are
  483. X               horizontal and vertical.
  484. X
  485. X     bitmap    for message, button, and toggle objects. Specify a
  486. X               file  name.  The bitmap will be displayed in place
  487. X               of the label.
  488. X
  489. X     editType  for text objects only, to  indicate  whether  they
  490. X               are  read-only  are  not.  Choices are read (read-
  491. X               only), append (can add  to  text  but  not  modify
  492. X               existing text), edit (read-write).
  493. X
  494. X               These  parameters  are  just  some  of  the   many
  495. X               resources  defined  for  Athena  widgets.  In  the
  496. X               future we hope xtpanel will provide a more general
  497. X               method   that   allows  the  user  to  access  all
  498. X               resources, not just those on this list.
  499. SHAR_EOF
  500. chmod 0664 xtpanel/help/params ||
  501. echo 'restore of xtpanel/help/params failed'
  502. Wc_c="`wc -c < 'xtpanel/help/params'`"
  503. test 1689 -eq "$Wc_c" ||
  504.     echo 'xtpanel/help/params: original size 1689, current size' "$Wc_c"
  505. fi
  506. # ============= xtpanel/help/actions ==============
  507. if test -f 'xtpanel/help/actions' -a X"$1" != X"-c"; then
  508.     echo 'x - skipping xtpanel/help/actions (File already exists)'
  509. else
  510. echo 'x - extracting xtpanel/help/actions (Text)'
  511. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/actions' &&
  512. X
  513. ACTIONS
  514. X     An action is a  command  performed  when  a  user  interface
  515. X     object  has  changed  its  state. e.g. a button is pushed, a
  516. X     list item is chosen, a slider is moved.  If  more  than  one
  517. X     action  is specified for an object then the separate actions
  518. X     are performed in the order in which they  are  specified  in
  519. X     the script file.
  520. X
  521. X     There are seven basic types of action  NONE,  QUIT,  SYSTEM,
  522. X     PRINT, STRING, ASSIGN, and SET.
  523. X
  524. X     If no action is specified (or the  action  is  specified  as
  525. X     "NONE") the action type is NONE. In this case an object will
  526. X     just maintain its string representation.  For  dialogs,  the
  527. X     string  is  the contents of the text field; for sliders, the
  528. X     slider value; for choice, menubutton and list  objects,  the
  529. X     value associated with the selected item. When an object with
  530. X     action=NONE is modified, its string is kept up to date,  but
  531. X     nothing else happens.
  532. X
  533. X     An action type of QUIT, specified as ACTION=QUIT, will cause
  534. X     the  xtpanel  program  to quit when the object is interacted
  535. X     with. The simple quit button is written as:
  536. X     button={ label=QUIT action=QUIT }
  537. X
  538. X     The next  four  action  types  (SYSTEM,  PRINT,  STRING  and
  539. X     ASSIGN)  are  more complicated.  Each uses the format speci-
  540. X     fied in the action command to generate  a  string.   If  the
  541. X     action  is  SYSTEM,  then  that  string  is executed. If the
  542. X     action type is PRINT then the string is printed to the stan-
  543. X     dard  output.  If  the  action  is STRING then the string is
  544. X     stored as the internal string representation of the object.
  545. X
  546. X     If the action type is ASSIGN the value of the  other  object
  547. X     is set to the string. Additionally the screen representation
  548. X     of the object is updated to reflect the  new  value  (if  it
  549. X     makes sense to do so).  For example if the value of a dialog
  550. X     is updated the text field of the  dialog  will  contain  the
  551. X     updated string. If a slider is updated the slider thumb will
  552. X     be moved to the corresponding position.
  553. X
  554. X     The format specified can contain the names of  objects  pre-
  555. X     ceded  by a dollar "$" sign. The value of the string associ-
  556. X     ated with the object is substitued in the generated  string.
  557. X     The  special  symbol  "$val"  is used to refer to the string
  558. X     associated with the current object. An object  name  can  be
  559. X     enclosed  in  brackets to avoid syntactic ambiguity. You can
  560. X     use "$(val)" or "$val", the first form  is  recommended.  If
  561. X     you  do  not enclose the name in brackets it will be assumed
  562. X     to end at the next space, dollar sign or quote.  You  should
  563. X     give an object a name if you intend to use its string in the
  564. X     action of another object.  A double dollar sign "$$" is used
  565. X     to generate a single dollar in the generated string.
  566. X
  567. X     If a format contains a command enclosed in  backquotes  then
  568. X     the  output  produced  by running the command will be subsi-
  569. X     tuted in the generated string.  The command will be run when
  570. X     the  action  takes  place.  i.e.  if a backquoted command is
  571. X     present in the action for a button then the command will  be
  572. X     run  each  time the button is pressed. Note that the evalua-
  573. X     tion of the command takes place after  the  substitution  of
  574. X     object  values,  thus  the  backquoted  command evaluated at
  575. X     action time may contain an evaluated object value.
  576. X
  577. X     The ASSIGN action is special because  the  word  immediately
  578. X     following  the word ASSIGN (separated by blanks) is the name
  579. X     of an object that will have its value modified.  The  format
  580. X     is thus assumed to start at the second word after ASSIGN.
  581. X
  582. X     The SET action is  another  special  case.  The  set  action
  583. X     allows  you to modify not the value of an object, but one of
  584. X     its resources, such as foreground or background color, font,
  585. X     orientation,  etc.   The word immediately following the word
  586. X     SET is the name of the object; the next word is the resource
  587. X     you  wish  to set. Following that is the resource specifica-
  588. X     tion.  See the section above on MISCELLANEOUS PARAMETERS  to
  589. X     see which attributes can be changed with the SET action.
  590. X
  591. X     An action type of PRINT is used for any action command  that
  592. X     begins with PRINT (It must be in upper case and start at the
  593. X     first character of the action string).  An  action  type  of
  594. X     STRING  is  used for any command that begins with STRING. An
  595. X     action type of ASSIGN is used for any  command  that  begins
  596. X     with  the word ASSIGN. An action type of SET is used for any
  597. X     command that begins with SET.  An action type of  SYSTEM  is
  598. X     used  for  any command that doesn't begin with QUIT, STRING,
  599. X     PRINT, SET or ASSIGN or if it begins with SYSTEM.
  600. X
  601. X
  602. X     Following are two examples of using actions.
  603. X
  604. X     Here is a choice object that uses its value as  a  parameter
  605. X     for an imaginary system command, showcolor:
  606. X
  607. X     choice={ label=colors value="255 0 0" action="showcolor -rgb $(val)"
  608. X              item={ label=red value="255 0 0" }
  609. X              item={ label=green value="0 255 0" }
  610. X              item={ label=blue value="0 0 255" }
  611. X            }
  612. X
  613. X     In this next example, the list item has no action specified.
  614. X     Actions  default  to  type  NONE;  the  list will maintain a
  615. X     string containing the value of the selected list  item,  but
  616. X     will  do nothing more.  Here a separate button is used to do
  617. X     something with the list's output:
  618. X
  619. X     message={ label="press button to find out which item is selected" }
  620. X     list={ label=numbers name=listout
  621. X              itemlist={ list="1 2 3"
  622. X            }
  623. X     button={ label="press for answer"
  624. X              action="PRINT list selection is $(listout)" }
  625. X
  626. X     In this example the assign action is used to reset the value
  627. X     of  a  dialog  to  a  known  string (fred). The reset button
  628. X     assigns the string to the dialog.  The dialog itself has two
  629. X     actions,  the  first  prints the value of the text field and
  630. X     the second action quits xtpanel.
  631. X
  632. X     dialog={ label=dialog value="fred"
  633. X              action="PRINT I am $(val)"
  634. X              action=QUIT
  635. X            }
  636. X
  637. X     button={ label=RESET action="ASSIGN dialog fred" }
  638. X
  639. X     In the final example the user can select a file from all the
  640. X     ".ps"  files  in  the  current  directory.  The file is then
  641. X     viewed with the ghostview program:
  642. X
  643. X     button={ label=QUIT action=QUIT }
  644. X     list={ label="Choose a file" action="ghostview $(val)"
  645. X              itemlist={ list=`echo *.ps`  }
  646. X            }
  647. SHAR_EOF
  648. chmod 0664 xtpanel/help/actions ||
  649. echo 'restore of xtpanel/help/actions failed'
  650. Wc_c="`wc -c < 'xtpanel/help/actions'`"
  651. test 6610 -eq "$Wc_c" ||
  652.     echo 'xtpanel/help/actions: original size 6610, current size' "$Wc_c"
  653. fi
  654. # ============= xtpanel/help/boxes ==============
  655. if test -f 'xtpanel/help/boxes' -a X"$1" != X"-c"; then
  656.     echo 'x - skipping xtpanel/help/boxes (File already exists)'
  657. else
  658. echo 'x - extracting xtpanel/help/boxes (Text)'
  659. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/boxes' &&
  660. X
  661. BOXES
  662. X     Several objects are provided to manage the appearance of the
  663. X     panel. These box objects group other objects into boxes that
  664. X     are oriented either vertically or horizontally. In a  verti-
  665. X     cally  oriented  box,  the  objects are arranged in a single
  666. X     column, and then a box is drawn around  them.  A  vertically
  667. X     oriented box (vbox) is specified as follows:
  668. X
  669. X     vbox={ name=
  670. X     objecttype={ parameter=value ... }
  671. X     objecttype={ parameter=value ... }
  672. X     }
  673. X
  674. X     All of the objects bounded by the starting and ending braces
  675. X     of a box will be grouped together in the box. In addition to
  676. X     vbox, there is hbox, which  is  oriented  horizontally,  and
  677. X     vpane  and  hpane,  where  the  objects  within  the box are
  678. X     separated by movable partitions (these use the Athena  paned
  679. X     widget).  There  is also box and pane; these default to vbox
  680. X     and vpane, but could be overridden from a resource file.
  681. X
  682. X     Boxes can be nested. In this  way,  fairly  precise  control
  683. X     over a panel's layout is obtained.
  684. X
  685. X     Box objects have only a single parameter, name.  Two special
  686. X     names  are  recognized  by  the  resource  file;  boxes with
  687. X     name=noborder will have no border drawn around them. If  you
  688. X     use boxes extensively to arrange objects on the panel, using
  689. X     noborder can help avoid the tunnel-like appearance of multi-
  690. X     ple  nested boxes.  Also, one of the examples makes use of a
  691. X     special box name squeezebox.  This name triggers definitions
  692. X     in  the  resource  file that "squeeze out" the annotation of
  693. X     sliders, choices, and buttons that are grouped  together  in
  694. X     such  a  box. When a number of sliders are squeezed together
  695. X     in this way, the result is a seemingly new object that  lets
  696. X     the  user manipulate the data samples of a function. See the
  697. X     "sliderbox"  examples  in  the  panel   brought   up   doing
  698. X     "rundemos" in the xtpanel source directory.
  699. SHAR_EOF
  700. chmod 0664 xtpanel/help/boxes ||
  701. echo 'restore of xtpanel/help/boxes failed'
  702. Wc_c="`wc -c < 'xtpanel/help/boxes'`"
  703. test 1967 -eq "$Wc_c" ||
  704.     echo 'xtpanel/help/boxes: original size 1967, current size' "$Wc_c"
  705. fi
  706. # ============= xtpanel/help/copyright ==============
  707. if test -f 'xtpanel/help/copyright' -a X"$1" != X"-c"; then
  708.     echo 'x - skipping xtpanel/help/copyright (File already exists)'
  709. else
  710. echo 'x - extracting xtpanel/help/copyright (Text)'
  711. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/copyright' &&
  712. X
  713. COPYRIGHT
  714. X     Although xtpanel is not in the public domain, its  copyright
  715. X     is  not very restrictive. Here is the official xtpanel copy-
  716. X     right notice (the one that all the  source  files  tell  you
  717. X     about):
  718. X
  719. X     Copyright 1992 the Board of Trustees of the Leland  Stanford
  720. X     Junior  University.   All  Rights  Reserved.   Permission is
  721. X     hereby given to  use,  copy,  modify,  and  distribute  this
  722. X     software provided that (1) copyright and proprietary notices
  723. X     are retained in each copy, (2) any files which are  modified
  724. X     are  identified  as such, and (3) you do not copy or distri-
  725. X     bute the software for payment or for commercial use  without
  726. X     prior  written  consent  from  Stanford.   STANFORD MAKES NO
  727. X     REPRESENTATIONS OR WARRANTIES OF ANY  KIND  concerning  this
  728. X     software or its use.
  729. SHAR_EOF
  730. chmod 0664 xtpanel/help/copyright ||
  731. echo 'restore of xtpanel/help/copyright failed'
  732. Wc_c="`wc -c < 'xtpanel/help/copyright'`"
  733. test 843 -eq "$Wc_c" ||
  734.     echo 'xtpanel/help/copyright: original size 843, current size' "$Wc_c"
  735. fi
  736. # ============= xtpanel/help/about ==============
  737. if test -f 'xtpanel/help/about' -a X"$1" != X"-c"; then
  738.     echo 'x - skipping xtpanel/help/about (File already exists)'
  739. else
  740. echo 'x - extracting xtpanel/help/about (Text)'
  741. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/about' &&
  742. button={ label="Dismiss" action=QUIT }
  743. vbox={ name=noborder
  744. message={ value='xtpanel is written by:                            ' }
  745. hbox={ name=noborder
  746. vbox={
  747. message={ name=stevebitmap }
  748. message={ value='Steve Cole' }
  749. message={ value='steve@sep.stanford.edu' }
  750. }
  751. vbox={
  752. message={ name=davebitmap }
  753. message={ value='Dave Nichols' }
  754. message={ value='dave@sep.stanford.edu' }
  755. }
  756. }
  757. text={ value='
  758. Stanford Exploration Project, Department of Geophysics
  759. Stanford University, Stanford, CA, 94305-2215
  760. X
  761. We welcome bug reports, suggestions, interesting scripts, 
  762. code to support new widgets, etc.
  763. height=150 width=750 }
  764. }
  765. SHAR_EOF
  766. chmod 0664 xtpanel/help/about ||
  767. echo 'restore of xtpanel/help/about failed'
  768. Wc_c="`wc -c < 'xtpanel/help/about'`"
  769. test 616 -eq "$Wc_c" ||
  770.     echo 'xtpanel/help/about: original size 616, current size' "$Wc_c"
  771. fi
  772. # ============= xtpanel/help/commandline ==============
  773. if test -f 'xtpanel/help/commandline' -a X"$1" != X"-c"; then
  774.     echo 'x - skipping xtpanel/help/commandline (File already exists)'
  775. else
  776. echo 'x - extracting xtpanel/help/commandline (Text)'
  777. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/commandline' &&
  778. X
  779. COMMAND LINE INTERFACE
  780. X     On the command line, objects are specified in the  following
  781. X     format:
  782. X
  783. X     xtpanel -objecttype value value ... -objecttype value...
  784. X
  785. X     The values must be  specified  in  a  prescribed  order,  as
  786. X     described  below  for  each  object type. You can specify as
  787. X     many of the values for a given object as you wish;  the  "-"
  788. X     on  the object type is the signal to xtpanel to stop reading
  789. X     parameters for one object and begin the next. But  in  order
  790. X     to  specify  a  value  for  one  parameter, you MUST specify
  791. X     values all those that  precede  it,  in  exactly  the  order
  792. X     specified here.
  793. X
  794. X     The values for each object  are  described  in  the  section
  795. X     above  named DESCRIPTION OF OBJECTS AND SCRIPT SYNTAX.  Here
  796. X     we simply list them in the order that they must be specified
  797. X     from the command line.
  798. X
  799. X     -message    [value]
  800. X     -text       [action name value width height editType]
  801. X     -dialog     [label action name value]
  802. X     -button     [label action name value]
  803. X     -toggle     [label action name value]
  804. X     -slider     [label action name value min max format width height]
  805. X     -scrollbar  [action name value min max format width height]
  806. X     -choice     [label action name value numchoice label value ...]
  807. X     -menubutton [label action name value numchoice label value ...]
  808. X     -list       [label action name value numchoice label value ...]
  809. X     -graph      [nsamp label action name value min max format width height]
  810. X     -var        [name value]
  811. X     -quit
  812. X
  813. X     For the multiple-choice  objects  (choice,  menubutton,  and
  814. X     list), you must specify a label (which gets displayed on the
  815. X     screen) and a value (used on output) for each item, and  you
  816. X     must  precede  these  by  the number of items in the choice,
  817. X     menubutton, or list (which is not  required  in  a  script).
  818. X     There  is  no  analog to the script "itemlist" object, which
  819. X     lets you specify only one string for each  item  instead  of
  820. X     two.
  821. X
  822. X     Note that the box objects described above (see BOXES),  used
  823. X     to  group  objects  into horizontally or vertically oriented
  824. X     boxes, are not available from the command line.
  825. X
  826. X
  827. COMMAND LINE EXAMPLES
  828. X     The following examples illustrate the use  of  xtpanel  from
  829. X     the command line:
  830. X
  831. X     This example contains a quit button and a message:
  832. X
  833. X     xtpanel -quit -message "this is a message"
  834. X
  835. X     This example contains a choice:
  836. X
  837. X     xtpanel -choice "this is a choice" 'PRINT choice is $val' name 1 
  838. X     3 one 1 two 2 three 3
  839. X
  840. X     This example contains a slider and a button that outputs the
  841. X     slider's value:
  842. X
  843. X     xtpanel -quit -slider "this is a slider" 'PRINT slider value is $val'
  844. X     name 5 0 10 "%.0f" 100 20 -button "press me" 
  845. X     'PRINT slider value is $name'
  846. X
  847. X
  848. GENERAL COMMAND LINE OPTIONS
  849. X     -file filename
  850. X          Read in the script file "filename". Xtpanel also  looks
  851. X          for  a  script file on stdin. The filename specified in
  852. X          this way is searched for in a number of possible direc-
  853. X          tories.   If the environment variable "XTPANELPATH" is
  854. X          set it is assumed to  be  a  colon  separated  list  of
  855. X          directories to be searched. If the file is not found in
  856. X          these directories the program will search  a  directory
  857. X          called  .xtpanel  in  the users home directory and then
  858. X          the system xtpanel directory.
  859. X
  860. X          If the environment variable is not set the program will
  861. X          search  the  current  directory, followed by ~/.xtpanel
  862. X          followed by the system xtpanel directory.
  863. X
  864. X          The system directory is specified in the Makefile  used
  865. X          to  compile the xtpanel program. At compilation time on
  866. X          this system it was set to /usr/local/lib/X11/xtpanel.
  867. X
  868. X
  869. X     -cpp [cppargs]
  870. X          If the -cpp flag is specified then all files read using
  871. X          the   "-file"   flag  will  be  passed  though  the  C-
  872. X          preprocessor before being parsed. The preprocessor will
  873. X          be  invoked  using any command line arguments that look
  874. X          like they might be C-preprocessor arguments.  Currently
  875. X          this  is  interpreted as being any argument that starts
  876. X          with "-I" or "-D". Note the  standard  input  is  never
  877. X          passed  through  cpp. If you wish to to this you should
  878. X          pipe the output of cpp into xtpanel yourself.
  879. X
  880. X          This option can be very useful in designing system wide
  881. X          xtpanel scripts where a few key words may be changed at
  882. X          each invocation. These words may be redefined  with  "-
  883. X          Doldname=newname".  The -cpp option can also be used to
  884. X          define macros for repeated parts  of  script  files  or
  885. X          even  including  prebuilt  pieces  of script files from
  886. X          elsewhere. The following example  illustrates  some  of
  887. X          these possibilities.
  888. X
  889. X          #ifndef NAME
  890. X          #define NAME "default name"
  891. X          #endif
  892. X
  893. X          #define mkslid(VAL) slider={ label="" min=0 max=100 value=VAL 
  894. X             width=300 height=25 format="%.0f" action="STRING $val" }
  895. X
  896. X          label={ value=NAME }
  897. X
  898. X          mkslid(0)
  899. X          mkslid(10)
  900. X          mkslid(20)
  901. X
  902. X
  903. X     -help
  904. X          Invokes a series of xtpanel scripts that present infor-
  905. X          mation  about  xtpanel,  mostly  taken from this manual
  906. X          page, in an interactive, menu-driven form.
  907. X
  908. X
  909. X     -tty Read a script from the terminal. Generally  not  recom-
  910. X          mended;  it  is  better  to  save  the script in a file
  911. X          first. If this option is not set the program  will  not
  912. X          accept  input  from standard input if it is a terminal.
  913. X          You can  redirect  standard  input  and  pipe  data  to
  914. X          xtpanel without setting this option.
  915. SHAR_EOF
  916. chmod 0664 xtpanel/help/commandline ||
  917. echo 'restore of xtpanel/help/commandline failed'
  918. Wc_c="`wc -c < 'xtpanel/help/commandline'`"
  919. test 5812 -eq "$Wc_c" ||
  920.     echo 'xtpanel/help/commandline: original size 5812, current size' "$Wc_c"
  921. fi
  922. # ============= xtpanel/help/syntax ==============
  923. if test -f 'xtpanel/help/syntax' -a X"$1" != X"-c"; then
  924.     echo 'x - skipping xtpanel/help/syntax (File already exists)'
  925. else
  926. echo 'x - extracting xtpanel/help/syntax (Text)'
  927. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/syntax' &&
  928. X
  929. SCRIPT SYNTAX DETAILS
  930. X     The general format for specifying an object in a script file
  931. X     is:
  932. X
  933. X     objecttype={ parameter=value ... }
  934. X
  935. X     Note that no spaces are allowed between the objecttype  and
  936. X     the "{".
  937. X
  938. X     A line with an exclamation "!" in column one is treated as a
  939. X     comment line, the rest of the line will be ignored.
  940. X
  941. X     Each "value" can take one of four forms:
  942. X
  943. X
  944. X     1) A single word.
  945. X        e.g. label=fred
  946. X
  947. X
  948. X     2) zero or more words enclosed in single quotes
  949. X        e.g. label='fred in quotes'
  950. X        The quotes are stripped before the value is  stored.  Two
  951. X        consecutive  single quotes within the quotes will produce
  952. X        a single quote in the stored value.  Any  other  type  of
  953. X        quotes pass through unchanged.
  954. X        e.g. ' ''fred'' is happy' is stored as -> 'fred' is happy<-
  955. X               '"fred" is happy' is stored as ->"fred" is happy<-
  956. X
  957. X
  958. X     3) zero or more words enclosed in double quotes
  959. X        e.g. label="fred in quotes"
  960. X        The quotes are stripped before the value is  stored.  Two
  961. X        consecutive  double quotes within the quotes will produce
  962. X        one double quote in the stored value. Any other  type  of
  963. X        quotes pass through unchanged.
  964. X        e.g. " ""fred"" is happy" is stored as -> "fred" is happy<-
  965. X             " ""fred"" is 'happy'" is stored as -> "fred" is 'happy'<-
  966. X        Within either  single  or  double  quotes  the  following
  967. X        transformations are applied to handle newlines:
  968. X         newline                ->              newline
  969. X         backslash newline      ->              is removed
  970. X         \n                     ->              newline
  971. X
  972. X
  973. X     4) zero or more words enclosed in backquotes.
  974. X        e.g. label=`echo  my name is fred`
  975. X        The value stored is the output produced  by  running  the
  976. X        command using the user's shell.  Any trailing whitespace is 
  977. X    stripped from the output.
  978. X        In this example the value stored is ->my name is fred<-
  979. X
  980. X        Note the special case of a  backquoted  string  within  a
  981. X        quoted action.  See actions below.
  982. SHAR_EOF
  983. chmod 0664 xtpanel/help/syntax ||
  984. echo 'restore of xtpanel/help/syntax failed'
  985. Wc_c="`wc -c < 'xtpanel/help/syntax'`"
  986. test 2094 -eq "$Wc_c" ||
  987.     echo 'xtpanel/help/syntax: original size 2094, current size' "$Wc_c"
  988. fi
  989. # ============= xtpanel/help/resources ==============
  990. if test -f 'xtpanel/help/resources' -a X"$1" != X"-c"; then
  991.     echo 'x - skipping xtpanel/help/resources (File already exists)'
  992. else
  993. echo 'x - extracting xtpanel/help/resources (Text)'
  994. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/resources' &&
  995. X
  996. RESOURCES
  997. X     All widgets are constructed using the  "name"  parameter  of
  998. X     the object.  The X-toolkit resource mechanism can be used to
  999. X     control the appearance of an  object  based  on  either  its
  1000. X     class or its name.  The xtpanel objects are constructed from
  1001. X     Xaw widgets as follows:
  1002. X
  1003. X
  1004. X     message   is a Label widget
  1005. X
  1006. X     button    is a Command widget
  1007. X
  1008. X     toggle    is a Toggle widget
  1009. X
  1010. X     dialog    is a Dialog widget
  1011. X
  1012. X     text      is a Text widget
  1013. X
  1014. X     scrollbar is a Scrollbar widget.
  1015. X
  1016. X     slider    is a Box containing two Labels and a Scrollbar.
  1017. X
  1018. X     choice    is a Box  containing  a  Label  and  a  number  of
  1019. X               Toggles.
  1020. X
  1021. X     menubutton
  1022. X               is a MenuButton. Attached to it is  a  SimpleMenu,
  1023. X               with a number of SmeBSB menu entries.
  1024. X
  1025. X     list      is a Box containing a Label and a List.
  1026. X
  1027. X     graph     is a Box containing a  number  of  Scollbars,  and
  1028. X               several Label widgets.
  1029. X
  1030. X               If I have the following xtpanel script file:
  1031. X
  1032. X               button={ label=QUIT action=QUIT }
  1033. X
  1034. X               box={ name=bigfont
  1035. X                     button={ label=fred action="PRINT fred" }
  1036. X                     button={ label=joe  name=curs  action="PRINT
  1037. X               joe" } }
  1038. X
  1039. X               and the following resources:
  1040. X
  1041. X               XTpanel*Command.Font:                        fixed
  1042. X               XTpanel*bigfont*Command.Font:                 8x16
  1043. X               XTpanel*bigfont*curs.Font: cursor
  1044. X
  1045. X               Then the quit button will use  the  "fixed"  font,
  1046. X               fred  will  use  "8x16"  and joe will use "cursor"
  1047. X               (and thus be unreadable).
  1048. SHAR_EOF
  1049. chmod 0664 xtpanel/help/resources ||
  1050. echo 'restore of xtpanel/help/resources failed'
  1051. Wc_c="`wc -c < 'xtpanel/help/resources'`"
  1052. test 1669 -eq "$Wc_c" ||
  1053.     echo 'xtpanel/help/resources: original size 1669, current size' "$Wc_c"
  1054. fi
  1055. # ============= xtpanel/help/examples ==============
  1056. if test -f 'xtpanel/help/examples' -a X"$1" != X"-c"; then
  1057.     echo 'x - skipping xtpanel/help/examples (File already exists)'
  1058. else
  1059. echo 'x - extracting xtpanel/help/examples (Text)'
  1060. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/examples' &&
  1061. X
  1062. A collection of example scripts is included with xtpanel.
  1063. Use the command xtpanel-examples to see them. A particularly
  1064. powerful demo is the "lister" script example, which is a tool 
  1065. for maneuvering through a Unix filesystem and viewing files 
  1066. at any level.
  1067. SHAR_EOF
  1068. chmod 0664 xtpanel/help/examples ||
  1069. echo 'restore of xtpanel/help/examples failed'
  1070. Wc_c="`wc -c < 'xtpanel/help/examples'`"
  1071. test 258 -eq "$Wc_c" ||
  1072.     echo 'xtpanel/help/examples: original size 258, current size' "$Wc_c"
  1073. fi
  1074. # ============= xtpanel/help/generator ==============
  1075. if test -f 'xtpanel/help/generator' -a X"$1" != X"-c"; then
  1076.     echo 'x - skipping xtpanel/help/generator (File already exists)'
  1077. else
  1078. echo 'x - extracting xtpanel/help/generator (Text)'
  1079. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/generator' &&
  1080. X
  1081. The xtpanel generator is a collection of xtpanel scripts that
  1082. can be used to generate, examine and test xtpanel script files.
  1083. It is invoked using the command xtpanel-generator.
  1084. X
  1085. Using the generator, you can construct panels without having
  1086. to learn the xtpanel script language or command line interface.
  1087. The generator builds a script file for you, letting you add
  1088. any xtpanel object (button, slider, message, dialog, etc.) and
  1089. specify its attributes, including what should happen when the
  1090. object is modified.
  1091. SHAR_EOF
  1092. chmod 0664 xtpanel/help/generator ||
  1093. echo 'restore of xtpanel/help/generator failed'
  1094. Wc_c="`wc -c < 'xtpanel/help/generator'`"
  1095. test 509 -eq "$Wc_c" ||
  1096.     echo 'xtpanel/help/generator: original size 509, current size' "$Wc_c"
  1097. fi
  1098. # ============= xtpanel/help/help ==============
  1099. if test -f 'xtpanel/help/help' -a X"$1" != X"-c"; then
  1100.     echo 'x - skipping xtpanel/help/help (File already exists)'
  1101. else
  1102. echo 'x - extracting xtpanel/help/help (Text)'
  1103. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/help' &&
  1104. button={ label="Dismiss" action=QUIT }
  1105. button={ label="About xtpanel" action="xtpanel -file help/about" }
  1106. menubutton={ label="More help topics=>" 
  1107. X action="ASSIGN textwin `cat /usr/local/lib/X11/xtpanel/help/$val`"
  1108. item={ label="introduction" value="general" }
  1109. item={ label="message object" value="message" }
  1110. item={ label="text object" value="text" }
  1111. item={ label="dialog object" value="dialog" }
  1112. item={ label="button object" value="button" }
  1113. item={ label="toggle object" value="toggle" }
  1114. item={ label="slider object" value="slider" }
  1115. item={ label="scrollbar object" value="scrollbar" }
  1116. item={ label="choice object" value="choice" }
  1117. item={ label="list object" value="list" }
  1118. item={ label="menubutton object" value="menubutton" }
  1119. item={ label="graph object" value="graph" }
  1120. item={ label="item subobject" value="item" }
  1121. item={ label="itemlist subobject" value="itemlist" }
  1122. item={ label="variable object" value="var" }
  1123. item={ label="Actions" value="actions" }
  1124. item={ label="Boxes" value="boxes" }
  1125. item={ label="Miscellanous object parameters" value="params" }
  1126. item={ label="Script vs. command line" value="scriptvcomm" }
  1127. item={ label="Script syntax details" value="syntax" }
  1128. item={ label="Resources" value="resources" }
  1129. item={ label="Command line interface" value="commandline" }
  1130. item={ label="Xtpanel generator" value="generator" }
  1131. item={ label="Xtpanel examples" value="examples" }
  1132. item={ label="copyright" value="copyright }
  1133. }
  1134. text={ name=textwin value=`cat /usr/local/lib/X11/xtpanel/help/general`
  1135. X  height=300 width=750 }
  1136. SHAR_EOF
  1137. chmod 0664 xtpanel/help/help ||
  1138. echo 'restore of xtpanel/help/help failed'
  1139. Wc_c="`wc -c < 'xtpanel/help/help'`"
  1140. test 1524 -eq "$Wc_c" ||
  1141.     echo 'xtpanel/help/help: original size 1524, current size' "$Wc_c"
  1142. fi
  1143. # ============= xtpanel/help/help.sed ==============
  1144. if test -f 'xtpanel/help/help.sed' -a X"$1" != X"-c"; then
  1145.     echo 'x - skipping xtpanel/help/help.sed (File already exists)'
  1146. else
  1147. echo 'x - extracting xtpanel/help/help.sed (Text)'
  1148. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/help.sed' &&
  1149. button={ label="Dismiss" action=QUIT }
  1150. button={ label="About xtpanel" action="xtpanel -file help/about" }
  1151. menubutton={ label="More help topics=>" 
  1152. X action="ASSIGN textwin `cat SYS_XTPANELDIR/help/$val`"
  1153. item={ label="introduction" value="general" }
  1154. item={ label="message object" value="message" }
  1155. item={ label="text object" value="text" }
  1156. item={ label="dialog object" value="dialog" }
  1157. item={ label="button object" value="button" }
  1158. item={ label="toggle object" value="toggle" }
  1159. item={ label="slider object" value="slider" }
  1160. item={ label="scrollbar object" value="scrollbar" }
  1161. item={ label="choice object" value="choice" }
  1162. item={ label="list object" value="list" }
  1163. item={ label="menubutton object" value="menubutton" }
  1164. item={ label="graph object" value="graph" }
  1165. item={ label="item subobject" value="item" }
  1166. item={ label="itemlist subobject" value="itemlist" }
  1167. item={ label="variable object" value="var" }
  1168. item={ label="Actions" value="actions" }
  1169. item={ label="Boxes" value="boxes" }
  1170. item={ label="Miscellanous object parameters" value="params" }
  1171. item={ label="Script vs. command line" value="scriptvcomm" }
  1172. item={ label="Script syntax details" value="syntax" }
  1173. item={ label="Resources" value="resources" }
  1174. item={ label="Command line interface" value="commandline" }
  1175. item={ label="Xtpanel generator" value="generator" }
  1176. item={ label="Xtpanel examples" value="examples" }
  1177. item={ label="copyright" value="copyright }
  1178. }
  1179. text={ name=textwin value=`cat SYS_XTPANELDIR/help/general`
  1180. X  height=300 width=750 }
  1181. SHAR_EOF
  1182. chmod 0664 xtpanel/help/help.sed ||
  1183. echo 'restore of xtpanel/help/help.sed failed'
  1184. Wc_c="`wc -c < 'xtpanel/help/help.sed'`"
  1185. test 1500 -eq "$Wc_c" ||
  1186.     echo 'xtpanel/help/help.sed: original size 1500, current size' "$Wc_c"
  1187. fi
  1188. # ============= xtpanel/help/scriptvcomm ==============
  1189. if test -f 'xtpanel/help/scriptvcomm' -a X"$1" != X"-c"; then
  1190.     echo 'x - skipping xtpanel/help/scriptvcomm (File already exists)'
  1191. else
  1192. echo 'x - extracting xtpanel/help/scriptvcomm (Text)'
  1193. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/scriptvcomm' &&
  1194. X
  1195. SCRIPT VS. COMMAND LINE
  1196. X     The typical xtpanel script contains lines of the form:
  1197. X
  1198. X     objecttype={ parameter1=value1 parameter2=value2 ... }
  1199. X
  1200. X     This format is very flexible; the parameters can be supplied
  1201. X     in any order, or omitted and defaults will be provided. Line
  1202. X     breaks can occur anywhere.
  1203. X
  1204. X     From the command line, all objects and all their  parameters
  1205. X     must be specified on the same line in a precise order:
  1206. X
  1207. X     -objecttype value1 value2 value3... -objecttype value1 ...
  1208. X
  1209. X
  1210. X     Some parameters can be omitted; the "-" on the beginning  of
  1211. X     the next object tells xtpanel to stop reading parameters for
  1212. X     one object and begin the next. However, in order to  specify
  1213. X     a  particular  parameter, all those up to it in the sequence
  1214. X     must be specified. (For instance,  in  the  case  above,  to
  1215. X     specify  value3  for the first object, one must also specify
  1216. X     value1 and value2, while in a script they could  be  omitted
  1217. X     and left to default.)
  1218. X
  1219. X     For these reasons,  and  because  the  command  line  format
  1220. X     (where  the  entire  panel is specified on a single line) is
  1221. X     more difficult to read, it is recommended that a script file
  1222. X     be  used  for  all  but the smallest examples. The following
  1223. X     section describes the objects in greater detail, along  with
  1224. X     the  script  language syntax. If you wish instead to use the
  1225. X     command line interface, see the COMMAND LINE SYNTAX  section
  1226. X     below.
  1227. X
  1228. X     Note that scripts and the  command  line  interface  can  be
  1229. X     mixed,  and  multiple  script files can be read using the "-
  1230. X     file" option (see GENERAL COMMAND LINE OPTIONS,  below.)  So
  1231. X     the following is a valid xtpanel command:
  1232. X     xtpanel <script1 -file script2 -quit.
  1233. SHAR_EOF
  1234. chmod 0664 xtpanel/help/scriptvcomm ||
  1235. echo 'restore of xtpanel/help/scriptvcomm failed'
  1236. Wc_c="`wc -c < 'xtpanel/help/scriptvcomm'`"
  1237. test 1758 -eq "$Wc_c" ||
  1238.     echo 'xtpanel/help/scriptvcomm: original size 1758, current size' "$Wc_c"
  1239. fi
  1240. # ============= xtpanel/help/Imakefile ==============
  1241. if test -f 'xtpanel/help/Imakefile' -a X"$1" != X"-c"; then
  1242.     echo 'x - skipping xtpanel/help/Imakefile (File already exists)'
  1243. else
  1244. echo 'x - extracting xtpanel/help/Imakefile (Text)'
  1245. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/help/Imakefile' &&
  1246. X
  1247. #include "../Imake.config"
  1248. X
  1249. HELPS =          commandline      message  \
  1250. dialog           objects          copyright \
  1251. help             examples         resources \
  1252. about            generator        scriptvcomm \
  1253. actions          item             slider \
  1254. boxes            itemlist         syntax \
  1255. button           list             text \
  1256. choice           menubutton       var \
  1257. dave.xbm         steve.xbm      toggle \
  1258. scrollbar     graph          general \
  1259. params
  1260. X
  1261. MakeDirectories(install,$(SYS_XTPANELDIR)/help)
  1262. X
  1263. InstallMultipleFlags( $(HELPS), $(SYS_XTPANELDIR)/help, -m 644 )
  1264. X
  1265. help: help.sed
  1266. X    sed -e 's,SYS_XTPANELDIR,$(SYS_XTPANELDIR),g' <$? >$@
  1267. SHAR_EOF
  1268. chmod 0664 xtpanel/help/Imakefile ||
  1269. echo 'restore of xtpanel/help/Imakefile failed'
  1270. Wc_c="`wc -c < 'xtpanel/help/Imakefile'`"
  1271. test 642 -eq "$Wc_c" ||
  1272.     echo 'xtpanel/help/Imakefile: original size 642, current size' "$Wc_c"
  1273. fi
  1274. true || echo 'restore of xtpanel/help/Makefile failed'
  1275. echo End of part 8, continue with part 9
  1276. exit 0
  1277. -----------------------------------------------------------------
  1278. Steve Cole  (steve@sep.stanford.edu, apple!sep!steve)
  1279. Department of Geophysics, Stanford University, Stanford, CA 94305
  1280.