home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / macraysh.sit / Code / Headers / macdialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-11  |  3.2 KB  |  169 lines

  1. /* 
  2.  * macdialog.h
  3.  */
  4.  
  5. #define aboutBox 1
  6.  
  7. /* Resource pointers for dialog, and enumerated types for each control item */
  8. /* postfix codes are used to identify different types of control item :
  9.  
  10.         ST = static text
  11.         ET = editable text
  12.         SB = slider bar
  13.         CB = check box
  14.         PI = picture
  15.         IC = icon
  16.         BU = button
  17.         RB = radio button
  18. */
  19.  
  20. #include "rayshade.h"
  21.  
  22. #define aboutboxR 129
  23.  
  24.  
  25. #define renderoptionsR 128
  26. enum {
  27.     renderoptionsST = 1,
  28.     rayspixelSB,
  29.     rayspixelST,
  30.     rayspixelET,
  31.     treedepthSB,
  32.     treedepthST,
  33.     treedepthET,
  34.     shadowsCB,
  35.     jitterCB,
  36.     cameraBU,
  37.     useBU,
  38.     cancelBU,
  39.     defaultBU,
  40.     screenBU,
  41.     threshholdET,
  42.     threshholdST
  43. } ;
  44.  
  45. #define erroralertR 130
  46.  
  47. #define screenoptionsR 131
  48. enum {
  49.     fiftybyfiftyRB =1 ,
  50.     hundredbyhundredRB,
  51.     twohundredbytwohundredRB,
  52.     customRB,
  53.     customxET,
  54.     customyET,
  55.     xST,
  56.     screenuseBU,
  57.     screencancelBU,
  58.     horizlinePI,
  59.     screenoptionsST,
  60.     resolutionST,
  61.     magnificationST,
  62.     onebyonemagRB,
  63.     twobytwomagRB,
  64.     fourbyfourmagRB,
  65.     eightbyeightmagRB,
  66.     sixteenbysixteenmagRB,
  67.     thirtytwobythirtytwomagRB
  68. } ;
  69.  
  70. #define cameraoptionsR 132
  71. enum {
  72.     camerauseBU = 1,
  73.     cameracancelBU,
  74.     cameraoptionsST,
  75.     observerxET,
  76.     observeryET,
  77.     observerzET,
  78.     targetxET,
  79.     targetyET,
  80.     targetzET,
  81.     observerST,
  82.     targetST,
  83.     upvectorxET,
  84.     upvectoryET,
  85.     upvectorzET,
  86.     upvectorST,
  87.     upvectorxST,
  88.     upvectoryST,
  89.     upvectorzST,
  90.     observerxST,
  91.     observeryST,
  92.     observerzST,
  93.     targetxST,
  94.     targetyST,
  95.     targetzST,
  96.     apertureST,
  97.     apertureET,
  98.     focaldistanceST,
  99.     focaldistanceET,
  100.     fieldofvisionST,
  101.     fieldofvisionET,
  102.     fieldofvisiondegreeST,
  103.     camerahorizlinePI,
  104.     cameraiconIC,
  105.     crosshair2observerBU=34,
  106.     crosshair2targetBU,
  107.     crosshair2upvectorBU
  108. } ;
  109.  
  110. #define newobjectR 134
  111. enum {
  112.     objectcreateBU=1,
  113.     objectcancelBU=6,
  114.     objecttypeCI=2,
  115.     objectnameET=3
  116. } ;
  117.  
  118.  
  119. #define framessetR 143
  120. enum {
  121.     frameuseBU = 1,
  122.     framecancelBU,
  123.     framestartET,
  124.     frameendET
  125. } ;
  126.  
  127. #define gridsizeR 151
  128. enum {
  129.     griduseBU = 1,
  130.     gridxBU = 4,
  131.     gridyBU = 6,
  132.     gridzBU = 8
  133. };
  134.  
  135. /* Some key codes */
  136.  
  137. enum  {
  138.     kEnterKey = 0x03,
  139.     kBackSpace = 0x08,
  140.     kTabKey,
  141.     kReturnKey = 0x0D,
  142.     kEscKey = 0x1B,
  143.     kLeftArrow,
  144.     kRightArrow,
  145.     kUpArrow,
  146.     kDownArrow,
  147.     kDeleteKey = 0x7F
  148. };
  149.  
  150. int StrtoFloat(Str255 num, Float *result) ;
  151. void SetFloatEditText(DialogPtr myDialog, short itemno, Float value) ;
  152. void SetFloatStringText(DialogPtr myDialog, short itemno, char *str, Float value) ;
  153. void SetIntEditText(DialogPtr myDialog, short itemno, int value) ;
  154. void SetIntStringText(DialogPtr myDialog, short itemno, char *str, int value) ;
  155. void PickColour(Color *col) ;
  156. void SetRenderOptions() ;
  157. void SetScreenOptions() ;
  158. void SetCameraOptions() ;
  159. void GetClick() ;
  160. pascal Boolean screenoptionsfilter(DialogPtr dialer, EventRecord *myDialogEvent, short *theDialogItem) ;
  161. pascal Boolean cameraoptionsfilter(DialogPtr dialer, EventRecord *myDialogEvent, short *theDialogItem) ;
  162. pascal Boolean renderoptionsfilter(DialogPtr dialer, EventRecord *myDialogEvent, short *theDialogItem) ;
  163. pascal void DrawHilite(WindowPtr theWindow, short itemNo) ;
  164. ControlHandle SnatchHandle(DialogPtr thebox, short theGetItem) ;
  165. Boolean IsEditKey(char theKey) ;
  166. char ValidFloat(Float min, Float Max, Str255 num) ;
  167. char GetFloatEditText(DialogPtr myDialog, short theItem, Float *value) ;
  168. char GetIntEditText(DialogPtr myDialog, short theItem, int *value) ;
  169.