home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / graf / keydraw1.zip / HYPERDRW.TXT < prev    next >
Text File  |  1989-08-05  |  19KB  |  369 lines

  1.                     HYPERDRAW and HYPERSHELL
  2.  
  3. Introduction
  4.  
  5. Welcome to the world of HyperDraw, HyperShell, and PC-KEY-DRAW
  6. Version 3.6*.  The following information is provided to aid users
  7. of PC-KEY-DRAW in using the features of HyperDraw and HyperShell.
  8. First a little background information on how HyperDraw came to be
  9. a part of PC-KEY-DRAW, then a quick look at the terminology,
  10. followed by information on using hypertext stacks, including a
  11. discussion of two stacks supplied with PC-KEY-DRAW, and finally a
  12. look at creating your own HyperDraw stacks.  It's easier than you
  13. may think. For more information on HyperDraw, hypertext, and
  14. hypermedia see the October 1988 issue of BYTE magazine and the
  15. October 3, 1988 issue of Newsweek.  There are also numerous books
  16. written on HyperCard for the Macintosh.
  17.  
  18. The discussion of HyperDraw is followed by a discussion of
  19. HyperShell which first became available in Version 3.6 and
  20. compliments HyperDraw quite nicely.  HyperShell allows
  21. PC-KEY-DRAW to run other programs or perform DOS operations from
  22. within the program.
  23.  
  24. The addition of HyperDraw makes PC-KEY-DRAW a brand new program
  25. in many ways and as far as I know without equal in the IBM PC
  26. shareware world.  HyperShell and the other additions of 3.6
  27. extended the range of PC-KEY-DRAW significantly.  I would
  28. appreciate any comments or suggestions.
  29.  
  30.  
  31.                             HyperDraw
  32. Background
  33.  
  34. Many new features were added to Version 3.5, but perhaps the most
  35. significant improvement and definitely the most exciting is the
  36. addition of HyperDraw capability to PC-KEY-DRAW. PC-KEY-DRAW can
  37. now be used as a graphic based data base.  It lets you link
  38. screens together so that the user can easily flow from one screen
  39. to the next.  This is a great way for organizing many different
  40. types of information that includes pictures and text.  HyperDraw
  41. is very similar to the HyperCard capability of the Mac.  Creating
  42. linked databases in PC-KEY-DRAW is easy and using them is simple.
  43. The tutorial disk is my first attempt at using HyperDraw.  It
  44. provides an interactive tutorial for PC-KEY-DRAW that can lead
  45. the beginner through all of the basic functions of the program.
  46. See Using Stacks for more information on the tutorial disk.
  47.  
  48. To say the least, I am very excited about HyperDraw.  I see
  49. tremendous potential with a wide range of uses.  It is ideal for
  50. interactive slide shows, for education, for picture databases,
  51. family trees, scheduling diagrams, drawing detailing and so much
  52. more.
  53. HyperDraw works by creating tags on the screen.  A tag is a
  54. section of the screen with associated action.  Currently the
  55. actions included run a macro (1), load a screen (2), or load a
  56.  
  57. partial screen (3).  Only screens have tags and any screen can
  58. have up to eight tags in Version 3.5* or eighteen tags in Version
  59. 3.6*. Each tagged screen can have eight/eighteen tags and so on,
  60. so there is no limit.  Additional tags and tag types will
  61. probably be added in future versions.  The eighteen tags per
  62. screen provided in Version 3.6 should be more than sufficient for
  63. most applications.
  64.  
  65. You might find the history of HyperDraw interesting.  Ever since
  66. I first put macros in the program I have wanted to have a way to
  67. tag areas of the screen so that the user could define actions to
  68. take place when the tagged area was selected with the cursor.  I
  69. never could figure out a way I liked for doing it.  In the spring
  70. of 1988, I saw HyperCard demonstrated on the Mac and I again got
  71. interested in the idea, but once again was not happy with any
  72. approach to the problem I could think of.  Several weeks later, I
  73. received a letter from a long time user of PC-KEY-DRAW
  74. complaining about the .DAT files that accompanied the .SCN files.
  75. They contained the scale information for a drawing, but tended to
  76. waste a lot of disk space.  I decided to encode the scale
  77. information in the .SCN file.  Several days later I saw the movie
  78. BIG in which the main character develops an interactive comic
  79. book, which I realized was basically HyperCard and I realized the
  80. technique used for the scale information could be used for saving
  81. tag information, giving PC-KEY-DRAW HyperCard features.  A couple
  82. of long days later and PC-KEY-DRAW had its own database
  83. structure.
  84.  
  85. Several months after Version 3.51 started shipping, BYTE magazine
  86. arrived in the mail with several excellent articles on hypertext.
  87. I was surprised to find out that the concept of hypertext goes
  88. back to 1945.  It has been a long time in coming to the PC world,
  89. but the wait may have been worth it.  In Byte, Janet Fiderio,
  90. points out that as a minimum, hypertext "is a DBMS that lets you
  91. connect screens of information using associative links.", while
  92. at its maximum "hypertext is a software environment for
  93. collaborative work, communication, and knowledge acquisition."
  94. She goes on to say that "Hypertext products mimic the brain's
  95. ability to store and retrieve information by referential links
  96. for quick intuitive access."
  97.  
  98.  
  99. Terminology
  100.  
  101. The terminology of HyperDraw is simple, but there are several
  102. terms that must be understood.  In many ways using hypertext to
  103. organize data is like using a stack of 3X5 file cards.  Each card
  104. contains a portion of the information contained in the entire
  105. stack. Card and screen are used interchangeably, while the term
  106. "stack" is used for a group of HyperDraw screens linked to each
  107. other.  Linking of individual screens in HyperDraw to other
  108. screens in a stack is accomplished by tagging a portion of the
  109. screen with the name of screen, picture or macro to link to.  A
  110.  
  111. "tag" is the name, type, and button location used to link to the
  112. next screen in the stack. The tag information is encoded in the
  113. screen file. (SCN extension files)  Starting with Version 3.6, 18
  114. tags per screen are allowed per individual screen. The term
  115. "button" is used to describe the portion of the screen that
  116. activates a particular tag by clicking on that area with the
  117. cursor.  Buttons may be as small as a dot or as large as the
  118. entire screen, they may also be visible and invisible.  Buttons
  119. are created on the screen by using any of the programs drawing
  120. functions.  Sets of buttons can be saved to disk and retrieved as
  121. symbols.  A button might say "Push Here", "Click On This", or
  122. simply give the name or icon of the appropriate action.  Anything
  123. on the screen can be a button. Invisible buttons are simply areas
  124. on the screen that have been tagged but not delimited by a
  125. picture, icon, or word.
  126.  
  127.  
  128. Using Stacks
  129.  
  130. Using HyperDraw stacks couldn't be easier.  Once a stack has been
  131. created anyone can move through the stack simply by "clicking" on
  132. the desired button.  To click on a button, move the cursor into
  133. the area designated on the screen using the cursor pad, joystick
  134. or mouse.  Hit the <ENTER> key, the trigger, or the first mouse
  135. button to activate the tag the cursor is on.  Tagged areas are
  136. always rectangular, even if the visible button is not. If nothing
  137. happens, you are probably not inside of the tagged area. When an
  138. area is clicked on the appropriate action is taken, either a
  139. macro is run, a screen is called up to replace the current
  140. screen, or a picture is overlaid onto the screen. Cursor movement
  141. with the keyboard or a mouse is fine for most uses, but a short
  142. cut is provided with the keyboard and the <J>ump command.
  143. Selecting <J> from Cursor Mode will provide a chance to jump to
  144. one of the eight possible tags.  Enter the desired tag number and
  145. the cursor will instantly jump to the top left corner of the
  146. tagged area.  Hitting <ENTER> will then activate the tag.
  147.  
  148. Once you enter a stack the words "Home" and "Back will appear in
  149. the bottom left and right corners of the screen.  "Home" and
  150. "Back" are both buttons.  "Home" will take you back to the very
  151. beginning, where you entered the stack. "Back" will back up
  152. through the stack, one step at a time, until you reach the place
  153. you entered a stack.  The <Back Space> key can be used instead of
  154. moving over "Back" and clicking.  No key equivalent is provided
  155. for "Home".
  156.  
  157. How you move through a stack depends on the how it was created.
  158. Some stacks will be essentially sequential in design, while
  159. others will take a hierarchical form resembling the branches of a
  160. tree.  In a sequential stack the user starts at the beginning and
  161. moves to each subsequent screen in sequence.  This is how you
  162. would read a novel.  In a stack set up like branches in a tree
  163. the user can move down the desired path from one branch to the
  164. next, occasionally backing up to go down a different branch. This
  165. is how you would use a reference book.
  166.  
  167. The disk drive to save drawings on must be set to the drive:\path
  168. that contains a given stack.  A drive cannot be specified in the
  169. tag name.
  170.  
  171. The following discusses two rather different stacks that have
  172. been created in PC-KEY-DRAW using HyperDraw.  The first is the
  173. tutorial stack created to provide an interactive lesson in
  174. learning and using PC-KEY-DRAW.  The second stack is a 3-D maze
  175. game that is created primarily for fun.  Other stacks are in the
  176. works.
  177.  
  178. Tutorial Stack
  179.  
  180. The tutorial disk for PC-KEY-DRAW is the first in a hopefully
  181. long line of applications for HyperDraw.  It provides an
  182. interactive tutorial for PC-KEY-DRAW that can lead the beginner
  183. through all of the basic functions of the program.  The user
  184. proceeds at his own rate and in any order desired. The tutorial
  185. disk should go a long way in helping the novice get started with
  186. PC-KEY-DRAW. To use the tutorial put disk T-1 in the drive for
  187. drawings and run the TUTORIAL macro with <Alt-k r>. Just follow
  188. the on screen prompts and click on the desired action with the
  189. cursor, mouse or joystick.
  190.  
  191.  
  192. Maze Stack
  193.  
  194. In the September, 1988 issue of Scientific American, A.K. Dewdney
  195. discusses three dimensional mazes and presents a 3-D maze based
  196. on the legend of Daedalus' Labyrinth.  The discussion of three
  197. dimensional mazes is fascinating and inspired me to create a
  198. computer version of the maze using the HyperDraw capability of
  199. PC-KEY-DRAW.
  200.  
  201. MAZE.ARC contains a number of screen files for PC-KEY-DRAW, Ver
  202. sion 3.50 or later, that form a 3-D maze.  You can move through
  203. the various levels of the maze by moving the cursor with a key
  204. board, mouse, or joystick and clicking to go up or down in the
  205. maze to another level.  A map of the entire level is available by
  206. clicking outside of an up or down button.  A thread back to the
  207. surface is provided by the <Back Space> command.
  208.  
  209. To use the maze start by creating a subdirectory on your hard
  210. disk.  Unarc MAZE.ARC into the subdirectory, about 800K will be
  211. needed.  Run PC-KEY-DRAW, Version 3.5 or later.  Set "Drive for
  212. Completed Drawings" as the drive and subdirectory that contains
  213. the unarced files of MAZE.ARC by using the Status Screen
  214. <Ctrl-s>.  Load the first screen using <F8 o START(Cr) y>, where
  215. (Cr) stands for <ENTER> or <Return>.  Click on START. Follow on
  216. screen instructions.
  217.  
  218. To learn more about this and other three dimensional mazes, check
  219. out Scientific American, Computer Recreations, September, 1988.
  220. Enjoy the maze and PC-KEY-DRAW.  Good luck in finding a solution.
  221.  
  222.  
  223. Creating Stacks
  224.  
  225. Many users will be content with using stacks created by others,
  226. but sooner or later you will want to try your hand at it.
  227. Creating a stack is actually very simple. The screens used in a
  228. stack are created using any or all of the programs
  229. drawing/painting functions or they can be captured from other
  230. programs.  Once the individual screens are created they are
  231. linked to other screens, macros, or overlays by tagging a portion
  232. of the screen and specifying the action to take.  The tagged
  233. portion of the screen generally corresponds to a visible button
  234. on the screen created as if it where a part of the screen.  The
  235. actual tag can be smaller or larger than the visible button.
  236.  
  237. To start a tagging operation move to one corner of the tag
  238. rectangle and select <Alt-k t>.  The program will prompt you to
  239. mark the opposite corner by moving the cursor and forming the
  240. desired rectangle and then hitting <ENTER>.  The current tag list
  241. for the screen is displayed in the top left corner of the screen
  242. and the program will prompt for the tag number to use.  Select an
  243. empty tag or replace an existing tag. When a user clicks on a
  244. tag, the program will use the first tag it finds that matches the
  245. screen coordinates of the cursor. This allows tags to be within
  246. other tags. Only the first tag is activated. The tutorial stack
  247. uses this in the first screen to provide help information when a
  248. user is unsure where to start.  The same technique is used in the
  249. MAZE game to bring up a map of the level.
  250.  
  251. Next the program asks for the tag type.  Versions 3.5* and 3.6*
  252. has three types of tags that can be activated.  Future versions
  253. will have additional tag types for more power.
  254.  
  255. Type two (2) is the most common type as it calls another screen
  256. (SCN extension) in much the same way as calling a screen with <F8
  257. o>ld.  Each screen can have its own eighteen tags.  This is the
  258. primary method of linking screens of information.  The other two
  259. types are used to supplement screen files.
  260.  
  261. Type three (3) loads a picture file (PIC extension) over the top
  262. of the current screen.  It is an ideal way of providing
  263. additional information or providing help.  The picture file will
  264. load so that the top left corner of the picture matches the top
  265. left corner of the tag. Picture files do not have their own tags
  266. and thus the existing screen tags remain unchanged. In Version
  267. 3.6, when a partial screen tag is clicked on the partial screen
  268. will appear.  Clicking a second time in the same tag area will
  269. cause the program to look for a second tag.
  270.  
  271. Type one (1) runs a macro file (MCR extension), thus allowing
  272. any PC-KEY-DRAW function to be called from a tag.  The macro will
  273. start as if the cursor was in the top left corner of the tagged
  274. area. There are many uses of the macro command, including
  275.  
  276. animation to illustrate a point.  Screens and pictures can also
  277. be loaded using a macro, but it is generally desirable to load
  278. them as type 2 and type 3 tags.  Version 3.6 allows macros
  279. execution to include BATch file type commands in HyperShell.
  280. This allows PC-KEY-DRAW to run other programs simply by clicking
  281. on a HyperDraw tag, thus PC-KEY-DRAW can now be used as a
  282. graphics based DOS menu program.
  283.  
  284. A tag type zero can also be entered, which will cause the current
  285. tag entry for the specified tag number to be erased.  To simply
  286. view a list of the tag names select <Alt-k t ENTER Esc>.
  287.  
  288. Finally, the name of the tag must be specified.  This is the name
  289. of the appropriate macro (type 1), screen (type 2), or picture
  290. (type 3). The program does not check if the appropriate file is
  291. available on the drawing disk until the tag is activated.  It is
  292. good practice to save the screen file to disk, before activating
  293. a tag to test it out.
  294.  
  295. That is all it takes to create your own stack.  Once a stack is
  296. created it can be added to or changed just as easily.  Since the
  297. tag information is contained in each screen file, relationships
  298. need only to be set up once.  For example, a screen contains
  299. several tags and an animation sequence.  When that screen is
  300. called by a new screen, all of the tag information comes along.
  301.  
  302.  
  303.                            HyperShell
  304.  
  305. Version 3.6 adds the ability to run other programs or preform DOS
  306. commands from inside of PC-KEY-DRAW.  There are many uses for
  307. this, but one of the more exciting uses is to combine the shell
  308. capability with the HyperDraw capability, allowing a program to
  309. be run by clicking on a button in a card.  This can be set up so
  310. that PC-KEY-DRAW becomes a graphics based DOS menu program for
  311. organizing the programs on a hard disk.
  312.  
  313. Background
  314.  
  315. Generally, a program that shells to DOS leaves behind a large
  316. portion of the program in memory, so it can return to where you
  317. left off when the shell is exited.  PC-KEY-DRAW uses a simple
  318. trick, so that virtually all memory is return for use by DOS or
  319. the called program, only 100 bytes are lost.  HyperShell operates
  320. by creating a BATch file with the sequence of DOS commands to be
  321. executed.  The second to last line in the BATch file returns to
  322. the directory containing PC-KEY-DRAW and the last line calls
  323. PC-KEY-DRAW.  These last two lines are automatically added to the
  324. BATch file you created during the shell process.
  325.  
  326. For the BATch file trick to work, PC-KEY-DRAW must be called from
  327. KD.BAT.  Executing KD_DRAW.EXE directly will not allow the use
  328. of HyperShell.  KD.BAT contains several extra commands that could
  329. be placed in a similar BATch file for a custom application.  If
  330.  
  331. KD.BAT is called initially with a MaCRo name specified on the
  332. command line, that same MaCRo will be used to reload PC-KEY-DRAW.
  333. This is how a menu system would operate or how one would set up
  334. when using virtual page operation.  If a MaCRo name is not
  335. specified initially, PC-KEY-DRAW is reloaded with the last screen
  336. being worked on, ready for continuing operation.
  337.  
  338. Using HyperShell
  339.  
  340. HyperShell is easy to use.  Always be sure to call PC-KEY-DRAW
  341. from KD.BAT.  The shell is reached with <F8 Alt-e> alternate
  342. exit.  PC-KEY-DRAW may first save the workspace screen and then
  343. provides an input screen for putting in the DOS commands.  Enter
  344. commands exactly as you would in a BATch file.  Entering a blank
  345. lines signifies completion of command input and causes the
  346. entered commands to be executed.  Once entered, a command cannot
  347. be edited directly.  If the command to be executed is an EXE or
  348. COM file, simply enter the name of the file and it will be run.
  349. You may need to proceed running the file with a change in path or
  350. drive, if required.  If the command is another BATch file it is
  351. necessary to call the BATch file rather than run it directly.  If
  352. a BATch file is run directly, control is turned over to it and
  353. you will never return to PC-KEY-DRAW.  In DOS 3.3 use CALL
  354. followed by the name of the BATch file to run and control will
  355. return on completion.  In earlier versions of DOS you must use
  356. COMMAND /C followed by the BATch file name.  This causes a second
  357. copy of DOS to be loaded and takes up RAM memory that will not be
  358. available to the called program.
  359.  
  360. If the command is one that you will want to use again, such as
  361. part of HyperDraw, record the command sequence as a MaCRo using
  362. <Alt-k c>reate.  Each time that MaCRo is run it will create the
  363. BATch file and perform the specified action.  Once a MaCRo is
  364. created, it can be assigned as a hypertext tag for any screen. A
  365. menu application would consist of a menu screen and a number of
  366. MaCRos tagged to the screen that would load and run the
  367. appropriate program.
  368.  
  369.