home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / DemoApps / Graphics / Multimedia / Movie / Source / Movie.nib (.txt) < prev    next >
Encoding:
NeXT TypedStream Data  |  1993-01-26  |  39.1 KB  |  314 lines

  1. typedstream
  2. StreamTable
  3.     HashTable
  4. Object
  5. [20c]
  6. typedstream
  7. [982c]
  8. typedstream
  9.     HashTable
  10. Object
  11. Controller
  12. HeaderClass
  13. %%%%i@@
  14. /usr/include/string.h
  15. genericobject_nib
  16. defDepthMatrix
  17. version
  18. prefsPanel
  19. cancelPrefs:
  20.     expand2x:
  21. open:
  22. prefs:
  23. revStep:
  24. appDidInit:
  25. fwdStep:
  26. windowDidBecomeMain:
  27. updatePrefs:
  28. reduce50pct:
  29. restore:
  30. stop:
  31. print:
  32. copy:
  33. save:
  34. okPrefs:
  35. FirstResponder
  36. firstnib
  37. checkSpelling:
  38. alignSelCenter:
  39.     unscript:
  40. pasteFont:
  41. runPageLayout:
  42. superscript:
  43. copyRuler:
  44.     copyFont:
  45. selectAll:
  46. pasteRuler:
  47. toggleRuler:
  48. showGuessPanel:
  49. alignSelLeft:
  50. paste:
  51. performClose:
  52. arrangeInFront:
  53. subscript:
  54. alignSelRight:
  55. delete:
  56. orderFrontColorPanel:
  57. underline:
  58. performMiniaturize:
  59. Projectionist
  60. /usr/include/math.h
  61.     movieView
  62. window
  63. panel
  64. [38893c]
  65. typedstream
  66.     HashTable
  67. Object
  68. [10@]
  69. NXImage
  70. stopbutton
  71. NXBitmapImageRep
  72. NXImageRep
  73. iissss1'
  74. [507c]
  75. UUUUj
  76. UUUUUUUUUUU+
  77. stopbuttonH
  78. UUUUj
  79. UUUUUUUUUUU
  80. playbutton
  81. UUUUUUUUUUU
  82. playbuttonH
  83. UUUUUUUUUUU
  84. playstepbutton
  85. [7644c]
  86. playstepbuttonH
  87. playrevbutton
  88. UUUUUUUUUUU?
  89. revstepbutton
  90. UUUUUUUUUUU
  91. playrevbuttonH
  92. UUUUUUUUUUU
  93. revstepbuttonH
  94. UUUUUUUUUUU
  95. NibData
  96. @@@@s
  97. Storage
  98. {*@@}
  99.     [39{*@@}]
  100. File's Owner
  101. CustomObject
  102. Application
  103. MainMenu
  104. MenuTemplate
  105. *@*@ccc
  106. Movie
  107. Matrix
  108. Control
  109.     Responder
  110. @:@iiii
  111. MenuCell
  112. ButtonCell
  113. ActionCell
  114.     Helvetica
  115. Info Panel...
  116. Preferences...
  117. Help...
  118. ff@@#::s
  119. submenuAction:
  120. Bitmap
  121.     menuArrow
  122. Open...
  123. Save current depth...
  124. Close
  125.     Expand 2x
  126. Reduce 50%
  127. Restore
  128. Back 1 frame
  129. Backward
  130. Forward
  131. Forward 1 frame
  132. Windows
  133. Arrange in Front
  134. Miniaturize Window
  135. Close Window
  136. Print...
  137. MenuItem
  138. WindowTemplate
  139. iiii***@s@
  140. Panel
  141.     TextField
  142. TextFieldCell
  143. Version 2.51 of
  144. Courier
  145. (by Patrick J. Flynn (flynn@eecs.wsu.edu)
  146. Button
  147. appIcon
  148. Mon Da YearO
  149. LUse the code for whatever you want.
  150. Don't pretend that you wrote it, though.
  151. LWith code contributions from Christopher Lane 
  152. (lane@sumex-aim.stanford.edu)a
  153. Field1E>
  154. Field2Q>
  155. VersionNumberL>
  156. Button1V>
  157. Field5[>
  158. Field^>
  159. Field3c>
  160. ScrollView
  161. ClipView
  162. ciifffcfffs
  163. [10582c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f1\fmodern Courier;\f2\fmodern Ohlfs;}
  164. \margl40
  165. \margr40
  166. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ul0\fs36 Movie 2.51: An improved TIFF sequence animator\
  167. \b0\fs24 \
  168. by Patrick J. Flynn\
  169. Assistant Professor\
  170. School of Electrical Engineering and Computer Science\
  171. Washington State University\
  172. Pullman, WA 99164-2752\
  173. \f1 flynn@eecs.wsu.edu\
  174. \f0 \
  175. Additional code contributed by Christopher Lane (lane@sumex-aim.stanford.edu)\
  176. \b Changes 2.5 -> 2.51\
  177. \b0 0. Fixed bug in `Save' code tickled when user is overwriting an existing movie.\
  178. 1. Fixed bug in IB.proj making Preferences unusable.\
  179. 2. This Help text is now selectable so users can copy the tiff2anim script below.\
  180. \b Changes  2.0 -> 2.5:
  181. \b0 \
  182. 0. a few bug fixes (probably a few new bugs, too).\
  183. 1. Adjustable cache depth.  This is a big win on the NextDimension.  The default cache depth can be set via a Preferences panel.\
  184. 2. The user can now choose to have the movie frame number slider track the frames (
  185. \i a la
  186. \i0  Movie 1.0) or be disabled during animation (
  187. \i a la
  188. \i0  Movie 2.0).\
  189. 3. The movie can be saved using the currently-selected depth.  In other words, if you load\
  190. in a 24-bit RGB movie, you can save it as 2-bit grayscale by changing the depth and picking the Save Current Depth menu item.  You can't save a movie on top of the original.  If you want to replace an existing movie with the one to be saved, it will try to keep the old copy around by renaming it (
  191. \i e.g.
  192. \i0 , foo.anim becomes ~foo.anim).\
  193. 4. Movie no longer accepts multi-frame 
  194. \f1 .tiff
  195. \f0  files by default -- recompilation with an appropriate 
  196. \f1 #define
  197. \f0  will being them back.  I have already been flamed for stating that Movie 2.0 would be the last version which would accept this file format. However,  it is 
  198. \b terribly easy
  199. \b0  to convert a multi-frame 
  200. \f1 .tiff 
  201. \f0 into an 
  202. \f1 .anim
  203. \f0  directory.\
  204. Here is a C-shell script which will do that very thing:\
  205. \f1 #!/bin/csh -f\
  206. # Syntax: tiff2anim foo.tiff\
  207. # Note: creates foo.anim\
  208. set bn = `basename $i .tiff`\
  209. set nframes = `tiffutil -info $1 |grep Dir | wc -l | awk '\{print $1\}'`\
  210. if (-d $bn.anim) then\
  211.   echo moving existing directory $bn.anim to $bn.anim.old\
  212.   mv $bn.anim $bn.anim.old\
  213. endif\
  214. mkdir $bn.anim\
  215. set i = 1\
  216. while ($i <= $n)\
  217.   tiffutil -extract `expr $i - 1` $1 -out $bn.anim/$bn.$i.tiff\
  218.   @ i++\
  219. exit 0
  220. \f0 \
  221. I wouldn't be surprised if you could do the same thing in one line of perl, but I don't know perl.\
  222. \b Possible future enhancements:
  223. \b0 \
  224. 1. support some kind of scripting capability.  This could be as simple as a way to specify a per-frame delay, or as complicated as GRASP.  My ulterior motive for trashing the multi-frame\
  225. \f1 .tiff
  226. \f0  movie format was to support the addition of a script file to the 
  227. \f1 .anim
  228. \f0  directory.\
  229. 2. Support sound tracks.\
  230. I am also open to suggestions for additional enhancements.\
  231. \b\fs36 What's a movie file?\
  232. \b0\fs24 A movie file is an `
  233. \b .anim
  234. \b0 '  directory containing frames in individual TIFF files.\
  235. Example: a directory named 
  236. \b Cows.anim
  237. \b0  containing 
  238. \b0  files with the names 
  239. \b Cows.1.tiff
  240. \b0 , ..., 
  241. \b Cows.n.tiff
  242. \b0  is a valid input `file' for Movie.  When you create animations in Icon, they are written to disk in this format.\
  243. \b If Movie is placed in one of the Workspace's standard application directories, double-clicking an .anim directory should fire up Movie and cause it to open the animation in that directory.  It's possible that you might have to fiddle with Workspace's Tools inspector to set Movie as the primary application for .anim directories, but I didn't have to on my system.\
  244. \b0 \
  245. \b\fs36 Running the program\
  246. \b0\fs24 Movie doesn't put up any windows right away; it waits for you to open movies (using the `open' item under the Movie menu).  You can have multiple movies open and running at the same time.   Each open movie has two associated windows.  One window displays frames of the movie, and the other is a control panel.  The movie window can be resized; this causes all frames of the movie to be recached to reflect the new window size.  Some common resizing operations are available as buttons in the control panel and as menu items also.\
  247. \f2 \
  248. \f0\b\fs36 Controls\
  249. \b0\fs24 There are two sliders, eight pushbuttons, a checkbox, and three groups of radio buttons in the Control panel associated with a currently-loaded movie. Play with them!\
  250. The top slider allows you to choose the number of frames per second.  If the animation is running, mousing the slider will change the number of frames per second and continue the animation with the new timing information.  The actual speed is displayed below this slider (thanks to Christopher Lane for contributing the code for this).  The default is 1 fps when a movie is first loaded.  The limit on the slider is 200 fps, but unless your images are very small, you probably won't achieve that speed.  One data point: on my 20MB NeXTDimension screen, with no swapping underway, I can get better than 35 256x256 8-bit gray-scale frames (cached as 8-bit grayscale) per second  running flat-out.\
  251. \b Drawing speed depends on the available hardware, the image depth, the cache depth, the image size, and the system load. 
  252. \b0 \
  253. The next slider gives you control over the currently-displayed frame.  When the animation is running, this slider is disabled.\
  254. The five buttons in the middle allow you to start and stop the free-running display of frames, as well as single-step through them.  I am not an artist, so I stole the icons from the SoundEditor .nib file in /NextDeveloper/Examples.  Note that you can go both forward and backward through the set of frames.  There are menu (and command-key) equivalents for these buttons (see the View menu).\
  255. The `Mode' radio buttons control what happens at the end of the frame set.\
  256. `Loop' means to loop through the frames cotinuously (
  257. \i i.e.
  258. \i0 , frame N-1 is followed by frame 0).  `Bounce' mode produces a direction reversal at frames 0 and N-1.\
  259. `Once through' makes the animation stop after the end (frame 0 or frame N-1 depending on the direction) is reached.\
  260. The `Speed' radio buttons offer you a choice between the fastest possible animation accompanied by very coarse, jumpy, and useless `actual fps' estimates, and well-synchronized animation with accurate fps estimates and a lower maximum frame rate.  If you're after raw speed and don't particularly care if the frames are being displayed as smoothly as possible, use the default Fast&sloppy setting.  If you can live with a lower maximum speed but require more synchronization, use Slow&smooth.\
  261. The three buttons at the bottom yield coarse control over the image size.  `Double size' doubles the window and image size (duh), `Halve size' does the inverse, and `Restore' restores the size to match the dimensions of the input image.  Note: the Movie window  is also resizeable using the resize bar at the bottom.  When the image is resized (using the bar, the buttons, or their equivalents in the View menu), the action will pause as the frames are recached.  There are menu (and command-key) equivalents for these three operations also.\
  262. Two new additions to Movie for version 2.1 are the `Depth' radio button matrix, and the `animate frame# slider' checkbox.  The user now can control the number of bits per pixel used when the frames are drawn.  The choices are: Default (the default for the system, which is the depth of the deepest available frame buffer), 2-bit grayscale, 8-bit grayscale, 12-bit color, and 24-bit color.   The depth of the cache determines how many frames will fit in memory, which in turn determines how long a movie you can run smoothly.  Movie is not smooth when cached frames have to be retrieved from disk.  If you can live with grayscale instead of color, you can fit a larger movie in memory with a shallower cache.\
  263. While I encourage users to play with this control, here are some words of wisdom [sic].\
  264. 1. If you ONLY have a 2-bit-deep display (non-ND cube or MonoSlab), use the `Default' or `2-bit gray' setting.  You are perfectly free to bump up the cache depth, but you won't see any difference (i.e., using a 24-bit cache on a 2-bit display will 
  265. \b not
  266. \b0  magically upgrade your screen to color).\
  267. 2. If you have a 12-bit-deep display (ColorSlab), use 12-bit color if your movie is in color.  If your movie is not in color, use 8-bit grayscale.  If your slab pages continuously\
  268. while the animation is running and you can live with the degradation, use `2-bit gray'.\
  269. 3. If you have a NextDimension, use the largest depth that lets you run smoothly.\
  270. Regardless of the depth, you will be able to send the movie out to a VCR or monitor.\
  271. You can set the default cache depth for newly-loaded movies using the buttons in the\
  272. Preferences panel.  The associated defaults database entry is "Movie DefaultDepth", and valid\
  273. values are "0" (use the default for the display), "2" (2-bit gray), "8" (8-bit gray), "12" (12-bit color), and "24" (24-bit color).\
  274. \b Note: there will be a delay every time you change the Depth buttons on the control panel as the frames are recached.  For long and/or deep movies, this delay can be several seconds.\
  275. \b0 \
  276. As mentioned above, you can save the movie in its currently-displayed depth.\
  277. The `animate frame# slider' checkbox controls whether the frame number slider (and the frame number text item above it) track the movie as it is running.  It is disabled by default.  You can get 
  278. \b much higher
  279. \b0  top speeds when the slider updates are disabled.\
  280. The Edit menu contains a Copy item which copies the currently-displayed frame to the Pasteboard.  If the animation is running when Copy is invoked, the animation stops, the copy is performed, and the animation starts again.\
  281. The Print... menu item prints the current frame, stopping animation if necessary (restarting when done).\
  282. Movie windows can be miniaturized by clicking on the miniaturize button on the left side of the title bar.  If the movie is running when miniaturization is requested, the animation stops.  To eliminate screen clutter, miniaturization causes the control panel to  be hidden also.  Deminiaturization (double-clicking on the miniwindow) brings both the movie and its control panel back on-screen.\
  283.  I hope you enjoy the program.  Suggestions for improvements can be emailed to the address at the top of this help text.\
  284. Pat Flynn
  285. NXCursor
  286. NXibeam
  287. Scroller
  288. _doScroller:
  289. @@@ffs
  290. ScrollingTexttn
  291. ControllerInstance
  292. Controller
  293. {i*@@@}
  294. [23{i*@@@}]
  295. hide:
  296. terminate: 
  297. makeKeyAndOrderFront:
  298. copy:
  299. open:
  300.     expand2x:
  301. reduce50pct:
  302. restore:
  303. revStep:
  304. stop:
  305. fwdStep:
  306. print:
  307. delegate
  308. version
  309. performMiniaturize:
  310. performClose:
  311. arrangeInFront:
  312. prefs:
  313. save:
  314.