home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * FileRequest() - File Name Requester
- *
- * By Kevin Lee Clague
- * 408 Tortolla Way
- * San Jose, Ca 95033
- * 408-258-9891 work 408-737-5481
- *
- * Copyright (C) 1986. All rights reserved.
- *
- * This program is freely distributable as long as this copyright notice
- * is retained. It intended for personal, non-commercial use.
- *
- * This file name requester is modeled after Deluxe Paints file name
- * requester. The dimensions/locations of all borders, gadgets and text were
- * arrived at empirically. Besides being a great program, Deluxe Paint is a
- * trade mark of Electronics Arts.
- *
- * The knowledge on how to get at the entries in the directories was drawn
- * from Mike (I'll be melow when I'm dead) Meyer's "Browser".
- *
- ***************************************************************************/
-
- #include <exec/types.h>
- #include <graphics/gfxbase.h>
- #include <libraries/dos.h>
- #include <libraries/dosextens.h>
- #include <intuition/intuition.h>
- #include <intuition/intuitionbase.h>
- #include <ctype.h>
- #include <stdio.h>
- #include <workbench/workbench.h>
-
- #define INTUITION_REV 1
- #define GRAPHICS_REV 1
-
- #define CHARACTER_WIDTH 8
- #define CHARACTER_HEIGHT 8
-
- /* ========================================================================*/
- /* File name requester gadget ids */
-
- #define CLASSBITS 8
-
- #define UPDOWNCLASS 1
- #define CHOICECLASS 2
- #define STRINGCLASS 3
- #define BUTTONCLASS 4
-
- #define GADGETNUM 255
-
- #define LOAD 0
- #define CANCEL 1
-
- #define DRAWER 0
-
- #define UP 0
- #define DOWN 1
- #define POT 2
-
- #define FILE0 0
- #define FILE1 1
- #define FILE2 2
- #define FILE3 3
- #define FILE4 4
- #define FILE5 5
- #define FILE6 6
- #define FILE7 7
-
- #define LOADGADGET BUTTONCLASS << CLASSBITS | LOAD
- #define CANCELGADGET BUTTONCLASS << CLASSBITS | CANCEL
-
- #define UPGADGET UPDOWNCLASS << CLASSBITS | UP
- #define DOWNGADGET UPDOWNCLASS << CLASSBITS | DOWN
- #define POTGADGET UPDOWNCLASS << CLASSBITS | POT
-
- #define FILE0GADGET CHOICECLASS << CLASSBITS | FILE0
- #define FILE1GADGET CHOICECLASS << CLASSBITS | FILE1
- #define FILE2GADGET CHOICECLASS << CLASSBITS | FILE2
- #define FILE3GADGET CHOICECLASS << CLASSBITS | FILE3
- #define FILE4GADGET CHOICECLASS << CLASSBITS | FILE4
- #define FILE5GADGET CHOICECLASS << CLASSBITS | FILE5
- #define FILE6GADGET CHOICECLASS << CLASSBITS | FILE6
- #define FILE7GADGET CHOICECLASS << CLASSBITS | FILE7
-
- #define DRAWERGADGET STRINGCLASS << CLASSBITS | DRAWER
-
- #define MAXFILES 100
-