home *** CD-ROM | disk | FTP | other *** search
/ Computer Club Elmshorn Atari PD / CCE_PD.iso / mac / 1000 / CCE_1049.ZIP / CCE_1049.PD / APPMAN / APPMAN.TXT < prev    next >
Text File  |  1995-02-11  |  42KB  |  1,004 lines

  1. @(#)appman.txt, v0.89 Appman Manual (c) 1994,1995 Jerry G Geiger
  2. Reference Manual to Application manager Appman
  3.  
  4. This documentation isn't complete at all.  But together with the
  5. example *inf file it should help you using the program.
  6.  
  7. The usage of Gemini is recommanded, as well as Let'em Fly's - if you
  8. don't run Appman under MagiC -, though it works without, (without Gemini
  9. at least partly) too.
  10.  
  11. Contents:
  12.     1.  The Application Manager - link classes of filenames
  13.         to applications
  14.  
  15.     2.  The Icon Window of Appman
  16.  
  17.     3.  How To Install And Details
  18.  
  19.  
  20. 1. Application Manager
  21.  
  22.     The Application manager handles applications attached to
  23. sort of classes of filenames. In some way it knows how to deal with
  24. a file classified by it's name or name's extension. Cause I think the
  25. main actions performed on a file is editing, viewing or kind of
  26. executing it, it distinguishes these three main actions.
  27.  
  28.     1.1     The Way it Works - some general remarks
  29.     1.2     The Usage - the popup menu
  30.     1.3     The Configuration File appman.inf
  31.  
  32. How The Application Manager Works
  33.     In the configuration file 'appman.inf' you can attach programs
  34. to classes of filenames or single files.  There are three actions to
  35. be performed by Appman which are show, edit and execute.  Depending on
  36. the filename's extension 'execute' will have other names in the popup.
  37.  
  38.     For each of this actions you can attach a program to a 'class
  39. of filenames' to be executed after a double click and the selection in
  40. the popup.  See Appman Popup.
  41.  
  42.     Appman will get a message from the Desktop if you double
  43. clicked an Icon there.  (Of course other programs can send this
  44. message as well.) If the name of the object in the message fits in one
  45. of the classes in 'appman.inf' the specified program is executed by
  46. the Desktop (e.g.  Gemini) or by Appman itself - if AES version allows
  47. this (see 'CON' in internal options).
  48.     If the name doesn't fit in any specified class for the provided
  49. action a default application can get executed.
  50.  
  51. The Usage of The Application Manager
  52.     After Appman got a message about the selected filename it will
  53. display one of the following popups, or perform some action at once.
  54. This depends on the configuration of the double click and [Shift] key
  55. combinations in the 'appman.inf' file.
  56.     The popup will not appear if the selected object is an 680x0
  57. executable (recognized by the extension, see EXECSUFFIX), or it's name
  58. has an extension mentioned in SAPPSUFFIX list. Gemini won't
  59. send a message if you double click an 'executable' object without
  60. pressing a [Shift] key, or it does not at all. (This goes for it's
  61. 'gin' files, too.)
  62.     If Appman can't find a commandline for the selected object, you
  63. can select a program to run on that object or use a standard
  64. application for the provided action.
  65.  
  66.     configure the actions after double clicks
  67.     the appman popup menu
  68.     the default application dialog
  69.  
  70.     If the [Alt] key is pressed while double clicking - long enough for
  71. Appman to detect it - Gemini or the Desktop should open a directory
  72. window with the path the selected file is in. Gemini 1.999e will open
  73. a window with 'appman.acc', though this is not very usefull at all. :-)
  74.  
  75. Configure Double Clicks and Actions
  76.  
  77.     Double Clicks, in a Desktop window of objects together with a
  78. [Shift] key hold down or not, will force Appman to perform some action:
  79. Either run a program at once or display the popup menu to let you
  80. select some action.
  81.     You can configure this in the appman.inf file.
  82. Here is the list with the default settings:
  83.  
  84.     Dclick                      display popup
  85.     [Shift]Dclick               'show' object
  86.     [Shift][Control]Dclick      'edit' object
  87.     [Shift][Alternate]Dclick    'pack' object
  88.  
  89.     For changes (e.g. 'show' with double click and 'display popup' with
  90. [Shift]) see the variables 'DCLACT' etc. in the appman.inf file
  91. description.
  92.  
  93. Appman Popup
  94.     These are the popup menues Appman will display to let you select
  95. some action to be performed on the selected object.
  96.  
  97.     show        show        show
  98.     edit        edit        edit
  99.     execute     print       extract
  100.     -------     ------      ------
  101.     pack        pack        pack
  102.  
  103.     Which one is displayed depends on the filename's extension, it
  104. depends on wether the file is an archive or an executable one.
  105.     Which program is started after clicking on one of the action entries
  106. depends again on the configuration in 'appman.inf'.
  107.     If no pattern matches, the default application dialog
  108. is displayed.
  109.     With the default 'pack' application 'gzip', the object is unpacked
  110. if it is a packed one or packed if not. This is a feature of gzip, and
  111. not of Appman.
  112.     The popup works with keys, see MENUS in special keywords.
  113. Together with Let'em Fly you can move it around using the disabled item.
  114.  
  115. Default Application Dialog
  116.  
  117.     With this dialog you can select a program to run on an object
  118. appman don't knows to handle (from the appman.inf file), or use a
  119. standard application for the provided action.
  120.  
  121.     You can change the default button in this dialog with the 'DFL1'
  122. variable in your appman.inf file.
  123.  
  124.     To get rid of the default application dialog for some 'action',
  125. just specify a 'default' application's commandline for all files as
  126. last entry for this action in your appman.inf file.
  127.     example:
  128. +* 1stview.acc@1STVIEW GEMIVA
  129.     This as last! '+' (show) entry will always make 1stview.acc show
  130. all files that didn't match any entry before.
  131.     You can set the REQUEST variable to a value, so that this dialog
  132. will never appear, this means a 'cancel'.
  133.  
  134.     - to be continued
  135.  
  136. Configuration File appman.inf
  137.  
  138.     The file 'appman.inf' is appman's configuration file.  It is
  139. read in right after starting of the accessory and after the ^L key
  140. command.  For location see section paths.  It is an plain ASCII file.
  141. A line may have more than 1024 characters and its end (LF) is
  142. the main delimiter.
  143. Comment lines start with an '%' sign.  You are recommended to edit the
  144. example appman.inf file from the distribution according to your
  145. environment.  There you will find some BNF similiar description of the
  146. syntax, too.
  147.  
  148.     special keywords (variables) for general configuration
  149.     the significant extensions
  150.     the default applications
  151.     classes of filenames and actions performed on them
  152.  
  153.     - to be continued
  154.  
  155. Special Keywords/Variables
  156.     Some values are bitfields. To set them add the values for the
  157.     functions you want to select and use the sum for the new
  158.     variable's value.
  159.     MSGDELAY        '0' to '6000'
  160.         hundreth of a second delay on a reply to the AES message
  161.         'AC_CLOSE' to prevent the message queue run over. You
  162.         shouldn't need this in MultiTOS but elder TOS versions.
  163.     WOPEN       '0' to '7', bitfield
  164.         A bitfield for auto opening of the Icon Window. The values'
  165.         description:
  166.         1  Gemini opens and reopens the Appman window with the
  167.            status message or not.
  168.         2  Appman should open the window always if it can find any
  169.            AVserver running.
  170.         4  Appman should open it's window at start and if no other
  171.            value is added after every AC_CLOSE by itself.
  172.         So if Appman doesn't open it's window after getting started
  173.         via an Gemini message set the WOPEN variable to 5.
  174.     ICONFLAGS           '0' to '7', bitfield
  175.         A bitfield to set some flags for the Icon Window. The values'
  176.         description:
  177.         1  The icon text should be centered in the icons' text boxes.
  178.         2  The length of the icons' text boxes is the full icon text
  179.            length (20 characters).
  180.         4  The icon window's minimum width is the icon image's size, if
  181.            unset it will be the complete icon's size.
  182.         The default values differ in 'appman.acc' (5) and 'appman2.acc'
  183.         (6) cause of different icons there.
  184.     MOUSEBGTIMER        '0' to '6000'
  185.         hundreth of a second - timer event to catch mouse
  186.         clicks in an untopped icon window, default
  187.         is 100 (one second), 0 means no timer event at all.
  188.         If your OS supports actions in untopped windows this
  189.         variable  should be '0'. For MultiTOS and MagiC this is
  190.         set by Appman itself as default.
  191.         see background usage
  192.     DFL1        '0' to '3'
  193.         The number of the default button in the
  194.         'default application dialog'.
  195.     DFLCP       '0' to '2'
  196.         The same in the copy dialog (after icon dragging).
  197.     DFLEXE      '0' to '2'
  198.         The same in the 'run' dialog (after icon dragging).
  199.     AESPOPUP    '1' or '0'
  200.         Set the MENUS switch in bit 0 to value 1 or 0 (default)
  201.         It only sets this switch without effect on values 2 or 4
  202.     MENUS       '0' to '7'
  203.         A bitfield to set menu related switches:
  204.         1   Use the AES's popup menu function if possible (MultiTOS,
  205.             MagiC) to display the Appman popup menu.
  206.             If 0 the builtin popup menu is used always.
  207.             (this is default, you may want this, e.g. for key support)
  208.         2   (default for Accessories and 'appman*.acc' binaries)
  209.             insert an 'Appman' entry into the Accessory menu
  210.             If unset there will be no menu entry if started as ACC
  211.             under MagiC.
  212.         The following value is not supported by 'appman*.acc' binaries.
  213.         (use 'what' if you forgot the binary's orignal name)
  214.         4   only if run as APP, then default value
  215.             Appman should have a menubar; if unset there will be no
  216.             menubar even if started as APP: you won't need any cause
  217.             you can have a menu entry with value 2 or no entry at all
  218.             and open the Appman window with a double click on an Appman
  219.             icon in the desktop if Appman is already running.
  220.             WOPEN maybe set so that the window opens automatically.
  221.     CASESENSITIVE   '0' to '15'
  222.         A bitfield for some casesensitive flags, the values:
  223.         (default is 0)
  224.         1   Handle object's names and extensions and wildcards case
  225.             sensitive when comparing or not (default is not).
  226.             If not, all wildcard patterns and extension lists from
  227.             'appman.inf' and the object's name to act on are forced to
  228.             upper case.
  229.         2   The auto locator function in the icon window is case-
  230.             sensitive. (default is not)
  231.         Cause not many File-Selectors support case sensitive filenames
  232.         and some people prefer lower case names for not case sensitive
  233.         filesystems:
  234.         4   Make all filenames lowercase if not in a case sensitive
  235.             filesystem.
  236.         8   Do so if no information about case-sensitivness of a
  237.             filesystem is available.
  238.  
  239.         The strings used in the messages are not changed by this
  240.         options. VA protocol messages will contain uppercase names
  241.         unless MiNT is runnning though CASESENSITIVE is '1', and
  242.         unchanged names if MiNT is running.
  243.     DCLACT          '0' to '4'  default is 0  (Dclick)
  244.     DCLSHIFTACT     '0' to '4'  default is 1  ([Shift]Dclick)
  245.     DCLSHIFTCTRACT  '0' to '4'  default is 2  ([Shift]^Dclick)
  246.     DCLSHIFTALTACT  '0' to '4'  default is 4  ([Shift][Alt]Dclick)
  247.         The value is the number of the action Appman should perform
  248.         at once after double clicking on an object in the desktop's
  249.         window. The actions are numbered accoding to the popup menu,
  250.         which is action '0' itself. So '1' is 'show', etc..
  251.     MESSAGES    '0' to '15', bitfield (default all)
  252.         Which messages should Appman show you in some Alertbox?
  253.         1   process not found
  254.         2   command not found
  255.         4   Gemini (or other AVserver) isn't running
  256.         8   DragDrop error messags
  257.     REQUESTS     '0' to '15', bitfield (default all)
  258.         Wich questions should Appman ask you
  259.         1   copy files (icon dragging)
  260.         2   run a command (icon dragging)
  261.         4   default Application dialog (if not this is a cancel)
  262.         8   command not found, try to run it anyway?
  263.  
  264.     AVVALIST GEMINI
  265.         Desktop replacements or main applications dealing the AV
  266.         messages: a list of processes to send std AV messages to,
  267.         the first one found will receive them
  268.         This internal entry is replaced with the environment variable
  269.         $AVSERVER.
  270.     DDLIST UNIDESK,NEWDESK,DESKTOP
  271.         Desktop replacements, used if none of the applications from
  272.         AVVALIST could be found.
  273.         This is a list of processes to send standard DragDrop messages
  274.         (corresponding the VA protocol messages) to, the first one
  275.         found will receive them.
  276.  
  277.     - to be continued
  278.  
  279. Significant Extensions
  280.     Some keywords in appman.inf are kind of variables for lists of
  281. filename extensions. Here follows the list with the default values.
  282. If 'CASESENSITIVE' is 0 all extensions are turned to uppercase, the
  283. builtin ones, shown here too.
  284.  
  285.     The extensions here are used by appman to check wether a file is an
  286. archive, executable and so on.  Shell and other scripts without an
  287. extension or one not mentioned in one of the variables, are recognized
  288. by the '#!' magic starting the first line.  The program and first
  289. argument to run it is taken from this line, of course.  So you needn't
  290. mention any possible script extensions in PROGSUFFIX nor apply the
  291. programs to wildcards made from this extensions.
  292.     Executable binary files without extensions are recognized by a magic
  293. too, and handled like 'TOSSUFFIX' files.
  294.  
  295. EXECSUFFIX app,prg,gtp,ttp,tos
  296.     a program, executable by TOS
  297.     This variable is used to find commands without specified extensions
  298.     too.
  299.     GEMSUFFIX app,prg,gtp
  300.         an AES program (you should add 'acc,acx' there under MultiTOS
  301.         if you have no environment Variable '$GEMEXT' with these
  302.         extensions)
  303.     TOSSUFFIX ttp,tos
  304.         a program not using GEM
  305.     TPSUFFIX ttp,gtp
  306.         a program taking parameters (not used this time)
  307. PROGSUFFIX cmd,bat
  308.     A file executed by an interpreter. This maybe a program, or sort of
  309.     project file, etc. Executable scripts (like a shell script, or a
  310.     makefile) you needn't mention here, the are recognized as executable
  311.     by the '#!' magic as first two bytes in the file.
  312.     You can add 'acc,acx' here if you have some program in your
  313.     environment to start accessories without rebooting - like "The
  314.     Chameleon". You won't need this running MUltiTOS.
  315.     Of course you will have to add an 'execute'-line with these
  316.     extensions here as patterns and the program or process to  call
  317.     in the 'appman.inf' file.
  318. SAPPSUFFIX
  319.     Single APPlication SUFFIX list: There are files only a special
  320.     application can deal with. This variable is a list of extensions in
  321.     names of those files; e.g. a 'document file' of word processor, etc.
  322.     After a double click on a file with an extension listed here the
  323.     'edit' commandline of the pattern matching this extension gets
  324.     executed immediately.  No Popup will appear.
  325. PACKSUFFIX lzh,arc,gz,*z,zoo,zip,lzs,tar
  326.     a packed archive which is to not to 'execute' but to 'extract'
  327. BINSUFFIX a,lib,o,fli,rsc
  328.     a non printable binary file (extensions not mentioned in
  329.     EXECSUFFIX, SAPPSUFFIX, PROGSUFFIX or PACKSUFFIX)
  330.  
  331.     - to be continued
  332.  
  333. Default Applications
  334.  
  335.     There are 4 actions supported by the Appman Popup for every
  336. double clicked file. One, 'pack' always performs runnning the standard
  337. packer program on the file. For the others there exists a default
  338. program which is to run if none of the specified patterns matches the
  339. filename. See default Application Dialog.
  340.  
  341. To attach a program to such a default application keyword or a pattern
  342. the same syntax is used.
  343. keyword maybe one of the following:
  344. STDSHOW     STDED       STDPRINT
  345. STDPACK     SHELL
  346.  
  347. You should specify an application for each of these. See example
  348. appman.inf file from the distribution.
  349.  
  350.     - to be continued
  351.  
  352. Classes of Filenames
  353.  
  354.     You can attach programs to filename patterns. Editing a
  355. resource file is editing as well as writing a TeX file or a C source,
  356. but I think you would use slightly different programs to do that.
  357. See syntax how to write such a line for attaching a program, and
  358. appman inf file from the distribution for examples.
  359.  
  360. You will have to specify a key char so that Appman knows for which
  361. action this line is to be performed:
  362. show key is '+'     edit key is '&'     execute key is '$'
  363. and print key is '>'
  364.  
  365. Examples:
  366. An 'edit'-line
  367. &*.c memacs.app@MEMACS GEMIVA ARGP
  368.  
  369. An 'execute'-line, used as 'extract'-line, too:
  370. $*.lzh lharc x
  371.  
  372. If you don't specify a 'commandline' (see syntax) for such a
  373. key+identifier the last specified commandline gets used for this
  374. pattern too, not regarding the key at all. See examples in the
  375. appman.inf file from the distribution.
  376.  
  377.     - to be continued
  378.  
  379. Syntax in File appman.inf
  380. This is the general syntax used in appman.inf to attach a program to
  381. filename pattern or install it as a default application.
  382.  
  383.     identifier space commandline
  384.     identifier: {key pattern}|keyword
  385.     key:        '+'|'&'|'$'|'!'|'#'
  386.     commandline:  command space [{option space}] [{argument space}]
  387.     command:    [program]|['@'process space protocol]
  388.     protocol:   option
  389.     program
  390.     process
  391.     option
  392.     keyword
  393.     pattern
  394.     argument:  token
  395.     token:     {[^' ''\t''\n''\r''\0'','';''\'']}
  396.     space:     ' '|'\t'
  397.  
  398.     Keyword is one of the default applications and pattern is a FNRE.
  399. If 'CASESENSITIVE' is not set to 1 + <n> all patterns are turned to
  400. uppercase.
  401.     Option is one of the Appmans's internal options (mainly the protocol
  402. used for process communication).
  403.     You can include spaces in arguments by using the `'' quotes like in
  404. the DragDrop or ARGV quoting scheme. That is replace every `'' by two
  405. ones, and quote tokens with whitespace in them.
  406.     Of course Appman can't know wether the receiver understands this
  407. or not, unless it supports this AV protocol option.
  408.  
  409. FNRE
  410.  filename regular expression
  411.  * matches any number of any characters
  412.  ? matches one character
  413.  [ begins a class of characters
  414.  [^ a class of characters to exclude
  415.  \  escape special meaning of next char
  416.  class: maybe
  417.    a range e.g [0-9], [A-c]
  418.    or a list e.g. [Afjp]
  419.  
  420. Internal Options
  421.  
  422.     The following tokens may appear in the specified commandline
  423. as 'protocol'. You have ot specify one after a '@<process-name>' token:
  424.     DRAGDR      use a DragDrop communication
  425.     GEMIVA      use Gemini's VA_START message
  426.     GEMIAV      use Gemini's AV_STARTPROG message
  427.     XACC        use a XACC message
  428. or more general as 'option':
  429.     GEM         this is an AES Application, makes use of GEM
  430.                   only used together with CON flag this time
  431.     PAR         (still unused)
  432.     CON         run the program via AV-Server (Gemini)
  433.                   and open console if not a GEM application;
  434.                   By default the program is started via shel_write()
  435.                   if possible - MultiTOS, MagiC - so you will have to
  436.                   set an option for the working directory the program
  437.                   is to run in usually.
  438.                   Gemini and the AES may have different environment
  439.                   variables set!
  440. options to set the cwd of the program to run (default is APPL)
  441.     These options work only if shel_write is used, not together
  442.     with 'CON' option!
  443.     HOME        $HOME variable
  444.     ARGP        path to the (first of) argument(s) (most common)
  445.     CWD         current working directory (see key commands, '^P')
  446.     APPL        the application's path (default)
  447.  
  448.     - to be continued
  449.  
  450.  
  451.  
  452. 2. The Icon Window of Appman
  453.  
  454.     The Appman icon window contains icons wich can be kind of alias
  455. to any directory or file in your filesystem.  It will have some icons
  456. having a meaning to Appman only, too.  In general these Icons have the
  457. same functionality like icons put on the Desktop, but they are put
  458. together in a kind of environment displayed in a window.
  459.     This is more a proposal to be included in the functionality of a
  460. desktop replacement (e.g. Gemini) cause all the icon handling stuff
  461. is already there. So it is rather restricted and moderate.
  462.  
  463.     2.1   The Icon Window Key Commands
  464.     2.2   The Different Icon Images
  465.     2.3   The Generated Standard Icons
  466.     2.4   Click And Double Click On Icons
  467.     2.5   Drag Icons Around
  468.     2.6   Edit Icons
  469.  
  470.     For creating of new icons see icon window key commands and drag into.
  471. The (internal) directory icons must not represent a real tree. So an
  472. icon directory could be connected with more than one icon at the same
  473. time.
  474.     The window should work like other GEM windows you know. After
  475. changing the window size the number of icon columns may change. It is
  476. adjusted always to the new window size. So you won't need any horizontal
  477. scrolling, which isn't possible at all. With the 'fuller' gadget you
  478. can toggle between the last changed window size and the full size for
  479. current number icon lines and columns.
  480.     You can make Appman opening the window automatically after starting
  481. with a variable in the 'appman.inf' file. See 'WOPEN'.
  482.  
  483. Icon Window Key Commands
  484.  
  485.     The key commands should be compatible with Gemini's as far a
  486. possible. Try key [Help] with the Icon window topped.
  487.  
  488.  
  489.     Non control characters are added to the 'select icon string'. The
  490. first icon's name matching this string gets selected. This is not case
  491. sensitive by default (see CASESENSITIVE). The string is displayed in
  492. the window's info line.
  493.  
  494. Special actions:
  495.     ^Q             quit (if Appman is running as an accessory only the
  496.                       window is closed)
  497.     ^H             make ST-Guide display this manual (Appman tries to
  498.                      start 'ST-Guide' if not running yet)
  499.     ^L             reload inf files (e.g. after editing them)
  500.     ^S,[Alt]S      save icons - a file 'appmanic.inf' is generated,
  501.                      in the same directory as 'appman.inf' was found.
  502.                      It will be read in on the next start automatically
  503.                      by Appmann, or after the '^L' - load command.
  504.                      In this file the window size and position is
  505.                      stored, too.
  506.     ^P             set path (cwd) - of course this makes sense only in a
  507.                      MultiTasking environment, where an Acc can start
  508.                      a process in a certain working directory.
  509.                      But it will show the cwd with the file selector if
  510.                      setting isn't possible.
  511.  
  512. The window actions:
  513.     ^U, [Delete],  close window
  514.         ^D
  515.     [Backspace]    show 'parent' Icon directory or close window
  516.                      if none; if there is a 'select icon string', it
  517.                      will delete the last charcater, and have no
  518.                      effects on the window itself.
  519.     [Home]         scroll the window to the first icon
  520.     ^[Home]        move the window to the default position and size
  521.     [Undo]         reset the 'select icon string'
  522.     [Escape]       deselect the icon and reset the 'select icon string'
  523.     Cursor up/down scroll the icon window if possible
  524.     ^I, [Tab]      with no icon selected: show some Appman infos
  525.                      (paths, memory, etc)
  526.  
  527. The icon actions
  528.     ^I, [Tab]      with icon selected: show info (like edit this time)
  529.     Cursor l/r     select next/previous icon, or first if none is
  530.                      selected
  531.     [Return]       'execute' (simulate a double click on) the selected
  532.                      icon
  533.     ^E             edit Icon (see edit icons)
  534.     ^N, [Insert]   create a new Icon - A dialog box will ask wether to
  535.                      insert just an icon or to create a new icon
  536.                      directory. It will not work if there are already
  537.                      16 icons in the current directory. The edit Icon
  538.                      Dialog will appear at once.
  539.     [Shift][Delete],
  540.     ^[Delete], ^?  delete selected icon
  541.                      Icon directories are not deleted with this command
  542.                      but (recusively) marked as deleted. To get rid of
  543.                      them save the icons and make Appman read the inf
  544.                      files in again.  So an icon directory connected
  545.                      with more than one icon doesn't get lost.
  546.  
  547.  
  548.     All other control charcaters (including [Alt]<key> etc.) are sent to
  549. Gemini via AV protocol message.
  550.  
  551.     - to be continued
  552.  
  553. The Icon Images
  554.  
  555. There are 8 different icons builtin in Appman. 7 of them
  556. you can use as you want, though they look like representing
  557. some different functions.
  558.  
  559.  
  560.  
  561.  
  562.  
  563.     Internal Appman directories
  564.     Path Icon - directory alias
  565.     File Icon - file or process alias
  566.  
  567. Appman directory
  568.  
  569. internal Appman
  570. icon directory
  571.  
  572.     In most cases it is better to use different icons for Appman's
  573. own directories and directories in your file system. But Appman
  574. itself makes an exception form this when generating the
  575. Automaticly Generated Icons.
  576.  
  577.     You can insert links to any other icon directory in every
  578. icon directory editing the 'icon inf' file by hand. The icon directories
  579. must not represent a real tree.
  580.  
  581.  
  582. back to parent
  583. directory
  584.  
  585.     The 'back to parent directory' icon is generated automaticly
  586. in every new icon directory; you can't change it's image nor it's
  587. position in the window.
  588.  
  589.  
  590. Path Icon
  591.  
  592. Path
  593. Icon
  594.  
  595.     A path icon represents any path (root directory of any drive, or a
  596. directory anywhere in your file system). Double clicking this icon
  597. should force the desktop (e.g Gemini) to open a window and show the
  598. directory there.
  599.  
  600.  
  601. File Icon
  602. A file icon
  603. represents any
  604. file from your
  605. file system or
  606. just a process
  607. that may be running.
  608.  
  609.     When you are installing such an icon Appman will fill in a proposal
  610. process name to call on double clicking this icon. If the file's name
  611. has no 'GEM' extension this will be 'APPLHAND', and a double click
  612. will show the Appman Popup on this >file<, unless it has some
  613. executable extension. Shell scripts and other script files are handled
  614. by the 'APPLHAND' pseudo process, too. The options defined with the
  615. icon (e.g. CON, ...) will be used running a script like for any other
  616. executable.
  617.     If you don't set the prefer message to process switch
  618. (see edit icons) script files won't be recognized, and the the
  619. file gets just executed (this will cause an error if the file isn't
  620. executable at all). So normally you should select the button
  621. prefer message to process and use 'APPLHAND' as process
  622. name. But for a Gemini 'gin file' e.g. you should select the 'CON'
  623. option and keep the prefer message to process switched off.
  624.  
  625.  
  626. Automaticly Generated Icons
  627.  
  628.     If Appman can't find a file 'appmanic.inf' after getting started
  629. or after a load inf files command (^L), some default icons are
  630. generated. These are alias icons to the root pathes of all drives
  631. Appman could find in your environment. These icons are stored in some
  632. icon directories 'Filesystem'. You can edit - that is change - these
  633. icons, move or delete (some of) them.
  634.     Unless you save the icons ([Alt]S command) they will be generated
  635. each time Appman is started or you make Appman reloading the inf files.
  636.  
  637.     -to be continued
  638.  
  639. Click Icons
  640.  
  641.     All clicks mentioned here are ones with left mouse button.
  642.  
  643.     A single click selects an icon, e.g. for editing it.
  644.  
  645.     A double click will 'run' the Icon like clicking on a icon in
  646. the Desktop. Pressing [Return] or [Enter] key with a selected icon
  647. will do the same. example
  648.  
  649.     together with [Control] key pressed
  650.         edit Icon (now like in Gemini)
  651.     together with [Shift]
  652.         perform the 'show' action specified for the file this icon
  653.         is representing (if there is a file) - see Appman Popup
  654.     together with [Alt]
  655.         Let the Desktop (Gemini) open a dir window with the
  656.         path the icon's file is in. (This works with every
  657.         icon, that has a path specified, even a disabled path)
  658.  
  659.     An untopped window will be topped unless you hold down the right
  660. mouse button when clicking.
  661.  
  662.     If your OS don't supports actions in background windows the click
  663. is not sent immediately to Appman. See MOUSEBGTIMER in special keywords
  664. for actions in untopped windows in any case!
  665.  
  666.     -to be continued
  667.  
  668. %dclickex
  669.  Assume: the icon is an internal,
  670.  'message to process' is selected,
  671.  process is "CHMELEON". Commandline
  672.  is "C:\ST-GUIDE.ACX".
  673.  Then The Chameleon will load and
  674.  start ST-Guide Accessory.
  675.  
  676. drag icons
  677.  
  678. Dragging icons is rather context sensitive. It makes some difference
  679. which icon is dragged onto what.
  680.  
  681.     1. Drag Inside An Appman Window And Out
  682.     2. Drag some Icon(s) into the Appman Window
  683.  
  684.  
  685. Drag Icons Inside And Out
  686.  
  687. Drag any icon onto an internal directory icon: e.g. an Drawer Icon
  688.     the dragged one is moved into that directory.
  689.  
  690. Drag any icon onto some empty space in the window:
  691.     the dragged one gets the last in the window (change order of icons)
  692.  
  693. You can move internal icons, not representing any path, only like
  694. the two above examles.
  695.  
  696.  
  697. Dragging an icon representing any path (file, directory)
  698.  
  699. onto a file icon or an application icon:
  700.     The target icon gets run with argument draged icon.
  701.     If the target is in the Appman window too, a dialogbox may
  702.     appear - see REQUEST.
  703.  
  704. onto a path icon
  705.     The object(s) represented by the moved icon get copied into the
  706.     directory target icon.
  707.     (This works only if target is outside Appman window, this time.)
  708.  
  709. onto a special Desktop icon
  710.     (works this time only via AV protocol, soon for DragDrop, too)
  711.     Trashcan
  712.         see 'onto path icon'
  713.     Clipboard
  714.         write the path the icon is an alias for into the clipboard
  715.     Shredder
  716.         the icons gets deleted
  717.  
  718.  
  719. Drag Icons Into
  720.  
  721. You can move one or more icons at same time into the Appman window if
  722. the program the icons come from support a DragDrop communication or
  723. AV protocol:
  724.  
  725. onto an internal directory icon (Drawer Icon) or some empty space:
  726.     The icon(s) get(s) inserted there as new alias icons; you can edit
  727.     the new created Appman icons. See edit icon.
  728.  
  729. onto a file icon or application icon:
  730.     The target icon 'gets started' with argument(s) moved icon(s).
  731.     That means: the file represented by the target icon gets started
  732.     (like double clicked), the arguments are the object(s) represented
  733.     by the dragged icon(s).
  734.  
  735. onto a path icon
  736.     The objects represented by the dragged icons get copied to the
  737.     directory represented by the target icon.
  738.  
  739. Edit Icons
  740.     The edit Icon dialog (it looks not very nice ;-)) is divided
  741. into 4 parts. Some are hidden or disabled sometimes, for easy usage.
  742. So an 'internal' icon of course is not representing a file.
  743.  
  744.     The first one is the alias part - what is the Icon standing for. An
  745. internal one could be a 'message to process' icon or a new directory of
  746. icons (see ^N key). A file alias icon can be a 'message to process'
  747. icon, too - the process gets called if it is running, if not the
  748. 'file' is executed.
  749.     You can see the default action for an alias icon 'execute file',
  750. or 'show directory' if 'path or 'file' is on. For non-regular files no
  751. action than dragging is possible. You can't switch 'path or 'file',
  752. Appman knows it better. :-)
  753.     If you change the alias from a path to a file some edit fields
  754. are 'selected' to remember you on the changes you'll have to do.
  755.  
  756.     If in a path alias icon 'message to process' is selected, the
  757. process (e.g. 'TREEVIEW') is called with the directory as argument by
  758. the 'protocoll' selected in the third part.  If PAR-flag is selected
  759. too, the 'wildcard' will be added.  If there is no process or 'message
  760. to process' is off Gemini or the Desktop is asked to show the directory.
  761.  
  762.     There is a pseudo process recognized called 'APPLHAND' which calls
  763. the Appman popup on the file aliased with the icon (this maybe usefull
  764. for setup files like 'profile', 'mupfel.rc' etc., and is standard for
  765. all icons which don't represent a GEM programm). If such an icon is an
  766. alias for an executable, the 'Application Flags' are used for executing
  767. this file.
  768.  
  769.     When creating new icons Appman will insert an appropriate
  770. application name for the 'process' field, by testing the extension of
  771. the selected file. Any from GEMSUFFIX is regarded as a possible running
  772. process, while all other are better to run by the APPLHAND builtin
  773. functions. Any filled in name has no effect unless the
  774.     prefer message to process button is switched on.
  775.  
  776.     The second part deals with the Icon itself (picture, text).
  777. This part is always visible and editable. With a double click on the
  778. 'Icon color' field this part gets redrawed with a possibly new color.
  779.  
  780.     The third with the commandline or wildcard if a directory. There
  781. are some switches how to deal with the program/process, too.
  782. These 'Application Flags' will be only visible if it could be of any use
  783. to you. (see internal options for the meanings)
  784.     To get the edit field updated after scrolling and deleting some
  785. chars just double click it. Think of the magic '@' which should never
  786. appear on first position (this is an AES feature!). You can't insert
  787. 'tabs' here, and don't try this by editing the 'appmanic.inf' file.
  788. But you can use the DragDrop quoting scheme her too, to include spaces
  789. in arguments.
  790.  
  791.     The last part are some exit buttons to end up the dialog in any
  792. way.
  793.  
  794.     - to be continued
  795.  
  796.  
  797.  
  798. 3. How to Install And Details
  799.  
  800.     3.1  How to Install Appman
  801.     3.2  The Files
  802.     3.3  Environment and Paths
  803.     3.4  Details About Messages Send And Received
  804.     3.5  How to Patch 'appman.acc' For Other Icons
  805.     3.6  Bugs And Features
  806.  
  807. How to Install
  808.  
  809. 1.  copy 'appman.acc' into root directory of your boot drive or
  810.     into directory '$ACCPATH'. appman.acc could be run using
  811.     'The Chameleon', too.
  812.     You can use any of the distributed binaries, running them as APPs or
  813.     ACCs just as you like it.
  814.     (e.g. copy 'appman2.acc' to MagiC's 'APPS' directory
  815.     'APPS\appman.app').
  816.  
  817. 2.  'Anwendung anmelden'
  818.     (how is this called in usenglish by Atari, apply ?)
  819.     With Gemini:
  820.     appman.acc (or appman.app) is 'Application' for all files ('*')
  821.  
  822.     No Gemini, but MultiTOS, etc.
  823.     callaman.gtp is 'Application' for all files ('*')
  824.     You will have to copy this binary to a suited place first.
  825.  
  826. 3.  Copy appman.inf to '$HOME' or '$ACCPATH' (the env variable must be
  827.     known to AES if you do so) or into root directory of your boot
  828.     drive.
  829.  
  830. 4.  Copy appman.hyp into the ST-Guide Hypertext directory.
  831.  
  832. 5.  Edit appman.inf, modify according to your environment and this
  833.     manual.
  834.  
  835. 6.  Reboot or run 'appman.app' and install the icons in Appman's icon
  836.     window as you like it.
  837.     Save the Icons using '[Alt]S' key command.
  838.     And if you want, make Gemini saving the Appman window state in
  839.     it's gin file. ([Alt]S with Gemini topped)
  840.  
  841.  
  842. 3.2. The Files
  843.  
  844. The distribution contains some files, first the different binaries:
  845. You can distinguish them after renaming with the 'what' command.
  846.     appman.acc
  847.     appman2.acc small icons, not patchable
  848.     appman.app  only for Multitasking (especially for running
  849.                 Appman under MagiC)
  850.                 You can rename it to 'appman.acc' of course, and use
  851.                 the extended menu switches, see MENUS.
  852.  
  853.     a 'readme' and the documentation 'appman.hyp'. The german hypertext
  854. 'appman_d.hyp' (german manual) and printable manual files with the
  855. '.txt' extension. There is only an example appman.inf file, but no
  856. 'appmanic.inf' file, cause this depends too much on the local
  857. environment.
  858.     Appman makes use of two files, the appman.inf file described in
  859. chapter 1.3 Configuration File and the icon
  860. inf file, 'appmanic.inf' described on next page.
  861.  
  862.  
  863. The Icon Info File appmanic.inf
  864.  
  865.     Be carefull editing this file. You can crash your system with a bad
  866. icon inf file though Appman tries to detect bad inf files. Each char is
  867. significant in this file esp. spaces between Tabs.
  868. See the hints at end of this page!!
  869.  
  870.     It's an ASCII file with maybe long lines (up to 1K), containing all
  871. the icon definitions and values, and some information for Appman about
  872. it and the window size and position.
  873.     Main delimiter is '^J', newline, so each line is an entry, either an
  874. icon directory or an icon (if the line begins with '^I', TAB). TAB,
  875. '^I' is the secondary delimiter between the single expessions.
  876.     An icon directory line starts with a '#', followed by its name.
  877. The second expression is a number to identify this directory for a link.
  878.  
  879.     An icon's line first expression is it's number (0 to 7), followed
  880. by the icon char expression (the icon's colors and the character),
  881. followed by a flags expression.  The next is the icon's text (a least a
  882. space char).
  883.  
  884.     The following expressions depend on the icon's definition:
  885.  
  886.     If it is a link to another icon directory - which is the only
  887. interresting thing to edit this file by hand - it starts with an '@'
  888. char, followed by the number of the icon directory this is a link to.
  889.     There is a rule that links to a directory in the same subtree, some
  890. levels above must have a flags expression of '7' while links to other
  891. subtrees have one with the value '3'. This is to prevent dangerous
  892. endless recursive loops when deleting one of this links.
  893.  
  894.     To add some links into the icon inf file, copy an already existing
  895. icon and just edit the number after the '@' to make it pointing to some
  896. other icon directory.
  897.  
  898.     To change the color the icon is displayed with edit the icon char
  899. expression, the second number in an icon line. The value here is the
  900. ib_char value from an ICONBLK structure.
  901.  
  902.     The other values there you shouldn't modify; you can uppercase or
  903. lowercase the filenames, or move complete lines around, but you should
  904. know what you are doing then.
  905.  
  906. 3.3. Environment and Paths
  907.  
  908.     Appman looks for the inf files (appman.inf, appmanic.inf) in
  909. the path defined in the following AES' environment variables first,
  910.     $ACCPATH
  911.     $HOME
  912. and cwd (mostly the current device's root directory) last.
  913.  
  914.     Both files are assumed in the same directory. The appmanic.inf
  915. inf file is generated (by key command) in the same directory as the
  916. appman.inf file is found in.
  917.  
  918.     $GEMEXT
  919.     $ACCEXT
  920.     These two variables' contents are added under MultiTOS to Appman's
  921. builtin EXECSUFFIX list and GEMSUFFIX list, for Accessories can run by
  922. Appman itself.
  923.  
  924.     $AVSERVER
  925.     It's contents replace the builtin 'GEMINI' entry in Appman's
  926. AVVALIST list.
  927.  
  928.     $PATH
  929.     For Gemini needs a complete path to an application to run by
  930. an AV_STARTPROG message Appman tries to get this path - if not
  931. specified in the appman.inf file - by a shel_find() call. So the AES
  932. should know your PATH environment variable as well as e.g. Gemini does.
  933.  
  934. 3.4. Details About Messages
  935.  
  936.     The Application manager is started (e.g. the popup menu) after
  937.     receiving a VA_START message (VA protocol) or a DragDrop 'ARGS'
  938.     message with a '-1' window handle or '-1' mouse coordinates.
  939.     A third way is to run the 'callaman.gtp' with one or more
  940.     arguments.
  941.  
  942.     In these cases the mouse position (to place the popup) is inquired
  943. by a graf_mkstate() call.  The 'argument' is a list of 'objcets' to
  944. perform some actions on.  The first one is used to select the command
  945. to run.  This is done by using the extension (see SUFFIX) and the list
  946. of patterns from the 'appman.inf' file.  Scripts starting with '#!' are
  947. handled as to expect.  To detect the pressed [Shift] key combinations
  948. the kstate variable (DragDrop) or the graf_mkstate() call is used
  949. (VA_START).
  950.     An application using this feature should send those messages after
  951. any double click on an object (icon) it can't handle itself, or having
  952. to do with executing, editing etc.
  953.  
  954.     A new Icon is inserted in the icon window after an 'VA_DRAGACCWIND'
  955.     message (VA protocol), or a DragDrop message with msx and msy
  956.     values > 0 and the Appman's window handle.
  957.  
  958.     Outside dragged icons start a DragDrop communication ar an AV
  959. communication. A VA answer 'UNKNOW OBJECT' will is always force
  960. Appman to use a DragDrop message, while this is tried after an
  961. 'THAT IS A WINDOW' answer from AV server first.
  962.  
  963.     -to be continued
  964.  
  965. 3.5. Patch Icons
  966.  
  967.     Here are some details describing how to patch the binary file
  968.     'appman.acc' to make it using other Icons.
  969.  
  970.   - The maximum size of an icon image is 32 * 32 pixels.
  971.   - Only one color icons are posible.
  972.   - The width of an icon image must be something like n * 16 pixels.
  973.   - All coordinate values you fill in there are numbers of pixels.
  974.   - The text coordinates should not place the text above the
  975. object, i.e. if they are negative and you add the 'ib_xicon',
  976. 'ib_yicon' value, the results should be 0 or positive then. If not,
  977. an appman's routine will do that.
  978.  
  979.     In the binary you'll find a string "ICON$&\0". After the null byte,
  980. you should be at an even address, where the icons' datas start.  That
  981. stuff is put in 16 arrays of 32 unsigned longs each.  This is the
  982. reason you can't exceed he 32 * 32 pixels size of an icon.  The icons
  983. are put there in the order you have in the 'edit Icon' dialog.  The
  984. last one is the 'return' icon.
  985.     The first array is the first icon's mask, the next it's image, and
  986. so on.  After the last's (8th) icon's image data you'll find the string
  987. "&$". If you are going to overwrite it something went wrong.
  988.  
  989.     You will find another string in the binary: "ICONBLK$&\0". After
  990. the null byte - even address - begins an array of 8 "ICONBLK"
  991. structures. After the last entry you'll find a string "&$" again.
  992.  
  993.     You will have to fill in there the values of:
  994.     ib_xchar, ib_ychar, ib_xicon, ib_yicon, ib_wicon, ib_hicon,
  995.         ib_xtext, ib_ytext, ib_wtext, ib_htext
  996. for each of the structures according to your icons.
  997.     All icons including their text should fit in a rectangle calculated
  998. from the first icon (regarding it's size and text coordinates).
  999.  
  1000.     This is not a very simple game, I know, but maybe someone writes a
  1001. program that uses a resource file you created with the needed
  1002. structures to make this patch.
  1003.  
  1004.