home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / chip_20022115.iso / amiga / chiputil / picshow.rea < prev    next >
Text File  |  2002-01-07  |  10KB  |  321 lines

  1. Short:    Datatype picture viewer for directory tools
  2. Author:   thomas-rapp@web.de (Thomas Rapp)
  3. Uploader: thomas-rapp@web.de (Thomas Rapp)
  4. Version:  1.8
  5. Type:     gfx/show
  6.  
  7.  
  8. New since Version 1.6:
  9. ======================
  10.  
  11. - Shows error message when no picture in directory
  12.  
  13. - Improved calculation of menu width
  14.  
  15. - New Option CLOSEWB
  16.  
  17. - PicShow windows are AppWindows now (icons can be dropped into them)
  18.  
  19. - New Option REQ (open file requester even if file name is given)
  20.  
  21. - major parts of the code have been reorganized so there may be lots
  22.   of new bugs
  23.  
  24. - configurable key bindings
  25.  
  26. - shell commands can be started via key
  27.  
  28.  
  29.  
  30. Introduction
  31. ============
  32.  
  33. This program is meant to be configured as picture viewer in directory
  34. tools like DirOpus or DosControl. It shows the doubleclicked picture
  35. in a borderless window on the specified custom screen. The remarkable
  36. about this program is that it reads the whole directory the picture is
  37. in and you can then choose other pictures out of this directory from
  38. a menu or by pressing the cursor keys.
  39.  
  40.  
  41.  
  42. Installation
  43. ============
  44.  
  45. Copy the PicShow executable somewhere where your directory tool can
  46. find it. A good place is the C directory.
  47.  
  48.  
  49.  
  50. Configuration
  51. =============
  52.  
  53. Call PicShow as a Shell program with the following parameters:
  54.  
  55. FILE             The picture to show first. You can specify a directory
  56.                  here. In this case the directory is read first and then
  57.                  the topmost picture is shown.
  58.  
  59. PUBSCREEN/K      The pubscreen where to open the window. Default is the
  60.                  default pubscreen (usually Workbench).
  61.  
  62. P=PATTERN/K      Only picture files that match this name pattern are
  63.                  shown in the list.
  64.  
  65. FLASH/S          Flashes the screen (displays beep) after the directory
  66.                  read is complete.
  67.  
  68. DONTCHECK/S      Files are not checked if they are pictures before they
  69.                  are inserted into the list. This does speed up the
  70.                  directory read a lot, but files that are no pictures
  71.                  are shown in the list, too. You should use the
  72.                  PATTERN parameter to avoid this.
  73.  
  74. DELAY/N/K        Enable slide show: every n/10 seconds the next picture
  75.                  is shown (DELAY=20 means every 2 seconds a new picture).
  76.  
  77. SCREEN/S         Open a new screen for PicShow
  78.  
  79. BG=BACKGROUND/K  Background color for the new screen. Format is six
  80.                  hexadecimal numbers: rrggbb
  81.                  rr = amount of red color (00 - ff)
  82.                  gg = amount of green color (00 - ff)
  83.                  bb = amount of blue color (00 - ff)
  84.                  Default is 000000 (black).
  85.  
  86. PORT/K           Name of the Arexx port.
  87.                  Default is PICSHOW.
  88.  
  89. MODEID/N         Decimal ID of screen mode. Default is same as Workbench.
  90.  
  91. DEPTH/N          Depth to use for custom screen. Default is same as
  92.                  Workbench.
  93.  
  94. QUIET/S          Disabled error requesters when picture cannot be loaded
  95.  
  96. CLOSEWB/S        Attempt to close Workbench when screen is open
  97.  
  98. REQ/S            Force PicShow to open a file requester. FILE is taken as
  99.                  preset file name.
  100.  
  101. KEYS/K           Name of a file that contains key bindings
  102.  
  103.  
  104. If PicShow is started from the Workbench all of the above can be entered as
  105. tooltypes, either in the program icon or in the picture icon that is
  106. activated first. Tooltypes in the picture icon overide those in the program
  107. icon. Picture icons can be activated by shift-click or by specifying
  108. PicShow as default tool.
  109.  
  110. There is one additional option that can only be activated as ToolType:
  111.  
  112. KEY=<key binding>    Rebind one key. May be specified multiple times for
  113.                      different keys. Read the section about key bindings for
  114.                      an explanation of <key binding>.
  115.  
  116. Example:  KEY=X=QUIT     enable the key X to quit PicShow
  117.  
  118.  
  119.  
  120. Usage
  121. =====
  122.  
  123. When the window showing a picture is open you can do this:
  124.  
  125. NOTE: these are the default keys. Read the section about key bindings to
  126.       learn how to change them.
  127.  
  128. o  Quit PicShow 
  129.    -  double click into the window or
  130.    -  press the ESC key or
  131.    -  press Q
  132.  
  133. o  Show the next picture
  134.    -  press the cursor down key or
  135.    -  press the cursor right key or
  136.    -  press the cursor down or right keys on the numeric keypad or
  137.    -  press space bar or
  138.    -  press return
  139.  
  140. o  Show the previous picture
  141.    -  press the cursor up key or
  142.    -  press the cursor left key or
  143.    -  press the cursor up or left keys on the numeric keypad or
  144.    -  press backspace (the <- key above return)
  145.  
  146. o  Show some infos about the current picture
  147.    -  keep the mouse pointer inside the window and don't move it for
  148.       some time
  149.  
  150. o  If the picture is too large to fit into the screen
  151.    -  grab the picture with the left mouse button and move it around.
  152.  
  153. o  Choose a picture from the list
  154.    -  press the right mouse button and hold it down. The list can scroll
  155.       up and down if there are more files than fit into one page. Just
  156.       move the mouse pointer over the arrow(s).
  157.  
  158. o  Read a new directory 
  159.    -  Press F1
  160.  
  161. o  Swap display from Workbench to PicShow's own screen and back
  162.    -  Press F10
  163.  
  164. o  Invert the background color of PicShow's own screen (e.g. from black 
  165.    to white and vice versa)
  166.    -  Press F9
  167.  
  168. In the example file PicShow.keys the following additional key is defined:
  169.  
  170. o  Copy the displayed picture into RAM:
  171.    - Press C
  172.  
  173.    The file name is "pic<number>_<width>x<height>x<depth>.<type>".
  174.    Example: pic0001_640x480x8.ilbm
  175.    This is only an example. Read the section about key bindings for a 
  176.    description on how to configure your own shell commands.
  177.  
  178.  
  179.  
  180. Arexx port
  181. ==========
  182.  
  183. The name of the ARexx port is PICSHOW. It can be changed by the parameter
  184. (or tooltype) PORT. The following commands can be sent to the Arexx port:
  185.  
  186.  
  187. QUIT                Exit PicShow.
  188.  
  189. NEXT                Show next picture.
  190.  
  191. PREV                Show previous picture.
  192.  
  193. MENU                Open the picture list.
  194.  
  195. SCREEN              Toggle screen / Workbench.
  196.  
  197. SCREEN <ON|OFF>     Open or close the screen as desired.
  198.  
  199. PUBSCREEN <name>    Set the pubscreen name to a new value.
  200.  
  201. FILE <file>         Show the named picture and read the new directory.
  202.  
  203. REQ                 Open the file requester.
  204.  
  205. FLASH <ON|OFF>      Enable/Disable beep as desired.
  206.  
  207. DONTCHECK <ON|OFF>  Enable/Disable file checking as desired.
  208.  
  209. DELAY <n>           Set the delay time to a new value. 0 = OFF.
  210.  
  211. BACKGROUND <color>  Set the background color to a new value.
  212.  
  213. PATTERN <pattern>   Choose a new file name pattern.
  214.                     Must be set before FILE or REQ.
  215.  
  216. INVERTBG            Invert background color of PicShow screen.
  217.  
  218. DEPTH <depth>       Change current screen depth (if screen open)
  219.  
  220. MODEID <id>         Change current screen mode id (if screen open)
  221.                     Id is a decimal mode id inquired for example with
  222.                     GetModeID (included in the Visage archive on Aminet)
  223.  
  224. SETDEPTH <depth>    Set screen depth for next open
  225.  
  226. SETMODEID <id>      Set screen mode id for next open
  227.                     Id is a decimal mode id inquired for example with
  228.                     GetModeID (included in the Visage archive on Aminet)
  229.  
  230. CHANGE              Reopen screen and apply the above changes.
  231.  
  232. QUIET <ON|OFF>      Dis-/Enables error requesters.
  233.  
  234. CLOSEWB <ON|OFF>    Set CLOSEWB flag as desired.
  235.  
  236. KEYS <filename>     Load a new key bindings file
  237.  
  238. KEY <key binding>   Rebind one key.
  239.  
  240.  
  241.  
  242. Key bindings
  243. ============
  244.  
  245. Key bindings are read from the files 
  246.  
  247. S:PicShow.keys
  248. env:PicShow.keys
  249. PROGDIR:PicShow.keys
  250. CURRENTDIR:PicShow.keys
  251. the file specified by the KEYS function
  252.  
  253. if they exist. Each file can contain any number of keys, one per line.
  254.  
  255. Everytime I talk about a <keyábinding> in this readme, the following format
  256. is meant:
  257.  
  258. <key>=<command>
  259.  
  260. The <key binding> may not contain any spaces (except after the SHELL
  261. command).
  262.  
  263. <key> can be any key description that also a commodity would accept as a
  264. hot key, except qualifiers like shift, alt and ctrl.
  265.  
  266. Examples:
  267.  
  268. a, b, c, 1, 2, 3,           Normal keys
  269. numpad 1, numpad 2, enter   Keys on the numeric key pad
  270. f1, f2, f10, help           Function keys
  271. return, del, backspace      Special keys
  272. up, down, left, right       Cursor keys
  273.  
  274. <command> is what the key should do. Valid commands are:
  275.  
  276. QUIT                   Exit PicShow.
  277. NEXT                   Show next picture.
  278. PREV                   Show previous picture.
  279. MENU                   Open the picture list.
  280. SCREEN                 Toggle screen / Workbench.
  281. REQ                    Open the file requester.
  282. INVERTBG               Invert background color of PicShow screen.
  283. SHELL <command line>   Execute the command line as a shell command.
  284. NOP                    Unbind this key.
  285.  
  286. In the command line the following placeholders can be used to
  287. include information about the current picture:
  288.  
  289. %p   Path
  290. %f   File name
  291. %n   Number (starting with 1 at the top of the list)
  292. %w   Width
  293. %h   Height
  294. %d   Depth
  295. %t   Type
  296.  
  297. The placeholders can contain any modifiers that a C format string accepts
  298. (for example %04n for a 4 digit number to the left padded with 0's),
  299.  
  300. Please look into the file PicShow.keys for examples.
  301.  
  302.  
  303.  
  304. Future Ideas / ToDo
  305. ===================
  306.  
  307. -  scale pictures to fit into the screen
  308.  
  309. -  blend effects when changing displayed picture
  310.  
  311. -  palette requester for the background color
  312.  
  313. -  read configuration from ENV variable
  314.  
  315. -  configuration editor
  316.  
  317. -  preload pictures for more speed
  318.  
  319. -  optimize window handling when in custom screen mode (don't open a new
  320.    window for each picture but blit directly into the background window)
  321.