home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 230.lha / SimpleRequest / reqtest.c < prev    next >
C/C++ Source or Header  |  1989-04-04  |  2KB  |  52 lines

  1. #include <intuition/simplereq.h>
  2.  
  3.  
  4. /*
  5.  *  ReqTest.C - Just calls the Simple Requester to see what it looks like
  6.  */
  7.  
  8.  
  9. struct IntuitionBase *IntuitionBase;
  10. struct GfxBase *GfxBase;
  11. struct Window *Window;
  12. struct IntuiMessage *Message;
  13. struct RastPort *RP;
  14.  
  15. struct NewWindow newWindow = 
  16.     {
  17.     160,12,    320,80, 0,1,
  18.     VANILLAKEY | CLOSEWINDOW | GADGETUP,
  19.     WINDOWCLOSE | WINDOWDRAG | RMBTRAP | SMART_REFRESH | WINDOWDEPTH | NOCAREREFRESH,
  20.     0,NULL,(UBYTE *) "SimpleRequest",
  21.     NULL,NULL,0,0,0,0,WBENCHSCREEN
  22.     };
  23.  
  24. main()
  25. {
  26.  
  27. IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 0);
  28. GfxBase = (struct GfxBase *)OpenLibrary("graphics.library", 0);
  29.  
  30. if ((Window = (struct Window *)OpenWindow(&newWindow)) == NULL) exit(100L);
  31. if (Window == 0) 
  32.     {
  33.     CloseLibrary((struct Library *)GfxBase);
  34.     CloseLibrary((struct Library *)IntuitionBase);
  35.     exit(0);
  36.     };
  37.  
  38. SimpleRequest("Emulating a System Requester here|(ie, no centering of anything)", "Sure you are|I believe you", Window, SR_NOCENTERTEXT|SR_NOCENTERWINDOW);
  39.  
  40. SimpleRequest("Please insert volume|Workbench|in any drive.", "Retry|Fail|Cancel|Nuke|Die", Window, SR_NODRAG);
  41.  
  42. SimpleRequest("This is the default style.|Do you like it?", "Yes|No", Window, 0);
  43.  
  44. SimpleRequest("And this should have Stacked Gadgets.", "Is he right?|Does it really?|Are these stacked?|Sure looks like it!", Window, 0);
  45.  
  46. SimpleRequest("Try it with SetFont!", "Okay", Window, 0);
  47.  
  48. CloseWindow(Window);
  49. CloseLibrary((struct Library *)GfxBase);
  50. CloseLibrary((struct Library *)IntuitionBase);
  51. }
  52.