WICON(1) USER COMMANDS WICON(1) NAME wicon - Window Iconifier SYNOPSIS wicon [-[!]a] [-b [/|*]boxes] [-c [+|-]chars] [-[!]d] [-[!]f] [-[!]i] [-l lines ][-p [+|-]priority] [-[!]q] [-[!]r] [-[!]s] [-[!]t] [-[!]w] [-W console] [-[!]&] wicon ? ; list arguments and their defaults wicon ; close an invocation of wicon DESCRIPTION Wicon operates on only one screen at a time. The WorkBench screen is chosen unless the -f (first screen) argument is set. A Window can be `iconified', when it is `active' by hitting it with the RMB (Right Mouse Button). The specific method depends on the code, at the moment, you must not move the mouse between pressing and releasing the RMB. This must also be done within DoubleClickTime(3), ie set from Preferences. Some windows are by exempt from this iconification. Workbench windows are those that are controlled a 'loadwb' program. From a progamming view, they are those windows where we can say (Window->Flags | WBENCHWINDOW). This was done because when a window's icon is double-clicked, that window (if alrady open) is brought to the front. However to iconify these windows would be an advantage to those with floppys and full directorys. Just use "WBWINDOWS=TRUE" or "-w" to be able to iconify them. After much experimenting, I found that I liked to iconify windows with a single Right Mouse Button (RMB) click. This causes problems on programs that do things on a RMB event : 1> To get a menu 2> To freeze a display 3> To choose something on the display The solution was, to not give the process (or active window) the RMB down and up events if they were signally Wicon to do its bit. For (1) and (2) this was Ok, because you just move the mouse a little and you don't think anythings amiss. Unfortunately for things like AMIGAP and DME, where it is nice to use short sharp clicks, this was a pain. So if RMBTRAP=FALSE (which is the default) windows that expect RMB events, (ie. Window->IDCMPFlags | RMBTRAP), can't be iconified. To be able to iconfiy them, say "RMBTRAP=TRUE" or "-r" Note: During a RMB click, the event will not reach intuition unless it is held down for DoubleClickTime(3), or the mouse is moved!. Hence, to use menus quickly move the mouse as you click the RMB. Wicon currently is installed with MacWin, which does `rubber- banding' on OpenWindow & CloseWindow (as well as Iconification). ie. Does it for all Windows in the system. To turn it off, set BOXES=0 in the Wicon.info or use -b0 on the command line. To use it on only the `Wicon' screen, turn the ALLSCREENS flag off "-!a" or "ALLSCREENS=FALSE". All of the command line options can be used from WorkBench, ie in the wicon.info, just make them ToolTypes. Also the Manx one WINDOW=CON:X/Y/W/H/name can be used as well. (for error msgs). You can also use the standard ones like `BOXES=30', ie instead of `-B30'. The Command line will accept things like: wicon -b 30 -p +5 ; \ wicon -b30 -p+5 ; > 30 boxes, increase priority by 5 wicon BoxEs=30 PRI=+5 ; / wicon -b /2 ; only use 1/2 the default boxes wicon -b0x11 ; 17 (in hex) boxes wicon -b 013 ; 11 (in octal) boxes wicon BOXES=\13 ; 11 (in octal) boxes The `-' options are all case sensitive. The string ones eg 'BoXeS' aren't. -& | -!& EXECV=boolean If true, runs an invocation of itself. This would be used from s:startup-sequence, ie "wicon -&" doesn't return until its child is running, thus avoiding disk thrashing with the subsequant script command. It does the same thing as `runback -? wicon'. Argument checking is carried out by the parent, so the child should be Ok, but the parent exits after 10 seconds if it can't find the child -a | -!a ALLSCREENS=boolean Turns off `MacWindows' for all but the Wicon Screen. This is FALSE (-!a) by default. -b boxes BOXES=short The number of rubber-bands: each one takes one cycle, or screen update. Default is 15, ie 15/50ths of a second for PAL machines, 15/60ths for NTSC. When boxes=0, rubber banding is turned off. -c chars CHARSACROSS=short The number of characters displayed in an iconfied window's title. Default is 12. This excludes depth gadgets. (ie when DEPTHGADGETS=TRUE the window is longer) -d | -!d DEPTHGADGETS=boolean Whether the wicons (Windows impersonating icons) have depth arrangement gadgets. (They take up about 50 pixels). Default is true (-d). When STICKY=TRUE, then DEPTHGADGETS=FALSE, otherwise the wicons would dissappear. -f | -!f FIRSTSCREEN=boolean Rather than use WorkBench as your Wicon Screen, use the FirstScreen. Just move the screen you want to the front. This is FALSE by default (-!f). -i | -!i ICONIFY=boolean Whether to do the Iconification stuff at all, ie if you just want the rubber-band window opening & closing. Default is on (-i)! That means say -!i to turn it off. -l number LINES=short The number of lines of icons to stack down the bottom. (My and Tim's preferred place). Default is 1, which builds one line down the bottom, then starts building up. If Lines=0, the windows' wicons are placed where they are (parent X,Y). -p priority PRIORITY=short Changes this tasks priority. I can't imagine why this would make much difference, (and it doesn't). The default is (-p+0), which makes no change. -q | -!q QUIET=boolean If true, does not display the Copyright message. The default is on (-q). -r | -!r RMBTRAP=boolean If true, then we also iconify those windows that have are receiving RMB (Right Mouse Button) events (through RMBTRAP). Default is false (-!r). -s | -!s STICKY=booelan If true, iconifed windows stick to the WorkBench window, ie behind application windows, just like a real Icon! Default is false (-!s). Depth gadgets are off by default] in this mode so that you can't inadvertently push your icon behind the WorkBench (Backdrop) Window! -t | -!t TESTING=boolean Testing, just Opens and Closes a window using MacWin. (ie Installs/Deinstalls OpenWindow & CloseWindow). Default is false (-!t) -W string WINDOW=string Based on the Manx implementation (but fully independent) a window is opened if a ToolType parsing error occurs. The default window is "CON:0/0/640/100/Error Window". Note the CAPITAL `W'. This doesn't work from CLI anyway. -w | -!w WBWINDOWS=boolean When true, WorkBench Windows ie those drawers etc that appear from double clicking icons, are also available to be iconified. Default is false (-!w). To get a list of defaults, just type "wicon ?" or "wicon \?" from shell or csh. FILES Wicon.info - yes it's implemented, all of 3 lines! BUGS A very few programs don't like it. Most look really interesting, like Preferences which opens a 1x1 window I presume to, like everyone else to get WBENCHWINDOW->WScreen. Unless you don't like it. Had problems with a friends version of mclk, I believe it has timing problems because I take so long to return from the CloseWindow call. One real bug is that occassionally (twice in 5 months), closing a window writes outside its bounds as though it was bigger to begin with. I can't duplicate it. Wicon's inherit their Parent's Window->Titles and ScreenTitles. (Menus crash.) If these change, then Wicon doesn't know. This has never happened, but if it happens to you, just take out the offending code. Also, if a version is made that inherits the kill gadget, (and thus the UserPort) beware of programs that release the resources of another program by looking at the ownership of Ports (Sig_Task). Beware of any program that uses SetFunction(), things like mwb especially. When they exit, they restore the vectors to what they were originally. Wicon waits arounds until the vectors it installed are restored! (See UnSetFunction(3) ). SEE ALSO OpenWindow(3), CloseWindow(3), GetDiskObject(3). AUTHOR Steven Sweeting 24-Apr-88 If you like this program send me a postcard: Steven Sweeting FAX +61 2 772-2713 442 Willarong Rd, Caringbah 2229 NSW, Australia. ACSNET/CSNET: steven@kylie.oz.AU ARPA: steven%kylie.oz.AU@UUNET.UU.NET UUCP: {uunet,hplabs,mcvax,ukc,nttlab}!munnari!kylie.oz!steven Send $AUD10 for a disk with latest source of any P.D. stuff I've done. Please specify preferred File System, and version number :-). Thanks to Andrew Smith for being a pain w.r.t. the WIconification method, and Tim Edgoose for suggesting LINES. DISCLAIMER This program is NOT in the public domain. Distribution of source and executable (as a whole) for profit (other than by non-profit organisaitons) may not take place without consent from the Author. Sections of code other than the Input Handler may be freely utilised anywhere anyhow. This notice must be included whenever this program (source or executable) is propogated. There are no guarantees that this program won't install a virus in some hidden track of some particular HD*: device, reset the system time when it feels like it, set its process priority to +127 and busy wait, or just give a really nasty GURU. (Moi?) Any resemblance of this program to any operating system living or dead is totally coincidental, (especially to the Wac :-) Portions Copyright (c) 1987 Davide P. Cervone (Input Handler) .PROJECT To write a program with more options than (unix) ls. .PLAN To write a program with more options than acsstate! FUTURE If I do do anymore, it will be to implement bit-map sliding icons, graphic self-updating icons. Also kill gadgets and other things through a linking of IDCMP ports. Please write programs that iconify themselves (without my help, through RMBTRAP), using the Right Mouse Button, ieg AmigaP, and DME. NOTES Ok, all you CLI programmers, now there's no excuse, before you chuck this program away, have a look at GetTools(), which just converts the ToolTypes to (argc-1,argv-1), and also UnSetFunction(), which MUST be used to maintain the integrity of your program if you use SetFunction(). Although the MacWin stuff is done above board (locking the Screen), (Set/UnSetFunction), please don't use it in commercial programs, its just looking for trouble. I have however found only two programs, clk2 (and presumably clk, and The yellow sub BADGE demo). Much of this isn't supposed to work, according to the 1.1 Docs anyway! REVISION 1.14 Last Modified 24-Apr-88 (c) 1988