home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / MacCjr / MacC Jr / Library Folder / C Include Folder / Control.h < prev    next >
Encoding:
Text File  |  1987-01-06  |  1.7 KB  |  79 lines  |  [TEXT/EDIT]

  1. // Control.h
  2. // © Copyright 1984 Consulair Corp, All Rights Reserved.
  3. // Portions © Copyright Apple Computer, Inc: 1982, 1983, 1984
  4. //            Stanford University, SUMEX project: 1984
  5. // Requires Macdefs.h Quickdraw.h Window.h
  6.  
  7. #ifndef ControlLoaded
  8.  
  9.   #ifndef WindowLoaded
  10.     #include "window.h"
  11.     #endif
  12.   
  13.   #define ControlLoaded
  14.   
  15.   // control messages
  16.     
  17.     #define    drawCntl    0 
  18.     #define    testCntl    1 
  19.     #define    calcCRgns    2 
  20.     #define    initCntl    3 
  21.     #define    dispCntl    4 
  22.     #define    posCntl        5 
  23.     #define    thumbCntl    6 
  24.     #define    dragCntl    7 
  25.     #define    autoTrack    8 
  26.     
  27.   // FindControl Result Codes
  28.     
  29.     #define    noControl      0 
  30.     #define    inButton       10 
  31.     #define    inCheckbox     11 
  32.     #define    inUpButton     20 
  33.     #define    inDownButton   21 
  34.     #define    inPageUp       22 
  35.     #define    inPageDown     23 
  36.     #define    inThumb        129 
  37.     
  38.   // control definition proc ID's
  39.     
  40.     #define    pushButProc     0 
  41.     #define    checkBoxProc    1 
  42.     #define    radioButProc    2 
  43.     #define    scrollBarProc   16 
  44.     
  45.     #define    useWFont        8 
  46.  
  47. // for Control Manager
  48.   
  49.   struct __CR
  50.     {
  51.     Handle    nextControl;
  52.     WindowPtr contrlOwner;
  53.     Rect    contrlRect;
  54.     char    contrlVis;
  55.     char    contrlHilite;
  56.     short    contrlValue;
  57.     short    contrlMin;
  58.     short    contrlMax;
  59.     Handle    contrlDefProc;
  60.     Handle    contrlData;
  61.     int        (*contrlAction)();
  62.     long    contrlRfCon;
  63.     Str255    contrlTitle;
  64.     };
  65.   
  66.   #define ControlRecord struct __CR
  67.   
  68.   typedef ControlRecord * ControlPtr;
  69.   typedef ControlPtr * ControlHandle;
  70.   
  71. //  Functions returning other than integer or Ptr 
  72.   
  73.   #define GetNewControl    (ControlHandle)GetNewControl
  74.   #define NewControl    (ControlHandle)NewControl
  75.   #define GetCtlAction    (ProcPtr)GetCtlAction
  76.   
  77. #endif
  78.   
  79.