home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / programs / desktop / graphtask / !GraphTask / !Help next >
Encoding:
Text File  |  1998-08-15  |  17.5 KB  |  374 lines

  1.  
  2.  
  3.                             Graphic Task Windows
  4.                             ====================
  5.  
  6.  
  7. Documentation for  !GraphTask application version 3.53 15-Aug-1998,
  8. for RISC OS 3.1 or later.
  9.  
  10. Issue: 3.12 15-Aug-1998, replaces:      0.10 13-Aug-1990
  11.                                         1.00 23-Aug-1990
  12.                                         2.00 31-Dec-1990
  13.                                         3.00 20-Jun-1991
  14.                                         3.10 14-Dec-1992
  15.                                         3.11 09-Aug-1994
  16.  
  17. Author: David J Ruck
  18.  
  19. Copyright © DEEJ Technology PLC 1990-1998
  20.  
  21.  
  22.  
  23. Overview
  24. ========
  25.  
  26. The Graphic TaskWindow provides an extension to the RISC OS taskwindow
  27. concept by allowing the full use graphics, whilst preserving the ability to
  28. run true RISC OS tasks at the same time.
  29.  
  30. Taskwindows are usually managed by a text editor programs such as !Edit,
  31. which don't know how to handle graphics or even text positioning codes.
  32. !GraphTask knows how to handle all graphics, screen modes and palettes and
  33. display them all in a window on the desktop.
  34.  
  35. !Graphtask is aimed at the enthusiast programmer who is able to write small
  36. non wimp programs, and would like them to run in a window on the desktop,
  37. but does not have the time or the expertise to tackle the complicated and
  38. long winded RISC OS windowing operating systems calls.
  39.  
  40. !Graphtask is very useful for someone who has written or bought a large
  41. collection of pre-RISC OS or BBC (Model A, B, Master, Compact or Electron)
  42. programs which it is not possible to upgrade to RISC OS versions.
  43.  
  44. A Graphic Taskwindow will allow most non-desktop programs to be run in a
  45. fully re-sizeable window on the desktop, without stopping the operations of
  46. other  RISC OS tasks.
  47.  
  48. "Program" is used throughout this document to mean the program running
  49. within a Graphic Task window. "Task" refers to a standard windowing program
  50. running on the RISC OS desktop.
  51.  
  52. Features
  53. --------
  54.  
  55. Currently some non desktop programs can be made to multitask using the New
  56. Taskwindow option from the !Edit create menu (or by the TaskWindow option on
  57. the RISC OS 3 Task Manger menu), but this has the disadvantage that the
  58. programs must only output pure text.
  59.  
  60. This means that not only pure graphics programs will not work, but also any
  61. program which relies on printing at different locations on the screen.
  62. !GraphTask extends the text only Taskwindow concept by providing the
  63. following enhancements:
  64.  
  65.  
  66. Multi-tasking           The program running in a Graphic Taskwindow does not
  67.                         need to contain any Wimp_Poll calls to multitask, it
  68.                         is automatically run for a small amount of time
  69.                         between the operation of other fully RISC OS tasks.
  70.                         This is transparent to the user and program, except
  71.                         that the program appears to run more slowly.
  72.  
  73. Multi-windows           Any number of Graphic Taskwindows may be active at
  74.                         once, but this is limited in practice by how much
  75.                         memory is used by each task and the memory used by
  76.                         the screen for each task. 
  77.  
  78. The screen              A Graphic Taskwindow provides the program with an
  79.                         environment similar to what it would have running
  80.                         outside the desktop, whilst running in its own
  81.                         window and without affecting other desktop programs.
  82.                         This allows programs to change the screen mode and
  83.                         the colour palette as normal, but for the changes to
  84.                         only affect the contents of its window. The mode and
  85.                         colours used are approximated as closely as possible
  86.                         in the current desktop mode.
  87.  
  88. Cursors                 A text cursor and text editing cursor are provided,
  89.                         to show where typed characters will appear and to
  90.                         allow the copying of text from other parts of the
  91.                         screen, in the same way as the cursors outside the
  92.                         desktop. This enables easier editing than is
  93.                         available  using the taskinput feature of an !EDIT
  94.                         taskwindow.
  95.  
  96. Scaling                 A taskwindow can be resized and the scroll bars
  97.                         moved in the normal RISC OS manner without affecting
  98.                         the display of the program in the window.
  99.                         Additionally it may be scaled down to give more room
  100.                         on the desktop whilst keeping all of the programs
  101.                         screen visible (albeit smaller), or scaled up to
  102.                         examine small detail, again this does not affect the
  103.                         program.
  104.  
  105. The mouse               Some non-desktop programs use the mouse in their
  106.                         operation, to allow these to be used correctly the
  107.                         position of the mouse pointer they read is adjusted
  108.                         so that it is relative to their screen, rather than
  109.                         the desktop screen. This takes into account the
  110.                         position of the window in which the program is
  111.                         running, whether all of it is visible due to use of
  112.                         the scroll bars, and also if the scaling has been
  113.                         selected.
  114.  
  115.  
  116. Programs compatible with Graphic Taskwindows
  117. --------------------------------------------
  118. Most BASIC and machine code programs can be used in a Graphic Taskwindow as
  119. long as they;
  120.  
  121.         •       Are not RISC OS windowing programs.
  122.  
  123.         •       Do not directly access the screen.
  124.  
  125.         •       Do not try to re-configure the machine.
  126.  
  127.         •       Do not claim operating system vectors or use interrupt code.
  128.  
  129.         •       Do not try to leave the desktop,
  130.                 (!65Host or old PC emulators).
  131.  
  132. Eight bit BBC computer programs which require !65Host will not work, but
  133. 65Tube can be used to run Basic or 6502 assembler programs in a Graphic
  134. Taskwindow. 65Tube can be entered by typing *EmulateTube from within a
  135. taskwindow.
  136.  
  137. Programs which try to redefine the cursor keys or action (OS_Byte 4 / *FX4)
  138. will run but not always function correctly e.g. Arm Basic Editor. Programs
  139. which use multiple screen buffers to improve graphics updating will run, but
  140. will not always give the correct display in the Graphic Taskwindow.
  141.  
  142.  
  143.  
  144. Using !GraphTask
  145. ================
  146.  
  147. To start !GraphTask double click on the !GraphTask icon in a filer window,
  148. it will then install itself on the icon bar.
  149.  
  150.  
  151. New Graphic Taskwindow
  152. ----------------------
  153. A new Graphic Taskwindow can be created in four ways; the first two are by
  154. clicking on its icon or selecting New Task from the iconbar menu.
  155.  
  156. This will create a new taskwindow with no task running except a command line
  157. interpreter. The amount of memory initially given to the task will be that
  158. specified in the next slot of the Taskmanager display. To alter the amount
  159. of memory when the task has been started use the *WimpSlot command.
  160.  
  161. The third way to create a new Graphic Taskwindow is to drag a file or an
  162. application directory (of a non desktop application) onto the !GraphTask
  163. icon. The program will then automatically load and run in a new taskwindow.
  164.  
  165. Another way is to start !GraphTask from the Taskmanager menu or an obey
  166. file, with the names of programs which will automatically start up in their
  167. own task windows.
  168.  
  169.         e.g. Run !GraphTask Program1 Program2...
  170.  
  171.  
  172. Errors when starting.   Each new Graphic Taskwindow will require memory for
  173.                         both the program and the screen it uses within its
  174.                         window. Graphic Taskwindows usually start in MODE 12
  175.                         (the program's mode, not the mode the desktop is
  176.                         currently in), if not enough memory is available
  177.                         MODE 0 will be tried, if there is still not enough
  178.                         memory an error will be reported, and no taskwindow
  179.                         will be created.
  180.  
  181.  
  182. !EDIT or DDE Taskwindows
  183. ------------------------
  184. If you have any taskwindows active, either from !Edit, the RISC OS 3 Task
  185. Manager or command windows from the Desktop Development Environment (DDE),
  186. they will need to be closed before !GraphTask can be run. This is so the
  187. !GraphTask can load a special version of the TaskWindow Module enabling the
  188. mouse position to be read correctly by programs in the Graphic Taskwindow. 
  189.  
  190. If the new TaskWindow module is not loaded !GraphTask will function
  191. correctly except, that programs will read the mouse position relative to the
  192. desktop rather than to their screens in a Graphic Taskwindow.
  193.  
  194. Normal Taskwindows started from !Edit, the desktop or by DDE commands during
  195. or after !GraphTask has been run, will work as normal. Users may wish to
  196. replace the module filename TASK from DDE which has been installed in the
  197. !System folder with the module GTASK in !GraphTask, (renaming it to TASK),
  198. which will enable !GraphTask to be started while DDE commands are active.
  199.  
  200.  
  201. Dragging files
  202. --------------
  203. Dragging a file over to a Graphic Taskwindow will have the same effect as
  204. typing in its full pathname and pressing RETURN - useful for programs which
  205. ask for filename, or starting new programs in an existing taskwindow.
  206.  
  207. The filename is normally inserted with a newline at the end, but if shift
  208. is held a space is appeneded instead. This is useful for executing commands
  209. which take more than one filename as parameters.
  210.  
  211.  
  212. Graphic Taskwindow Menu
  213. -----------------------
  214. Pressing the mouse menu button in a Graphic Taskwindow will call up the
  215. menu, its entries are as follows;
  216.  
  217. Menu Button             When the mouse buttons select and adjust are pressed
  218.                         over a Graphic Taskwindow the program being run can
  219.                         read this, together with  the position of the mouse,
  220.                         taking into account the windows position and scaling
  221.                         so it is relative to the programs screen.
  222.  
  223.                         When the menu button is pressed the window menu will
  224.                         appear, so to enable the program to detect a menu
  225.                         button destined for it, hold the menu button down
  226.                         over the Menu Button entry. The menu will disappear
  227.                         and the program will see that the menu button has
  228.                         been activated.
  229.  
  230. Kill                    Kill will not close the window, but the program
  231.                         running in it will be killed and memory used by it
  232.                         freed, the program cannot be restarted.
  233.  
  234. Reconnect               After killing reconnect will allow another program
  235.                         to run in the same window, memory is claimed from
  236.                         the Taskmanager’s next slot.
  237.  
  238. Suspend                 This temporarily stops the program from running,
  239.                         without freeing any memory used by it. This is
  240.                         useful to use with the Save screen facility
  241.                         described below.
  242.  
  243. Resume                  This enables the program to continue after a
  244.                         suspend, it is transparent to the program running.
  245.  
  246. Save screen             This brings up a standard RISC OS saver dialog box
  247.                         to save a copy of the programs screen. A full size
  248.                         screen is saved as a sprite file irrespective of how
  249.                         much of the screen is visible in the window or its
  250.                         scaling.
  251.  
  252. Magnify                 A magnifier box as used in !Paint and !Draw is
  253.                         displayed allowing the screen within the window to
  254.                         be scaled down, to create more room on the desktop
  255.                         whilst still showing the whole screen, or scaled up
  256.                         to examine detail or read small text.
  257.  
  258.  
  259.  
  260. Technical details
  261. =================
  262.  
  263. Multi-tasking           Multi-tasking is achieved by using a modified
  264.                         version of the taskwindow module. This module allows
  265.                         non wimp programs to be started as RISC OS tasks,
  266.                         the module waits for Null events to be delivered to
  267.                         each task. It then runs the program for a small
  268.                         amount of time before interrupting it and passing
  269.                         control back to other taskwindow tasks, or normal
  270.                         RISC OS tasks via the standard Wimp_Poll SWI. This
  271.                         results in the program running slower than it would
  272.                         outside the desktop, but it is not necessary to
  273.                         rewrite the program to run in a desktop compatible
  274.                         way.
  275.  
  276. Screen handling         The output from Graphic Taskwindow programs are
  277.                         redirected to a sprite which can have MODE and
  278.                         palette settings independent of the desktop. The
  279.                         screen is plotted into a window using the
  280.                         OS_SpriteOp and the Colour_Trans module to provide
  281.                         scaling and achieve the closest result to the
  282.                         appearance of the screen if it were running outside
  283.                         the desktop.
  284.  
  285.                         Output is buffered to prevent excessive redraws of
  286.                         the window, speeding up the processes. The larger
  287.                         the area changed each time, however, the slower the
  288.                         update becomes.  Scaling of 1:1 should be used for
  289.                         the fastest update. Users writing programs
  290.                         specifically for Graphic Taskwindows should try to
  291.                         ensure the screen is updated in blocks, rather than
  292.                         drawing at opposite ends of the screen alternatively.
  293.  
  294. Text cursors            Text cursor and cursor editing is provided within
  295.                         !GraphTask as it is not automatic when re-directing
  296.                         output to a sprite. Only normal *FX4,0 type control
  297.                         is provided at present.
  298.  
  299.                         Under extraordinary circumstances the visible
  300.                         position of the text cursor and the position where
  301.                         typed characters appear may differ, this can be
  302.                         cured by changing mode - typing MODE x.
  303.  
  304. Mode changes            If at any time a mode for which there is not enough
  305.                         free memory is selected by the program, MODE 0 will
  306.                         be used as default.
  307.  
  308. Mouse position          While the pointer is over a Graphic Taskwindow and
  309.                         during any mouse button changes, the !GraphTask and
  310.                         the modified Taskwindow module translates the mouse
  311.                         position so OS_Mouse calls by the program will be
  312.                         relative to its screen, irrespective of the position
  313.                         or scaling of the window.
  314.  
  315. Incompatibilities       The majority of graphics programs tested, which do
  316.                         not try to access the screen or perform operations
  317.                         which do not agree with the taskwindow module (OS
  318.                         vector claims, interrupt handling), have been found
  319.                         to work correctly in a Graphics Taskwindow.
  320.  
  321.                         All VDU commands work correctly, however there are a
  322.                         few small incompatibilities relating to the values
  323.                         returned by the basic functions (and hence OS
  324.                         routines) MODE, POS & VPOS, referring to the desktop
  325.                         screen, which can cause some programs problems.
  326.  
  327. ColourTrans             ColourTrans SWI's which rely on the current screen
  328.                         mode and palette (such as ColourTrans_ReturnGCOL)
  329.                         cannot be used from within Graphic Task Windows, as
  330.                         the current screen mode and palette are taken to be
  331.                         that of the desktop.
  332.  
  333.                         SWI's which allow a mode and palette to be specified
  334.                         should be used,
  335.  
  336.                         e.g. ColourTrans_ReturnGCOLForMode.
  337.  
  338.  
  339. Future enhancements
  340. -------------------
  341. !GraphTask is being continually developed, future enhancements will include:
  342.  
  343.         •       Enhanced cursor & function key emulation to allow all *FX4
  344.                 and *fx224-228 options without affecting desktop programs.
  345.                 This will allow the use of Arm Basic Editor
  346.  
  347.         •       Interception of OS routines behind BASIC's MODE, POS & VPOS
  348.                 to return values representative of the programs rather than
  349.                 the desktop screen.
  350.  
  351.         •       Support for multiple screen banks and *FX112/*FX113
  352.                 switching using multiple output sprites.
  353.  
  354.         •       Support for ColourTrans to enable the SWI's to work
  355.                 correctly with the mode and palette used in graphic
  356.                 taskwindow.             
  357.  
  358.         •       Faster task input and output by replacing C routines in main
  359.                 program with hand optimized machine code.
  360.  
  361.  
  362.  
  363. GraphTask and RISC OS 3.5
  364. =========================
  365.  
  366. GraphTask will work correctly with the new RISC OS version 3.5.
  367.  
  368. Programs running in the graphic taskwindow should not attempt to change
  369. screen mode using the new OS_ScreenMode SoftWare Interrupt as this will
  370. cause the desktop to change mode with unpredictable results. Also graphic
  371. task windows cannot handle screen modes with more than 8 bits per pixel.
  372.  
  373.  
  374. End of !GraphTask.!Help