home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BK-SC1_4.DMS / in.adf / MUIClass.Lha / Include / Classes / TWiMUI / Request.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-16  |  3.7 KB  |  128 lines

  1. //
  2. //  $VER: Request.h     1.0 (16 Jun 1996)
  3. //
  4. //    c 1996 Thomas Wilhelmi
  5. //
  6. //
  7. // Address : Taunusstrasse 14
  8. //           61138 Niederdorfelden
  9. //           Germany
  10. //
  11. //  E-Mail : willi@twi.rhein-main.de
  12. //
  13. //   Phone : +49 (0)6101 531060
  14. //   Fax   : +49 (0)6101 531061
  15. //
  16. //
  17. //  $HISTORY:
  18. //
  19. //  16 Jun 1996 :   1.0 : first public Release
  20. //
  21.  
  22. #ifndef CPP_TWIMUI_REQUEST_H
  23. #define CPP_TWIMUI_REQUEST_H
  24.  
  25. #ifndef CPP_TWIMUI_APPLICATION_H
  26. #include <classes/twimui/application.h>
  27. #endif
  28.  
  29. #ifndef CPP_TWIMUI_WINDOW_H
  30. #include <classes/twimui/window.h>
  31. #endif
  32.  
  33. #ifndef CLIB_MUIMASTER_PROTOS_H
  34. #include <clib/muimaster_protos.h>
  35. #endif
  36.  
  37. #ifndef _INCLUDE_PRAGMA_MUIMASTER_LIB_H
  38. #include <pragma/muimaster_lib.h>
  39. #endif
  40.  
  41. class MUIRequest
  42.     {
  43.     private:
  44.         Object *app;
  45.         Object *win;
  46.         LONGBITS flags;
  47.         TWiStr title;
  48.         TWiStr gadgets;
  49.         TWiStr format;
  50.         TWiArrayList<ULONG> parms;
  51.         void initparms(const ULONG, const ULONG *);
  52.     public:
  53.         MUIRequest(const MUIApplication &a, const MUIWindow &w, const LONGBITS b, const STRPTR t, const STRPTR g, const STRPTR f, const ULONG c, const ULONG *p)
  54.             :   app(a),
  55.                 win(w),
  56.                 flags(b),
  57.                 title(t),
  58.                 gadgets(g),
  59.                 format(f),
  60.                 parms(0)
  61.             { initparms(c,p); };
  62.         MUIRequest(const MUIWindow &w, const LONGBITS b, const STRPTR t, const STRPTR g, const STRPTR f, const ULONG c, const ULONG *p)
  63.             :   app(NULL),
  64.                 win(w),
  65.                 flags(b),
  66.                 title(t),
  67.                 gadgets(g),
  68.                 format(f),
  69.                 parms(0)
  70.             { initparms(c,p); };
  71.         MUIRequest(const MUIApplication &a, const LONGBITS b, const STRPTR t, const STRPTR g, const STRPTR f, const ULONG c, const ULONG *p)
  72.             :   app(a),
  73.                 win(NULL),
  74.                 flags(b),
  75.                 title(t),
  76.                 gadgets(g),
  77.                 format(f),
  78.                 parms(0)
  79.             { initparms(c,p); };
  80.         MUIRequest(const LONGBITS b, const STRPTR t, const STRPTR g, const STRPTR f, const ULONG c, const ULONG *p)
  81.             :   app(NULL),
  82.                 win(NULL),
  83.                 flags(b),
  84.                 title(t),
  85.                 gadgets(g),
  86.                 format(f),
  87.                 parms(0)
  88.             { initparms(c,p); };
  89.         MUIRequest()
  90.             :   app(NULL),
  91.                 win(NULL),
  92.                 flags(0UL),
  93.                 title(),
  94.                 gadgets(),
  95.                 format(),
  96.                 parms(0)
  97.             { };
  98.         MUIRequest(const MUIRequest &p)
  99.             :   app(p.app),
  100.                 win(p.win),
  101.                 flags(p.flags),
  102.                 title(p.title),
  103.                 gadgets(p.gadgets),
  104.                 format(p.format),
  105.                 parms(p.parms)
  106.             { };
  107.         MUIRequest(const MUIApplication &, const MUIWindow &, const LONGBITS, const STRPTR, const STRPTR, const STRPTR, const ULONG, ...);
  108.         MUIRequest(const MUIWindow &, const LONGBITS, const STRPTR, const STRPTR, const STRPTR, const ULONG, ...);
  109.         MUIRequest(const MUIApplication &, const LONGBITS, const STRPTR, const STRPTR, const STRPTR, const ULONG, ...);
  110.         MUIRequest(const LONGBITS, const STRPTR, const STRPTR, const STRPTR, const ULONG, ...);
  111.         virtual ~MUIRequest();
  112.         MUIRequest &operator=(const MUIRequest &);
  113.         void setApp(const MUIApplication &p) { app = p; };
  114.         void setWin(const MUIWindow &p) { win = p; };
  115.         void setFlags(const ULONG p) { flags = p; };
  116.         void setTitle(const STRPTR p) { title = p; };
  117.         void setGadgets(const STRPTR p) { gadgets = p; };
  118.         void setFormat(const STRPTR p) { format = p; };
  119.         void setParms(const ULONG c, const ULONG *p) { initparms(c,p); };
  120.         void setParms(const ULONG c, ...);
  121.         ULONG show() { return(MUI_RequestA((APTR)app,(APTR)win,flags,title,gadgets,format,(APTR)parms)); };
  122.         ULONG show(const MUIApplication &p) { return(MUI_RequestA((APTR)((Object *)p),(APTR)win,flags,title,gadgets,format,(APTR)parms)); };
  123.         ULONG show(const MUIWindow &p) { return(MUI_RequestA((APTR)app,(APTR)((Object *)p),flags,title,gadgets,format,(APTR)parms)); };
  124.         ULONG show(const MUIApplication &p1, const MUIWindow &p2) { return(MUI_RequestA((APTR)((Object *)p1),(APTR)((Object *)p2),flags,title,gadgets,format,(APTR)parms)); };
  125.     };
  126.  
  127. #endif
  128.