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 / Popasl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-16  |  3.1 KB  |  106 lines

  1. //
  2. //  $VER: Popasl.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_POPASL_H
  23. #define CPP_TWIMUI_POPASL_H
  24.  
  25. #ifndef CPP_TWIMUI_POPSTRING_H
  26. #include <classes/twimui/popstring.h>
  27. #endif
  28.  
  29. #ifndef UTILITY_HOOKS_H
  30. #include <utility/hooks.h>
  31. #endif
  32.  
  33. class MUIPopaslStartHook
  34.     {
  35.     private:
  36.         struct Hook starthook;
  37.         static BOOL StartHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 struct Tagitem *);
  38.         virtual BOOL StartHookFunc(struct Hook *, Object *, struct Tagitem *);
  39.     protected:
  40.         MUIPopaslStartHook();
  41.         MUIPopaslStartHook(const MUIPopaslStartHook &p);
  42.         ~MUIPopaslStartHook();
  43.         MUIPopaslStartHook &operator= (const MUIPopaslStartHook &);
  44.     public:
  45.         struct Hook *start() { return(&starthook); };
  46.     };
  47.  
  48. class MUIPopaslStopHook
  49.     {
  50.     private:
  51.         struct Hook stophookFile;
  52.         struct Hook stophookFont;
  53.         struct Hook stophookScreenMode;
  54.         static void StopHookEntryFile(register __a0 struct Hook *, register __a2 Object *, register __a1 struct FileRequester *);
  55.         static void StopHookEntryFont(register __a0 struct Hook *, register __a2 Object *, register __a1 struct FontRequester *);
  56.         static void StopHookEntryScreenMode(register __a0 struct Hook *, register __a2 Object *, register __a1 struct ScreenModeRequester *);
  57.         virtual void StopHookFunc(struct Hook *, Object *, struct FileRequester *);
  58.         virtual void StopHookFunc(struct Hook *, Object *, struct FontRequester *);
  59.         virtual void StopHookFunc(struct Hook *, Object *, struct ScreenModeRequester *);
  60.     protected:
  61.         MUIPopaslStopHook();
  62.         MUIPopaslStopHook(const MUIPopaslStopHook &p);
  63.         ~MUIPopaslStopHook();
  64.         MUIPopaslStopHook &operator= (const MUIPopaslStopHook &);
  65.     public:
  66.         struct Hook *stopFile() { return(&stophookFile); };
  67.         struct Hook *stopFont() { return(&stophookFont); };
  68.         struct Hook *stopScreenMode() { return(&stophookScreenMode); };
  69.     };
  70.  
  71. class MUIPopasl
  72.     :   public MUIPopstring,
  73.         public MUIPopaslStartHook,
  74.         public MUIPopaslStopHook
  75.     {
  76.     public:
  77.         MUIPopasl(const struct TagItem *t)
  78.             :   MUIPopstring(MUIC_Popasl),
  79.                 MUIPopaslStartHook(),
  80.                 MUIPopaslStopHook()
  81.             {
  82.             init(t);
  83.             };
  84.         MUIPopasl(const Tag, ...);
  85.         MUIPopasl()
  86.             :   MUIPopstring(MUIC_Popasl),
  87.                 MUIPopaslStartHook(),
  88.                 MUIPopaslStopHook()
  89.             { };
  90.         MUIPopasl(MUIPopasl &p)
  91.             :   MUIPopstring(p),
  92.                 MUIPopaslStartHook(p),
  93.                 MUIPopaslStopHook(p)
  94.             { };
  95.         virtual ~MUIPopasl();
  96.         MUIPopasl &operator= (MUIPopasl &);
  97.         BOOL Active() const { return((BOOL)get(MUIA_Popasl_Active,FALSE)); };
  98.         void StartHook(const struct Hook *p) { set(MUIA_Popasl_StartHook,(ULONG)p); };
  99.         struct Hook *StartHook() const { return((struct Hook *)get(MUIA_Popasl_StartHook)); };
  100.         void StopHook(const struct Hook *p) { set(MUIA_Popasl_StopHook,(ULONG)p); };
  101.         struct Hook *StopHook() const { return((struct Hook *)get(MUIA_Popasl_StopHook)); };
  102.         ULONG Type() const { return(get(MUIA_Popasl_Type,0UL)); };
  103.     };
  104.  
  105. #endif
  106.