home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 562.lha / PubUtils / PubUtils.doc.pp / PubUtils.doc
Encoding:
Text File  |  1991-10-07  |  17.2 KB  |  522 lines

  1.  
  2.                 Pub Utils
  3.                 ---------
  4.  
  5.         Public Screen Utilities by Chris Papademetrious
  6.         Documentation by Kevin-Neil Klop
  7.  
  8.  
  9.     PubUtils is an archive of 4 programs designed to create,
  10.     close, and manage public screens.  Since public screens are a
  11.     feature of the Amiga Operating system version 2.0 and greater,
  12.     these programs will not work with any operating system prior
  13.     to 2.0.
  14.  
  15. Notes about the documentation:
  16. -----------------------------
  17.  
  18.     Words marked with this symbol: § are defined in the glossary at
  19.     the end of this manual.  If you don't know what the word means,
  20.     the glossary will provide more information.  It is strongly
  21.     suggested that you know what all the words mean before
  22.     attempting to install or use the PubUtils package.
  23.  
  24. What is a public screen:
  25. ------------------------
  26.  
  27.     When you start up the Amiga computer, you are presented with a
  28.     screen§ upon which certain icons show up, and maybe a Shell§.
  29.     This screen, called the Workbench Screen, is available for all
  30.     programs to use when they need to display things.  A program has
  31.     the option to either use the workbench screen or to create their
  32.     own private screen to use in displaying things.
  33.  
  34.     At least that's how things worked until the Amiga OS revision
  35.     2.04 became available.  The Workbench screen was ``public'' in
  36.     that it was available to all applications to use.  All other
  37.     screens were ``private'' and as such could not be shared
  38.     (easily) between applications.
  39.  
  40.     With the 2.04 revision of the Amiga Operating System, the
  41.     concept of ``public'' screens was further refined and the
  42.     ability given to applications to create these ``public'' screens
  43.     and to share public screens with each other.  PubUtils provide
  44.     an easy way for a user (in other words, YOU!) to create these
  45.     public screens, delete public screens, and change the colors§ of
  46.     these public screens.
  47.  
  48. Why would I use a public screen?
  49. --------------------------------
  50.  
  51.     An example of one person's use of public screens is that he uses
  52.     one public screen for one project.  He has his editor open on
  53.     the screen and also a Shell for programming.  On a different
  54.     public screen he may have a drawing package open.  On yet a
  55.     third public screen, he has his terminal program, and also a Shell
  56.     to deal with uploads and downloads.
  57.  
  58.     I'm sure that there are other uses to which you'll put public
  59.     screens after you've mulled the concept over.
  60.  
  61. Installation:
  62. ------------
  63.  
  64.         Installation consists of the following general steps:
  65.  
  66.         1) Unarchive the executable files
  67.         2) Place them into a directory accessible through
  68.            your PATH§
  69.  
  70.     The files have been archived using the LZ archiver by Jonathan
  71.     Forbes.  To unarchive the files, you must use the Shell to
  72.     execute the LZ program.  You can either choose to unarchive the
  73.     programs straight to their final destination directory, or else
  74.     you can unarchive them into one directory and then copy them to
  75.     whatever directory you wish to use as their final resting place.
  76.  
  77.     If you choose the first option, then you would use a command
  78.     line similar to:
  79.  
  80.                 LZ X PUBUTILS destdir
  81.  
  82.     where ``destdir'' would be replaced with the destination
  83.     directory.
  84.  
  85.     If you choose the second option, or the current directory is the
  86.     place in which you want the executable files to reside, then use
  87.     the following command line:
  88.  
  89.         LZ X PUBUTILS
  90.  
  91.     If you need to add the final directory to the path, you probably
  92.     should consider putting the necessary lines into your
  93.     startup-sequence so that they will be available to you every
  94.     time you restart your Amiga.
  95.  
  96.     The commands that you need to type, or add to your
  97.     startup-sequence are:
  98.  
  99.         PATH destdir ADD
  100.  
  101.     where destdir is either the destdir from the LZ X PUBUTILS
  102.     destdir command, the name of the current directory, or the
  103.     directory to which you copied the executable files.
  104.  
  105. Using the utilities:
  106. --------------------
  107.  
  108.         The five utilities are named:
  109.  
  110.             OpenScreen    SetColors
  111.         CloseScreen    ScreenToFront    ScreenFlags
  112.  
  113.     Each utility will be explained in their own section, but
  114.     generally they are executed in the following order:
  115.  
  116.         ScreenFlags
  117.         OpenScreen
  118.         SetColors
  119.  
  120.         any number of ScreenToFronts while you're working
  121.  
  122.         CloseScreen
  123.  
  124.     Note that these utilities are designed to be run from the Shell.
  125.     They do not run correctly from the Workbench, and so do not come
  126.     with any icons.
  127.  
  128. ScreenFlags:
  129. ------------
  130.  
  131.         ScreenFlags provides a way to set the various public screen
  132.     flags kept by the system. The syntax for this command is:
  133.  
  134.     ScreenFlags DEFAULT,POP/S,SHANGHAI/S
  135.  
  136.     where:
  137.  
  138.       DEFAULT    is replaced by the name of the default screen.
  139.             Windows requesting the default screen will then open
  140.             on the screen of your choice.
  141.  
  142.       POP        tells the system that whenever a window opens on
  143.             a public screen (this includes Workbench), that
  144.             screen should pop to the front.
  145.  
  146.       SHANGHAI    tells the system to 'hijack' all windows bound
  147.             for the Workbench screen, and open them on the default
  148.             screen (set above) instead.
  149.  
  150.  
  151.     Examples:
  152.  
  153.       ScreenFlags HullaBullo
  154.         makes the screen "HullaBullo" the default screen, and turns
  155.         off public screen popping and shanghai mode.
  156.  
  157.       ScreenFlags POP
  158.         will turn on public screen popping, and will disable
  159.         shanghai mode.
  160.  
  161.         
  162.  
  163. OpenScreen:
  164. -----------
  165.  
  166.         OpenScreen is the utility that actually creates the public
  167.     screen.  A screen must be created before anyone can use it
  168.     (This sort of makes sense - it's hard to use something before
  169.     it's built, right?)
  170.  
  171.         The Syntax for this command is:
  172.  
  173.     OpenScreen SCREEN/A,DEPTH/A/N,HIRES/S,LACE/S,DISPLAYID/K/N,
  174.         FONT/K,SIZE/K/N,WIDTH/N,HEIGHT/N,AUTOSCROLL/S
  175.  
  176.     where:
  177.  
  178.       SCREEN     is replaced with the name of the screen
  179.  
  180.       DEPTH        is the number of bit planes§ for the screen
  181.             (The workbench screen uses 2 bit planes by default)
  182.  
  183.       HIRES        (if present) specifies either 640x200 or
  184.             640x400, depending on the state of the LACE
  185.             keyword.
  186.  
  187.       LACE        (if present) causes the screen to be
  188.             interlaced§.
  189.  
  190.       DISPLAYID    is the number of the displaymode ID for more
  191.             non-standard modes. Some common numbers follow:
  192.  
  193.     Productivity:    233508        Productivity/Lace:    233509
  194.     SuperHires:    32800        SuperHires/Lace:    32804
  195.     A2024(10Hz):    266240        A2024(15Hz):        299008
  196.  
  197.       FONT        is replaced with the name of the font you
  198.             wish to use as the default font for the
  199.             screen.  If this option is not present,
  200.             then the default system font will be used.
  201.             The font name MUST include the .font
  202.             extension.
  203.  
  204.       SIZE        is the size of the font you wish to use.
  205.  
  206.       WIDTH        is the desired width of the public screen
  207.             in pixels.
  208.  
  209.       HEIGHT    is the desired height of the public screen
  210.             in pixels.
  211.  
  212.       AUTOSCROLL    is a keyword used to set the AUTOSCROLL§
  213.             mode on the public screen.
  214.  
  215.     Examples:
  216.  
  217.       OpenScreen Boojum 2 HIRES LACE
  218.         opens a 2 bit plane screen (same number of colors as the
  219.         default Workbench screen) called Boojum.  The screen will
  220.         be 640x400 pixels if no overscan is set in Overscan Prefs.
  221.         If the LACE keyword was left out, it would have been
  222.         640x200 pixels.  If, instead, the HIRES had been left out,
  223.         it would have been 320x400.
  224.  
  225.       OpenScreen Bandersnatch 4 FONT ZapfChancery.font SIZE 8
  226.         opens a screen called Bandersnatch that has 4 bit planes
  227.         (16 colors).  The default font for the screen will be
  228.         Zapf Chancery in an 8 point size.
  229.  
  230. CloseScreen:
  231. -----------
  232.  
  233.     CloseScreen is the program used to close a public screen that was
  234.     opened by the OpenScreen program.  The syntax for this command is:
  235.  
  236.     CloseScreen SCREEN/A
  237.  
  238.     where:
  239.  
  240.       SCREEN    is replaced with the name of the screen opened by
  241.             the OpenScreen program.
  242.  
  243.     Examples:
  244.  
  245.       OpenScreen Boojum 2 HIRES LACE
  246.       CloseScreen Boojum
  247.  
  248.         opens up a screen called Boojum and then closes it.
  249.  
  250.       OpenScreen Babaloo" 4
  251.       OpenScreen "Caspar The Ghost"
  252.       OpenScreen "Dippity Doo"
  253.       CloseScreen "Caspar The Ghost"
  254.       CloseScreen Babaloo
  255.       CloseScreen "Dippity Doo"
  256.         opens up screens and then closes them in a different order.
  257.  
  258. ScreenToFront:
  259. -------------
  260.  
  261.     This program is used to move a specified screen in front of other
  262.     ones.  Note that you can do this with the mouse using the depth
  263.     arranging gadgets in the top right hand corner of the screen, but
  264.     this program allows you to do it from scripts or from the keyboard
  265.     and Shell. The syntax for this command is:
  266.  
  267.     ScreenToFront SCREEN/A
  268.  
  269.     where
  270.  
  271.       SCREEN    is replaced by the name of the screen that you want
  272.             to move to the front.
  273.  
  274.         Examples:
  275.  
  276.       OpenScreen Laurel 2
  277.       OpenScreen Hardy 2 HIRES
  278.       ScreenToFront Laurel
  279.         will open up two screens, one called Laurel and one called
  280.         Hardy.  After the second OpenScreen call, the screen called
  281.         Hardy will be in front.  The ScreenToFront command
  282.         moves the screen called Laurel in front of the screen
  283.         called Hardy.
  284.  
  285. SetColors:
  286. --------
  287.  
  288.     This utility is used to set the colors used in a public screen.
  289.     These default colors are things such as the foreground Color,
  290.     the background Color, the Color used to draw the window frames,
  291.     and the Color used to draw menus.
  292.  
  293.     The syntax for this command is:
  294.  
  295.     SetColors SCREEN/A,HEXCOLOR/A/M
  296.  
  297.     where:
  298.  
  299.       SCREEN    is replaced by the name of the public screen whose
  300.             colors you wish to modify.
  301.  
  302.       HEXCOLOR    is a set of one or more three-character hex colors.
  303.             If the hex color is an asterisk (*), the register
  304.             is left unmodified.
  305.  
  306.     The rgb arguments can be repeated for as many colors as are used
  307.     in the specified public screen
  308.  
  309.     The rgb arguments have to be specified as hexadecimal values§.  The
  310.     values for each of the components (red, green, and blue) are from 0
  311.     to 'F'. You can find out the hex combination of any color from the
  312.     Colors program in the Tools directory.
  313.  
  314.     Examples:
  315.  
  316.       OpenScreen Paisley 2
  317.       SetColors Paisley 000 FFF
  318.         sets the screen, "Paisley" to a black and white Color
  319.         scheme.
  320.  
  321.       SetColors Paisley 777 FFF
  322.         Okay, now Paisley is grey and white.
  323.  
  324.       OpenScreen Gaudy 4
  325.       SetColors "Gaudy" F00 0F0 00F 372
  326.         makes a pretty gaudy screen - almost blinding.  Note that
  327.         not all the colors were specified - with 4 bit planes, a
  328.         total of 16 colors can be specified, but I only specified
  329.         4.  The rest of the colors will be taken from whatever
  330.         happens to be in the Color registers§ when OpenScreen
  331.         was called.
  332.  
  333. Glossary:
  334. --------
  335.  
  336.     Autoscroll
  337.         In the new, 2.04, operating system, you can define screens
  338.         that are larger than your CRT can display at one time.
  339.         When using one of these screens, you'll want to scroll
  340.         around so that you can see the portions of the screen that
  341.         are "off" your CRT or else these large screens are
  342.         virtually useless (Wonder if that's how they got the name,
  343.         "Virtual Screens?...  nahhhh...).  If a screen is
  344.         Autoscrolling, then moving the mouse pointer near the side
  345.         of your CRT will cause the screen to scroll to bring
  346.         whatever is hidden beyond that side into view.
  347.  
  348.     Bit Planes
  349.         Bit planes are used to help the Amiga define the colors
  350.         for any given dot (also called a "Pixel") on the screen.
  351.         The actual way in which bit planes are used is somewhat
  352.         immaterial to you as a user, but in general the more bit
  353.         planes there are, the more colors that are available to
  354.         you.
  355.  
  356.     Blue component
  357.         Virtually any Color that you can see can be broken down
  358.         into a mixture of three primary colors.  In photography,
  359.         these primary colors are Yellow, Cyan, and Magenta.  In
  360.         video, the primary colors are Red, Green, and Blue.  By
  361.         mixing these three colors together in various proportions,
  362.         all the other colors can be generated.  For instance, if
  363.         you want white, you would mix equal parts of all three
  364.         primary colors.  by mixing a LOT of these colors, you
  365.         would get white.  Less and less of these colors (keeping
  366.         the proportions equal) would give you darker and darker
  367.         greys until mixing NONE of these colors gives you black.
  368.  
  369.     Shell (or CLI, Command Line Interpreter)
  370.         Although the Amiga has what is known as a Graphical User
  371.         Interface (sometimes shortened to "GUI" [Gee You Eye]),
  372.         there is an interface§ available on the Amiga that allows
  373.         you to type in commands on the keyboard rather than select
  374.         menus and icons with the mouse.  This interface is called
  375.         the Shell, or sometimes, Command Line Interpreter (CLI).
  376.  
  377.     Color Register
  378.         The number specified for a certain pixel through the use of
  379.         the bit planes§ does not directly select a Color to draw
  380.         on the screen.  Instead, it tells the computer where to
  381.         look for the actual Color to be displayed.  This "where"
  382.         is one of the Color registers held in one of the custom
  383.         chips in the Amiga.  As an example, suppose that the number
  384.         from the bit planes for a pixel is 5.  This means for the
  385.         computer to look in Color register 5 for the actual Red,
  386.         Green, and Blue components§ of the Color to be displayed.
  387.  
  388.     Current Directory
  389.         The current directory is the directory that the CLI thinks
  390.         you are currently using.  Hmmm, that was a bit confusing,
  391.         let's show an example.  Assume you type in the following
  392.         command:
  393.  
  394.             CD Work:ADirectory/SubDirctory
  395.  
  396.         Yeah, yeah, I know I misspelled "SubDirctory", but let's
  397.         assume that's the way it is on my disk.
  398.  
  399.         The current directory after that would be
  400.         Work:ADirectory/SubDirctory.  The concept of the "current
  401.         directory" is useful since it becomes the default for all
  402.         commands unless you specify a complete path specification§
  403.         to override the current directory.
  404.  
  405.     Green component
  406.         See Blue component
  407.  
  408.     Hexadecimal Values
  409.         Hexadecimal is a numbering system used quite a bit in the
  410.         computer field.  While you are familiar with the decimal
  411.         numbering scheme used in most human mathematics, it is
  412.         often more convenient to use the hexadecimal numbering
  413.         scheme when dealing with a computer.
  414.  
  415.         In hexadecimal, instead of using the digits 0, 1, 2, 3, 4,
  416.         5, 6, 7, 8, and 9, we use the digits 0, 1, 2, 3, 4, 5, 6,
  417.         7, 8, 9, A, B, C, D, E, and F.  Wait a minute!  A, B, C, D,
  418.         E, and F are letters, they aren't numbers!  All I can say
  419.         is that in Hexadecimal, they are numbers.
  420.  
  421.         In decimal, 1 is greater than 0, 2 is greater than 1, 3 is
  422.         greater than 2, and so on until we get to 9 is greater than
  423.         8.  After that we go to 10 is greater than 9, 11 is greater
  424.         than 10, and so on.  In hexadecimal, we use the following
  425.         relationship:
  426.  
  427.             1 is greater than 0
  428.             2 is greater than 1
  429.             3 is greater than 2
  430.                     .
  431.                 .
  432.                 .
  433.             8 is greater than 7
  434.             9 is greater than 8
  435.             A is greater than 9
  436.             B is greater than A
  437.             C is greater than B
  438.             D is greater than C
  439.             E is greater than D
  440.             F is greater than E
  441.                10 is greater than F
  442.  
  443.     Interface
  444.         An interface is the way in which you interact with the
  445.         computer.  For instance, WorkBench is what is known as a
  446.         Graphical User Interface, and it allows you to interact
  447.         with your Amiga through the use of icons, a mouse, and
  448.         menus.
  449.  
  450.     Interlace
  451.         Interlace is a method used in displays to double the number
  452.         of pixels available in the vertical (up and down)
  453.         direction.  If a non-interlaced display has 200 pixels in
  454.         the vertical direction, then an interlaced display will
  455.         have 400 pixels in the vertical direction.
  456.  
  457.         There is a cost, however, in interlacing a display.  The
  458.         refresh rate (the number of times the picture is painted
  459.         onto your screen per second) is halved.  This can lead to
  460.         an annoying "flickering" of your display.  The new Amiga
  461.         chips (called the ECS, or Enhanced Chip Set) are capable of
  462.         higher resolutions without flickering.  In addition,
  463.         several manufacturers make "Flicker Fixers" which remove
  464.         the flickering from interlaced displays.
  465.  
  466.     Path
  467.         In the CLI, when you type the name of a program to run, the
  468.         Amiga computer searches for that program in several places
  469.         trying to find it.  The first place that it searches is the
  470.         current directory§.  If the program can't be found there,
  471.         then it starts looking in other directories that have been
  472.         specified as part of your PATH.
  473.  
  474.         If you never specify your own path, then the path will (by
  475.         default) cause the Amiga to look in the C:  directory for
  476.         the program.  If, on the other hand, you specify the
  477.         following command either manually to the CLI or in your
  478.         startup-sequence or cli-startup:
  479.  
  480.             PATH Work:BIN WORK:MyDir
  481.  
  482.         then the Amiga will search
  483.  
  484.             First: The current directory
  485.             Second: the directory Work:BIN
  486.             Third:    the directory Work:MyDir
  487.  
  488.         Only if it can't find the program in any of those will the
  489.         Amiga admit that it doesn't understand how to do that (i.e.
  490.         the infamous, "Unknown Command" error message).
  491.  
  492.     Path Specification
  493.         A Path specification is merely the name of a file plus its
  494.         directory.  For instance, in the following file name:
  495.  
  496.                 MyDisk:MyDir/AllMyStuff/PlusSome/FileName
  497.  
  498.         then the path specification is
  499.         "MyDisk:MyDir/AllMyStiff/PlusSome" and the file name is
  500.         "FileName".
  501.  
  502.     Red component
  503.         See Blue Component
  504.  
  505.     Screen
  506.         A screen can be different things depending on the context
  507.         in which it is used.  Generally, when used in this
  508.         documentation, a "screen" is a graphic presentation upon
  509.         which windows or other graphics are placed.  That might not
  510.         be all that clear, so let's give you an example.
  511.  
  512.         The workbench screen is generally the first thing you see
  513.         when you start your Amiga.  Upon that screen are icons
  514.         representing disk or other storage devices.  If you start a
  515.         CLI, the window for the CLI is put on the workbench screen.
  516.         If you start a program, that program may create its own
  517.         screen upon which it places graphics or windows.  These
  518.         screens generally can be slid up and down.  Also, the
  519.         Colored bar at the top of the screen is used to display
  520.         menus.
  521.  
  522.