ClipBook V1.0 © 1994 Nick Portalski ======================================= Overview ======== I spent a couple of summers working on Macs writing documentation. On of the most useful tools was the Mac Scrapbook, which allows you to store any number of 'clips' (text and graphics) and then copy any one to the clipboard so you can paste it into applications. Items were placed in the scrapbook via the normal cut'n'paste keys. In fact, I liked it so much that I wrote this - Amiga Clipbook commodity. So, the Clipbook allows you to store text and graphics clips, scan through them and copy any of them to the standard Amiga clipboard. They can then be pasted into applications. To put something into the Clipbook you simply have to copy it from an application and paste it into the Clipbook. This is useful for logos, 'standard' blocks of text, graphics you use often etc etc. If you use a particular graphics brush often then instead of having to load it (and remember the path!) each time you can simply store it in the clipboard and copy it out each time you need it. Distribution ============ All code is Copyright 1994 Nick Portalski. It may be copied and distributed so long as no commercial profit is made out of it. It may not be modified, sold, or included in any commercial distribution without my written permission. Public Domain vendors are not allowed to sell this program for more than the price of a regular disk, which should be no more than the equivalent of 5 Dollars. The author takes no responsibility for any loss or damage resulting from the use of this program. This distribution should contain the following files: ClipBook ClipBook.info ClipBook.doc ClipBook.doc.info iff.library Requirements ============ * Workbench 2.xx+ * The iff.library by Christian Weber (included in archive). * Although Clipbook will run happily from floppy it has been designed with hard drive users in mind. Installation ============ Clipbook is a commodity - so you can either copy it into the WBStartup directory or simply run it when you need it. As it uses tooltypes stored in the icon you must copy the .info file too. If you want to display ILBM pictures in the clipbook you must copy iff.library to your libs: directory. Clipbook should only be used from the Workbench. You should also decide where you want clips to be stored. I suggest you create a new directory. Specify the path to this directory in the icon's CLIPDIR tooltype. (See Options below). When you first run the Clipbook you will be asked "Can't find .cliprc. Create new one?" Answer "Yes" - this creates a control file required in the CLIPDIR. See Additional Notes for more information. Usage ===== Once run the Clipbook window will appear when you press the hotkey specified in the tooltype. (Or use the Commodity Exchange program to show its interface). By default it appears on the Workbench screen, but you can force it to appear on other screens. (See Options below). The main part of the window shows the current 'clip', with the rest being made up of gadgets. The slider gadget at the bottom allows you to move through all the clips in the clipbook. The text below the clip gives you information about the clips (i.e. what type it is) and how many clips there are in total. The 'View Scrap' button will launch the VIEWER program you have specified in the tooltypes (see Options below) with the current clip. This is the best way to see a clip in full, as the window only displays a small portion. Also, the Clipbook will not try to work out the colours of ILBM clips, whereas a viewer such as Multiview will. To close the Clipbook click on the window's close gadget. The Clipbook will remain resident and can be displayed with the hotkey again. The 'Quit & Die' button will close the Clipbook window *and* remove it from memory. There are 2 menus: The first is fairly straightforward: Project -> Next Clip : Moves to the next clip in the clipbook Project -> Previous Clip : Move to the previous clip in the clipbook Project -> Quit and Die : Removes the Clipbook from memory Project -> Quit(Resident): Closes the Clipbook window, but leaves the program resident. The second menu is used to paste items into the Clipbook and to copy them out. This uses the standard Amiga Clipboard, and the menu shortcut keys are the ones you'd expect for Cut/Copy/Paste. In general, to place something into the Clipbook, 'Copy' it to the Clipboard in an application, switch to the Clipbook and select 'Paste'. The item will be added to the Clipbook at the current position. (It *doesn't* overwrite anything). To get a clip from the Clipbook to an Application you have two choices. 'Copy' places a copy of the current clip in the Clipboard. You can then go to an application and choose Paste. Alternatively 'Cut' will remove the current clip from the Clipbook and place it in the Clipboard. Clear deletes the current clip without affecting the Clipboard. However, to copy from or paste to an application that application must support the standard Amiga Clipboard. Fortunately more and more are. Options ======= All options are given via the tooltypes of Clipbook's icon. They are: CX_POPUP : If 'YES' the Clipbook Window will open when the program is run. CX_POPKEY : Hotkey to open the Clipbook Window. CLIPDIR : The name of the directory where clips are to be stored. If not present the Clipbook will default to CLIPS:, but this is usually assigned to RAM:, so clips will not be permanent. If the specified directory doesn't exist you'll be informed and the program will quit when you try to open the window. If there is no .cliprc file in the specified directory you will be asked if you want to create an (empty) one. Answering 'No' will quit the program as it can't run without a .cliprc! VIEWER : The name of the graphics viewer to be run when the 'View Scrap' button is pressed. This should include the full path and any arguments to the viewer. For example, I use: 'sys:utilities/multiview WINDOW' PUBLICSCREEN: The name of the Publicscreen the Clipbook is to open on. If this isn't specified or the specified screen doesn't exist Workbench is used. FORCETOFRONT: If this tooltype is present the Clipbook will always open on the frontmost screen when the hotkey is pressed - regardless of whether it's a publicscreen or not. Obviously this can be very useful but does carry dangers. The program which opened the screen may not be expecting a window to open and you must never try to quit the screen's program before closing the Clipbook window. I cannot guarantee correct operation of the Clipbook when forced to open on the frontmost screen. It does seem to work with Ced (with system scrolling routines), Devpac, FinalWriter, FinalCopy, ProPage and to some extent DPaint. (Although see BUGS below). Clips Supported =============== You can actually paste any type of 'Clip' from the Amiga Clipboard into the Clipbook. However, it will currently only display two types: FTXT: This is standard text. ILBM: This is graphics. You'll need iff.library for this to work. SWRT: The type of clip is used by Softwood (e.g. FinalWriter). The Clipbook can store these but can't currently display them. So, for example, you can draw some structured graphics in FinalWriter, select them, select 'Copy' and then launch the Clipbook. You can now use 'Paste', and the clipbook will tell you it can't display it. You can copy/cut it later though and paste it back into FinalWriter. UNKN: The Clipbook doesn't recognise the clip, but can store it. NIFF: (Not IFF) You shouldn't see this type, as all clips must be IFF to be stored in the Amiga clipboard. It therefore indicates that something has gone wrong with a file in the CLIPDIR. Additional Notes ================ Each clips stored in the clipbook is stored as a file. All these files are stored in the CLIPDIR (see Options below). A 'control' file called .cliprc is also stored in this directory, which keeps count of the total number of clips. If the program can't find this .cliprc file it will ask you if you want to create a new one with 0 entries. If the CLIPDIR is invalid the program will quit. You can alter the contents of the CLIPDIR and the .cliprc if you really want to - but I wouldn't suggest it. If for some reason the .cliprc file is deleted you can easily re-initialise it to the number of clips in the directory. Simply cd to the CLIPDIR and type: echo >.cliprc "X" Where X is the number of clips in the directory. Also, be aware that although I can force the Clipbook to open on the frontmost screen I can't force the viewer run with the 'View Scrap' button to do the same. If you think this isn't working try taking a look at the Workbench screen to see if the viewer's window has appeared there. The History of ClipBook ======================== Version 1.0 - 14th June 1994 First Public Release Known Bugs ========== The font adaptive routines (as generated by Gadtoolsbox) aren't great - and if you use strange fonts you may find some of the text overlapping the gadgets. I will try to sort this out in future versions. During testing one particular ILBM clip caused a crash when displayed if the Clipbook was opened on Dpaint 4 AGA screen. I think this is the fault of DPaint, and is a risk you take with forcing the Clipbook to open on non-public screens. Future of Clipbook ================== There are several things I want to do with Clipbook. The first is to be able to display Softwood clips (e.g. from FinalWriter). I also hope to add structured IFF drawings and an AREXX port so that utilities such as Snap can cut directly to the Clipbook. This means many screenshots could be captured to the Clipbook, which is useful if you're writing a manual. Thanks To ========= * The authors of GadToolsBox. * Christian Weber for iff.library - it means I don't have to cope with iffparse.library! * Mark McPherson for finding the bugs; he's unnaturally good at it! * Matt Jennings for the use of his A3000 (so I could run Enforcer). Not Only But Also...... ======================== This version of Clipbook is free - although if you want to send me something to encourage future updates feel free! I welcome all comments / suggestions and can be contacted by any of the following means: e-mail: nmp@ukc.ac.uk (until end of July '94) cjd2@ukc.ac.uk (from August '94 -> This may not work, if you don't get a response try the following snail mail address. Please put "NICK P" as the subject if you use this). snail-mail: Nick Portalski 10, HollyCombe Close Liphook Hants GU30 7HR England I hope you find it useful! -- Nick Portalski June 1994