home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-09-28 | 5.1 KB | 158 lines | [TEXT/CWIE] |
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- //k prefix for constants, r for resources, m for menu, i for menu item,
- //and s for string resource item
-
- //Resource ID's for some alerts
- enum {
- rAboutAlert = 1000, //the about dialog
- rExitAlert = 1001, //emergency exit user alert
- rUserAlert = 1002, //error message user alert
- rFInfoAlert = 1003, //display file info alert
- rShowSelectionAlert = 1004
- };
-
- //Resource ID's for my Standard File Dialogs
- enum {
- rListGetDLOG = 2000,
- kFileListItem = 11, //Item number for list of files
- kMultiOpenItem = 12, //Item number of multiple Open files
- kRemoveItem = 13, //Item number of Remove button
-
- rSFPGetFileDLOG = 2001,
- kTextButton = 11, //DoNormalPGet dialog items
- kAppButton = 12,
-
- rSFPPutFileDLOG = 2002,
- kSFPPutNormalBtn = 9, //SFPPutFile with a Dialog Hook
- kSFPPutTextBtn = 10,
- kSFPPutFreeSpace = 11,
-
- rGetDirectoryDLOG = 2003,
- kGetDirButton = 11, //DoGetDirectory dialog items
- kGetDirNowButton = 12,
- kGetDirMessage = 13,
-
- rPutListsFileDLOG = 2004,
- kListItem = 9, //ListPut dialog items
- kReplaceItem = 2,
-
- rOptionsDLOG = 2005,
- kOptionsButton = 9, //Put Options dialog items
- kFormatString = 10,
-
- rOptionsSubDLOG = 2006,
- kDefaultFormat = 3, //Put Sub-Options dialog items
- kFrameItem = 9,
-
- rGetIdleUpdates = 2007,
- kTimeItem = 11, //DoIdleUpdates dialog items
- kSizeItem = 12,
-
- kExistingFileALRT = -3996 //"Replace file?" dialog ID from System file
- };
-
- //menu resources; m for menu and i for menu item
- enum {
- rMenuBar = 1000, //Menu resources
-
- mApple = 128, //indexes for Apple menu items
- iAboutMe = 1,
-
- mFile = 129, //indexes for File menu items
- iQuit = 12,
-
- mEdit = 130, //indexes for Edit menu items
- iUndo = 1,
- iCut = 3,
- iCopy = 4,
- iPaste = 5,
- iClear = 6,
-
- mSFExamples = 131, //indexes for Examples menu items
- iNormalGet = 1,
- iNormalPGet = 2,
- iFileFilter = 3,
- iGetDirectory = 4,
- iMultiFile = 5,
-
- iNormalPut = 7,
- iNormalPPut = 8,
- iForceDirectory = 9,
- iPutListsFile = 10,
- iPutOptions = 11,
-
- iIdleUpdates = 13,
- iRememberFile = 14
- };
-
- //Miscellaneous Strings from Str# resource
- enum {
- rStrMisc = 1000,
- sKFree = 1, //K free
- sSelectFolder = 2, //Select a Folder
- sSelectedCancel = 3, //The Cancel button.
- sSaveAsMsg = 4, //Save As…
- sTempFName = 5, //suffix of temporary file name
- sFileSize = 6, //K on disk
-
- rStrList = 1001, //Used to create a List Manager list
-
- rErrStrings = 1002, //error String Str# ID
- sStandardErr = 1, //An error has occurred.
- sMemErr = 2, //A Memory Manager error has occurred.
- sResErr = 3, //A Resource Manager error has occurred.
- sLowMemory = 4, //Memory is too low to continue...
- sNoMenus = 5, //Could not find application's menu...
- sFileSystem = 6, //A File System error has occurred.
- sLostFile = 7, //The file to be remembered has been lost
- sOldAUX = 8, //Requires A/UX version 2.0 or later.
- sNoHFS = 9 //Requires a System that supports HFS
- };
-
- //Useful Stadard File constants
- enum {
- kSFTopLeft = 0x00500050, //topLeft corner of Standard File dialog
- kReDrawList = 101, //causes the file list to be recalculated
- kShowAllFiles = -1, //show all files in the StdFile list
- kShowIt = false, //FALSE means I do not filter out...
- kNoSelection = 0, //reply.fType is NIL for no selection
- kNullModalEvt = 100, //Item number for null event from ModalDialog
- kNoItem = 0, //no item, ignore it
- kFirstTime = -1 //the first time our hook it's passed a -1
- };
-
- //Useful File Manager constants
- enum {
- kFSAsynch = true, //asynchronous File Manager call
- kInvisibleBit = 14, //bit set in ioFlFndrInfo.fdFlags if invisible
- kFolderBit = 4 //bit set in ioFlAttrib for a folder
- };
-
- //misc. application constants
- enum {
- rAppSignature = 'sc18', //app signature/creator ID
- kScrollbarWidth = 16, //kScrollBarWidth can be used in
- //calculating values for control
- //positioning and sizing.
- kScrollbarAdjust = kScrollbarWidth - 1,
-
- kListFrameInset = 1, //inset rectangle adjustment for list frame
- kCntlActivate = 0, //enabled control’s hilite state
- kCntlDeactivate = 0xFF, //disabled control’s hilite state
- kCntlOn = 1, //control’s value when truned on
- kCntlOff = 0, //control’s value when truned off
- kButtonFrameSize = 3, //button frame’s pen size
- kButtonFrameInset = -4, //inset rectangle adjustment around button
- kSysEnvironsVersion = 1, //Version of the SysEnvRec I understand.
- kBroughtToFront = 3, //Number of get event calls to pull us forward
- kWantSeconds = true, //IUTimeString flag for using seconds
- kMinSpace = 32 * 1024, //minimum available memory I allow in heap
- kMinAUXVersion = 0x200, //minimum version of A/UX I'll run with
- kDefaultAUXVersion = 0x100, //assumed version 1.x.x of A/UX
- rUpdateWindow = 1000, //WIND resource for updates
- rMemorizedFile = 1000, //FILE resource of file to remember
- kNumberOfMasters = 1 //number of master pointer blocks
- };
-
-