home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Archive / Files / Standard File / SelectMultipleFiles / StdFile.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  5.1 KB  |  158 lines  |  [TEXT/CWIE]

  1. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2.  
  3. //k prefix for constants, r for resources, m for menu, i for menu item,
  4. //and s for string resource item
  5.  
  6. //Resource ID's for some alerts
  7. enum {
  8.     rAboutAlert = 1000,                        //the about dialog
  9.     rExitAlert = 1001,                        //emergency exit user alert
  10.     rUserAlert = 1002,                        //error message user alert
  11.     rFInfoAlert = 1003,                        //display file info alert
  12.     rShowSelectionAlert = 1004
  13. };
  14.  
  15. //Resource ID's for my Standard File Dialogs
  16. enum {
  17.     rListGetDLOG = 2000,
  18.     kFileListItem = 11,                        //Item number for list of files
  19.     kMultiOpenItem = 12,                    //Item number of multiple Open files
  20.     kRemoveItem = 13,                        //Item number of Remove button
  21.  
  22.     rSFPGetFileDLOG = 2001,
  23.     kTextButton = 11,                        //DoNormalPGet dialog items
  24.     kAppButton = 12,
  25.  
  26.     rSFPPutFileDLOG = 2002,
  27.     kSFPPutNormalBtn = 9,                    //SFPPutFile with a Dialog Hook
  28.     kSFPPutTextBtn = 10,
  29.     kSFPPutFreeSpace = 11,
  30.  
  31.     rGetDirectoryDLOG = 2003,
  32.     kGetDirButton = 11,                        //DoGetDirectory dialog items
  33.     kGetDirNowButton = 12,
  34.     kGetDirMessage = 13,
  35.  
  36.     rPutListsFileDLOG = 2004,
  37.     kListItem = 9,                            //ListPut dialog items
  38.     kReplaceItem = 2,
  39.  
  40.     rOptionsDLOG = 2005,
  41.     kOptionsButton = 9,                        //Put Options dialog items
  42.     kFormatString = 10,
  43.  
  44.     rOptionsSubDLOG = 2006,
  45.     kDefaultFormat = 3,                        //Put Sub-Options dialog items
  46.     kFrameItem = 9,
  47.  
  48.     rGetIdleUpdates = 2007,
  49.     kTimeItem = 11,                            //DoIdleUpdates dialog items
  50.     kSizeItem = 12,
  51.  
  52.     kExistingFileALRT = -3996                //"Replace file?" dialog ID from System file
  53. };
  54.  
  55. //menu resources; m for menu and i for menu item
  56. enum {
  57.     rMenuBar = 1000,                        //Menu resources
  58.  
  59.     mApple = 128,                            //indexes for Apple menu items
  60.     iAboutMe = 1,
  61.  
  62.     mFile = 129,                            //indexes for File menu items
  63.     iQuit = 12,
  64.  
  65.     mEdit = 130,                            //indexes for Edit menu items
  66.     iUndo = 1,
  67.     iCut = 3,
  68.     iCopy = 4,
  69.     iPaste = 5,
  70.     iClear = 6,
  71.  
  72.     mSFExamples = 131,                        //indexes for Examples menu items
  73.     iNormalGet = 1,
  74.     iNormalPGet = 2,
  75.     iFileFilter = 3,
  76.     iGetDirectory = 4,
  77.     iMultiFile = 5,
  78.  
  79.     iNormalPut = 7,
  80.     iNormalPPut = 8,
  81.     iForceDirectory = 9,
  82.     iPutListsFile = 10,
  83.     iPutOptions = 11,
  84.  
  85.     iIdleUpdates = 13,
  86.     iRememberFile = 14
  87. };
  88.  
  89. //Miscellaneous Strings from Str# resource
  90. enum {
  91.     rStrMisc = 1000,
  92.     sKFree = 1,                                //K free
  93.     sSelectFolder = 2,                        //Select a Folder
  94.     sSelectedCancel = 3,                    //The Cancel button.
  95.     sSaveAsMsg = 4,                            //Save As…
  96.     sTempFName = 5,                            //suffix of temporary file name
  97.     sFileSize = 6,                            //K on disk
  98.  
  99.     rStrList = 1001,                        //Used to create a List Manager list
  100.  
  101.     rErrStrings = 1002,                        //error String Str# ID
  102.     sStandardErr = 1,                        //An error has occurred.
  103.     sMemErr = 2,                            //A Memory Manager error has occurred.
  104.     sResErr = 3,                            //A Resource Manager error has occurred.
  105.     sLowMemory = 4,                            //Memory is too low to continue...
  106.     sNoMenus = 5,                            //Could not find application's menu...
  107.     sFileSystem = 6,                        //A File System error has occurred.
  108.     sLostFile = 7,                            //The file to be remembered has been lost
  109.     sOldAUX = 8,                            //Requires A/UX version 2.0 or later.
  110.     sNoHFS = 9                                //Requires a System that supports HFS
  111. };
  112.  
  113. //Useful Stadard File constants
  114. enum {
  115.     kSFTopLeft = 0x00500050,                //topLeft corner of Standard File dialog
  116.     kReDrawList = 101,                        //causes the file list to be recalculated
  117.     kShowAllFiles = -1,                        //show all files in the StdFile list
  118.     kShowIt = false,                        //FALSE means I do not filter out...
  119.     kNoSelection = 0,                        //reply.fType is NIL for no selection
  120.     kNullModalEvt = 100,                    //Item number for null event from ModalDialog
  121.     kNoItem = 0,                            //no item, ignore it
  122.     kFirstTime = -1                        //the first time our hook it's passed a -1
  123. };
  124.  
  125. //Useful File Manager constants
  126. enum {
  127.     kFSAsynch = true,                        //asynchronous File Manager call
  128.     kInvisibleBit = 14,                        //bit set in ioFlFndrInfo.fdFlags if invisible
  129.     kFolderBit = 4                            //bit set in ioFlAttrib for a folder
  130. };
  131.  
  132. //misc. application constants
  133. enum {
  134.     rAppSignature = 'sc18',                    //app signature/creator ID
  135.     kScrollbarWidth = 16,                    //kScrollBarWidth can be used in
  136.                                                     //calculating values for control
  137.                                                     //positioning and sizing.
  138.     kScrollbarAdjust = kScrollbarWidth - 1,
  139.  
  140.     kListFrameInset = 1,                    //inset rectangle adjustment for list frame
  141.     kCntlActivate = 0,                        //enabled control’s hilite state
  142.     kCntlDeactivate = 0xFF,                    //disabled control’s hilite state
  143.     kCntlOn = 1,                            //control’s value when truned on
  144.     kCntlOff = 0,                            //control’s value when truned off
  145.     kButtonFrameSize = 3,                    //button frame’s pen size
  146.     kButtonFrameInset = -4,                    //inset rectangle adjustment around button
  147.     kSysEnvironsVersion = 1,                //Version of the SysEnvRec I understand.
  148.     kBroughtToFront = 3,                    //Number of get event calls to pull us forward
  149.     kWantSeconds = true,                    //IUTimeString flag for using seconds
  150.     kMinSpace = 32 * 1024,                    //minimum available memory I allow in heap
  151.     kMinAUXVersion = 0x200,                    //minimum version of A/UX I'll run with
  152.     kDefaultAUXVersion = 0x100,                //assumed version 1.x.x of A/UX
  153.     rUpdateWindow = 1000,                    //WIND resource for updates
  154.     rMemorizedFile = 1000,                    //FILE resource of file to remember
  155.     kNumberOfMasters = 1                    //number of master pointer blocks
  156. };
  157.  
  158.