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

  1. //
  2. //  $VER: Popobject.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_POPOBJECT_H
  23. #define CPP_TWIMUI_POPOBJECT_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 MUIPopobjectObjStrHook
  34.     {
  35.     private:
  36.         struct Hook objstrhook;
  37.         static void ObjStrHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 Object *);
  38.         virtual void ObjStrHookFunc(struct Hook *, Object *, Object *);
  39.     protected:
  40.         MUIPopobjectObjStrHook();
  41.         MUIPopobjectObjStrHook(const MUIPopobjectObjStrHook &p);
  42.         ~MUIPopobjectObjStrHook();
  43.         MUIPopobjectObjStrHook &operator= (const MUIPopobjectObjStrHook &);
  44.     public:
  45.         struct Hook *objstr() { return(&objstrhook); };
  46.     };
  47.  
  48. class MUIPopobjectStrObjHook
  49.     {
  50.     private:
  51.         struct Hook strobjhook;
  52.         static BOOL StrObjHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 Object *);
  53.         virtual BOOL StrObjHookFunc(struct Hook *, Object *, Object *);
  54.     protected:
  55.         MUIPopobjectStrObjHook();
  56.         MUIPopobjectStrObjHook(const MUIPopobjectStrObjHook &p);
  57.         ~MUIPopobjectStrObjHook();
  58.         MUIPopobjectStrObjHook &operator= (const MUIPopobjectStrObjHook &);
  59.     public:
  60.         struct Hook *strobj() { return(&strobjhook); };
  61.     };
  62.  
  63. class MUIPopobjectWindowHook
  64.     {
  65.     private:
  66.         struct Hook windowhook;
  67.         static void WindowHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 Object *);
  68.         virtual void WindowHookFunc(struct Hook *, Object *, Object *);
  69.     protected:
  70.         MUIPopobjectWindowHook();
  71.         MUIPopobjectWindowHook(const MUIPopobjectWindowHook &p);
  72.         ~MUIPopobjectWindowHook();
  73.         MUIPopobjectWindowHook &operator= (const MUIPopobjectWindowHook &);
  74.     public:
  75.         struct Hook *window() { return(&windowhook); };
  76.     };
  77.  
  78. class MUIPopobject
  79.     :   public MUIPopstring,
  80.         public MUIPopobjectObjStrHook,
  81.         public MUIPopobjectStrObjHook,
  82.         public MUIPopobjectWindowHook
  83.     {
  84.     protected:
  85.         MUIPopobject(STRPTR cl)
  86.             :   MUIPopstring(cl),
  87.                 MUIPopobjectObjStrHook(),
  88.                 MUIPopobjectStrObjHook(),
  89.                 MUIPopobjectWindowHook()
  90.             { };
  91.     public:
  92.         MUIPopobject(const struct TagItem *t)
  93.             :   MUIPopstring(MUIC_Popobject),
  94.                 MUIPopobjectObjStrHook(),
  95.                 MUIPopobjectStrObjHook(),
  96.                 MUIPopobjectWindowHook()
  97.             {
  98.             init(t);
  99.             };
  100.         MUIPopobject(const Tag, ...);
  101.         MUIPopobject()
  102.             :   MUIPopstring(MUIC_Popobject),
  103.                 MUIPopobjectObjStrHook(),
  104.                 MUIPopobjectStrObjHook(),
  105.                 MUIPopobjectWindowHook()
  106.             { };
  107.         MUIPopobject(MUIPopobject &p)
  108.             :   MUIPopstring(p),
  109.                 MUIPopobjectObjStrHook(p),
  110.                 MUIPopobjectStrObjHook(p),
  111.                 MUIPopobjectWindowHook(p)
  112.             { };
  113.         virtual ~MUIPopobject();
  114.         MUIPopobject &operator= (MUIPopobject &);
  115.         void Follow(const BOOL p) { set(MUIA_Popobject_Follow,(ULONG)p); };
  116.         BOOL Follow() const { return((BOOL)get(MUIA_Popobject_Follow,FALSE)); };
  117.         void Light(const BOOL p) { set(MUIA_Popobject_Light,(ULONG)p); };
  118.         BOOL Light() const { return((BOOL)get(MUIA_Popobject_Light,TRUE)); };
  119.         Object *ObjectP() const { return((Object *)get(MUIA_Popobject_Object,NULL)); };
  120.         void ObjStrHook(const struct Hook *p) { set(MUIA_Popobject_ObjStrHook,(ULONG)p); };
  121.         struct Hook *ObjStrHook() const { return((struct Hook *)get(MUIA_Popobject_ObjStrHook,TRUE)); };
  122.         void StrObjHook(const struct Hook *p) { set(MUIA_Popobject_StrObjHook,(ULONG)p); };
  123.         struct Hook *StrObjHook() const { return((struct Hook *)get(MUIA_Popobject_StrObjHook,TRUE)); };
  124.         void Volatile(const BOOL p) { set(MUIA_Popobject_Volatile,(ULONG)p); };
  125.         BOOL Volatile() const { return((BOOL)get(MUIA_Popobject_Volatile,TRUE)); };
  126.         void WindowHook(const struct Hook *p) { set(MUIA_Popobject_WindowHook,(ULONG)p); };
  127.         struct Hook *WindowHook() const { return((struct Hook *)get(MUIA_Popobject_WindowHook,TRUE)); };
  128.     };
  129.  
  130. #endif
  131.