EDICON v1.00 John Elliott, 29 July 1996. ============================================================================== EDICON is a program to edit the icon files used by two Digital Research products: the GEM desktop (DESKTOP.APP) and ViewMAX (VIEWMAX.EXE). Installation ============ 1. Copy EDICON.EXE to a directory in your search path. 2. Under GEM: Highlight EDICON.EXE, select "Configure application" from the "options" menu, and set up as follows: Document types: ICN Application type: DOS - takes parameters Needs full memory: No Memory required: 128k Icon type: Whatever you want! Then select "Save desktop" from the "options" menu. 3. Under ViewMAX: Highlight EDICON.EXE, select "Configure application" from the "options" menu, and set up as follows: Takes parameters: [X] Document types: ICN Icon type: Whatever Then select "Save preferences" from the "options" menu. Use === EDICON can be used from GEM, ViewMAX or DOS. It should work with CGA, EGA or VGA screens. If you have a mouse driver loaded, mouse support is enabled. From GEM or ViewMAX, start EDICON by double-clicking its icon. From DOS, start EDICON with the command: EDICON or EDICON filename.icn When EDICON is started, the screen will clear except for the menu bar at the top. To bring down a menu, press the initial letter of its name (F for File, S for Screen etc.) or click once on the name with the mouse. Menu options are selected by moving the highlight bar to them with the cursor keys and pressing ENTER; or by double-clicking them with the mouse. Press ESCAPE or the right-hand mouse button to cancel a partly-completed action. The other main input technique is the selector; this could look like: +--+ < | | > +--+ At the edges of the selector are two arrows; in the middle is an item such as an icon. Clicking on the arrows or pressing the cursor left/right keys will change which icon is in the middle; press ENTER or click the icon to confirm the choice. The File menu ============= This menu has five options: New... Create a new icon database from scratch. Save Save the current icon database. If no database is loaded, then nothing happens. save As... Save the current icon database under a new name. If no database is loaded, nothing happens. Load... Load a new icon database. Quit Quit the program. The Screen menu =============== This menu allows you to alter the colours used. The first option is either: Background... [CGA] or Palette... [EGA and above]. On a CGA computer, a selector will appear containing a number. This number ranges from 0-15 and is the background and border colour. Modify it in the normal way. On an EGA or higher computer, four selectors will appear - one for each of the screen colours used. You can use the up/down cursor keys to decide which selector is active, or click to the left or right of the number you want to modify. The second option switches between the two standard CGA palettes. To alter this option, highlight it and press SPACE (or double-click it). The Icons menu ============== This menu has three options: 1. Edit a bitmap. A selector will appear allowing you to choose which bitmap you want to edit. When you have chosen, you will enter the bitmap editor (see below). 2. Add a bitmap. Another bitmap (up to a maximum of 144) will be added to the file, and the editor is entered. The bitmap will contain random data. 3. Define an icon. When you choose this, a double-deck selector will appear. On the bottom is the icon bitmap; on top is its mask, which does not appear to be used by GEM or ViewMAX. The mask is just a solid box which should be big enough to surround the icon completely. Normally, you can use one of the four standard masks provided (drive, folder, application and document). There are 72 icons. The first eight are "Drive 0-7", and contain the necessary information for disc drive icons and folder icons. There are then 32 application types, and 32 corresponding document types. When you have selected the icon, the two bitmaps in the display can be independently changed. Use the up and down cursor keys to change the mask bitmap, and the left and right keys to change the image bitmap. If you are defining an application or document icon, you will now be asked for a name for this icon. If there is a name already suggested and you want to change it, press the -> key until the cursor is at the end and delete it (the mouse cannot be used for this). It is customary for a name to have a space at each end. If you are defining a disc drive icon, you will instead see the icon in question with a coloured box superimposed. The box shows where the drive letter would appear, and you can move it with the cursor keys or by clicking the arrows around the icon. The bitmap editor ================= The bitmap editor is both mouse- and keyboard- controlled. The bitmap in question appears in the centre of the screen, with a preview version to its left. You can alter the bitmap either by moving the small "dot" cursor to the correct position and pressing SPACE, or by clicking on the correct position. There are five menus, selected by pressing the keys 1,2,3,4 or ESC: 1=Rotate: Rotate the bitmap thorugh 90 degrees if it's square, or 180 degrees if it isn't. 2=Move: Slide the bitmap up, down, left or right. 3=Reflect: Mirror the bitmap. 4=Clipbd: Clipboard. Options are: - Zap image - make it completely blank. - Copy to clipboard - Copy the current image to the clipboard. Clipboard contents are lost when files are loaded or created. - Paste from clipboard - Copy the clipboard contents to the editing window, replacing what was there. - Swap with clipboard - Swap the clipboard contents with the current image. ESC: Finish or abandon the edit. Miscellany: =========== The following icons are treated specially by GEM and ViewMAX: Drive icon 3: The "mask" is used when a folder is highlighted; it is drawn, slightly offset, over the folder icon. The "image" is used similarly when a drive is highlighted. The "generic" document and application images (icons 8 and 40 respectively) are used similarly to highlight documents and applications. Supplied files: =============== JCEHI.ICN and JCELO.ICN are two icon files containing: - All the ViewMAX icons. - Application and document icons for: + Internet programs; + Compression (eg .ZIP); + generic DRDOS programs; + The icon editor itself; + Font editors; + Disc utilities; + Arcade games. - The floppy drive icon is for a 3.5" disc; - There is a document icon to match the "mail" application icon. To use these files, move them to \DRDOS\VIEW*.ICN or \GEMDESK\DESK*.ICN. Creating a new application/file type ==================================== Here is a worked example for adding a new application/file type pair to the "high-resolution" file VIEWHI.ICN: 1. Select "Load" from the "file" menu, and enter the filename: \DRDOS\VIEWHI.ICN 2. Select "Edit bitmap" from the "icons" menu, copy the "generic application" bitmap to the clipboard, and abandon the edit. 3. Select "Add bitmap" from the "icons" menu, paste the clipboard contents into the current image, and edit the resulting image; then finish the edit. 4. Repeat steps 2 and 3 with the "generic document" bitmap. 5. If all has gone well, you will find yourself with two extra bitmaps which contain your application and document type. Select "Define icon" from the "icons" menu. 6. Choose a spare "application" icon/mask pair with no name - not one of the spare "Drive n" icons or "Generic". If there are no such pairs, find a pair you don't use (such as "Project"). 7. Set this application's icon to your new bitmap. 8. When asked for the name, type the new name with a space before and after it. 9. Select "Define icon" from the "icons menu", and scroll through until you find the "document" icon with the name you typed in. Set the document icon to your other new bitmap. 10. Save the file, run ViewMAX and see if it worked! Technical ========= EDICON was compiled using Pacific C. The file format for a GEM/ViewMax icon file is: [DB - byte DW - 16-bit word, least byte first DD - 32-bit word, least byte first DS - reserve space] DW nametbl ;@Pointer to names table DW offset ;Subtract this value from all pointers marked @ to ;get a 0-based pointer. DS 990h ;Icon table. ;72 entries of length 34: ; 8 for drives: Hard; Floppy; Folder; highlights; Networked (Viewmax only); Spare;Spare;Spare ;32 for apps, matching the 32 name pointers below ;32 for the equivalent document types. Then the bitmaps, as many as necessary; Then the 32 document type-names, each a 0-terminated string; Then a table of 32 @pointers to the 32 names of the document types, which should be somewhere in the preceding bytes. Each entry in the icon table is: DD mask_no ;Image number for mask, zero based DD spr_no ;Image number for sprite number, zero based DD -1 ;? DW 1000h ;? DW x ;X offset for drive letter (0 if not a drive) DW y ;Y offset for drive letter (0 if not a drive) DD z ;17h in hires icons, 0fh for lores icons DW width ;Icon width, pixels DW height ;Icon height, pixels DW w ;0 (hires) / 4 (lores) DW height ;Icon height, pixels. Again? DW 72 ;? DW 10 ;? Special entries are: Icon 0: Floppy drive Icon 1: Hard drive Icon 2: Folder Icon 3 bitmap: drive highlight Icon 3 mask: folder highlight Icon 4: Network drive (ViewMAX only) Icon 8 bitmap: application highlight Icon 40 bitmap: document highlight Bitmaps: The bitmap is stored line-by-line, with each line being stored as two or three little-endian words. To get it into more conventional raster lines, each odd-numbered byte in the line must be swapped with the even-numbered byte to its right.