NewDeal Hot Tip 1530

[Hot Tips for...] General Use

All About Icons

What is an icon?

An icon is the little picture that NewDeal software associates with a file. Icons come in two sizes. If your monitor is VGA, EGA, or Hercules, the icons you see are 48 pixels wide and 30 pixels tall (a few are 32 pixels tall). If you have a CGA video display, then your icons are 48 pixels wide and 14 pixels tall.

The NewDeal desktop and NewManager display an icon for every file. A folder or subdirectory is just a special kind of file. If you are using a color video driver, then you will see colored icons and if you have a black and white display, you will see black and white icons. The data for each of the icon pictures lives inside the NewDeal application, driver, and library file itself. Icons for NewDeal document files are also stored within the application that created the document.

Token Database

The first time that NewDeal encounters a file and wants to display the icon for that file, it opens the file and gathers the data for the picture. NewDeal then stores that data in a special file called the Token Database, which resides in your PRIVDATA directory. If you delete Token Database, NewDeal will build a new Token Database the next time you start up the software.

Subsequently, when NewDeal wants to display the same file again, it does not need to open the individual file, but can read the icon data for all known files from the Token Database. This speeds up the display of file icons. If your Token Database is deleted, or if NewDeal encounters a new file for which it has no icon stored in Token Database, you will notice a slight delay in the appearance of the icon as NewDeal reads the data for the first time and adds it to the Token Database file.


NewManager keeps track of each icon by its token. A token is a four character name for the icon, plus a number known as the Manufacturer ID number (Mfg ID). The Mfg ID is a two byte value (a number between 0 and 65535) which is unique to the author of the file. Most files from NewDeal have a Mfg ID of zero. The Mfg ID 5 is a special one which tells NewDeal to include that icon in the Launcher Maker feature.

A few special icons, such as the default icon for DOS files and the default icon for system files, are stored within NewManager and NewDesk and are added to the Token Database automatically any time a new Token Database is created.

Third Party Icons

Some customers have created additional icons for NewDeal software. Since every icon is associated with a NewDeal file, these third party icons are distributed as tiny NewDeal applications that simply display a small window with a File menu that contains only a Close option.

When NewManager encounters these little applications, it adds their icon data to the Token Database. By editing your GEOS.INI file, you may tell NewDeal to assign specific icons to DOS files.

Assigning New Icons to DOS files

Here is a way to give your DOS files any icon that is available in the Token Database. In the [fileManager] category in the GEOS.INI file, add the name of your file (wildcards okay) and then specify the token for the icon. You must include both the four letter token (which is case sensitive) and the Mfg ID number. The token is in quotes and is followed by a comma and the Mfg ID. For example, if I wanted to give my PROCOMM.BAT file the NewComm icon, my GEOS.INI file might look like this:
filenameTokens = {
  *.EXE = "gDOS",0
  *.COM = "gDOS",0
  *.BAT = "gDOS",0
  *.TXT = "FILE",0,"TeEd",0
  *.DOC = "FILE",0,"TeEd",0
  *.HLP = "FILE",0,"TeEd",0
  * = "FILE",0,"TeEd",0

Notice that we have placed the filename before the wildcards--this is important. The more specific assignments must be listed first, and the more generic ones later. If PROCOMM.BAT was at the end of the list, then the *.BAT assignment would override it and the file would be assigned the gDOS icon. Also note that the four letter token for NewComm is TERM and its Mfg ID is zero. Here are some other common tokens, which all have the Mfg ID of zero:

In the line
*.TXT = "FILE",0,"TeEd",0
the "FILE",0 tells NewDeal to display the icon whose token is FILE and whose Mfg ID is zero. The extra "TeEd",0 tells NewDeal to launch Text File Editor whenever you double click on a file that has the file name extension .TXT.

How do I make my own icons?

There is no icon editor included with NewDeal software, but a third party shareware DOS program called Iconmake is available for download from the NewDeal web site. Iconmake can convert PCX graphics and Windows(tm) icons into icons for NewDeal.

NewDeal offers collections of icons for sale or for download from the NewDeal web site. NewDeal also sells an application called Folder Editor which can be used to change the icons displayed by NewDeal for folders or subdirectories.

How can I determine the token and Mfg ID for an icon?

Breadbox Computers sells an application named Token Deleter that will display the token and Mfg ID for any icon that exists in your Token Database.

If you don't have Token deleter, you can use a disk editor to examine any NewDeal file. The token is contained in the bytes at offsets 38h, 39h, 3Ah, and 3Bh (the 57th through 60th bytes of the file). The next two bytes contain the Mfg ID in low-byte/high-byte format (you must convert the hex value to decimal in order to use it in the GEOS.INI file).

About the Design of Icons

Designing icons is a craft in itself. Because icons are so small in size, it takes a special approach to use a few pixels to achieve the desired appearance.

You will note that some NewDeal icons have letters in them, like the font icon, but none have the actual application name. In general, icons are best as simple visual keys or clues to the application's function. If a program has a logo, that's often appropriate.

Most icons supplied by NewDeal have a 3-D effect with the light coming from the upper left and the shadow pointing to the lower right. Shadows are always in the light gray color, not that this is required, but it maintains a consistent look.

Return to Index

Last Modified 9 Mar 1999