home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / gnu / aplusplus-1.01-src.lha / src / amiga / aplusplus-1.01 / include / aplusplus / intuition / BoopsiGadget.h next >
C/C++ Source or Header  |  1994-05-04  |  3KB  |  73 lines

  1. #ifndef APP_BoopsiGadget_H
  2. #define APP_BoopsiGadget_H
  3. /******************************************************************************
  4.  **
  5.  **    C++ Class Library for the Amiga© system software.
  6.  **
  7.  **    Copyright (C) 1994 by Armin Vogt  **  EMail: armin@uni-paderborn.de
  8.  **    All Rights Reserved.
  9.  **
  10.  **    $VER: apphome:APlusPlus/intuition/BoopsiGadget.h 1.04 (04.05.94) $
  11.  **    
  12.  ******************************************************************************/
  13.  
  14. extern "C" {
  15. #include <intuition/gadgetclass.h>
  16. #include <intuition/classes.h>
  17. #include <intuition/icclass.h>
  18. #include <intuition/classusr.h>
  19. }
  20. #include <APlusPlus/intuition/GadgetCV.h>
  21.  
  22.  
  23. /******************************************************************************************
  24.          » BoopsiGadget class «
  25.  
  26.    identifies Boopsi gadgets with a GadgetCV object.
  27.    The BoopsiGadget user MUST announce each attribute in the creation taglist that is
  28.    likely to change due to user activity.
  29.    Since the underlying BoopsiGadget is disposed and recreated each time the windowsize
  30.    changes the IntuiObject creation taglist is applied for recreation, and all tags that
  31.    are not explicitly set will adopt default values.
  32.  
  33.  ******************************************************************************************/
  34. class BoopsiGadget : public GadgetCV
  35. {
  36.    /** BOOPSI gadgets are object pointer to one Intuition gadget that represents the
  37.     ** BOOPSI object and is linked to the window's gadget list.
  38.     **/
  39.    private:
  40.       UBYTE  *publicClass;
  41.       IClass *privateClass;     // IClass is from Kick.3.0 includes !!
  42.  
  43.       void create(Class *,  UBYTE*);
  44.  
  45.    public:
  46.       // create Boopsi gadget from given Boopsi class name.
  47.       BoopsiGadget(  GraphicObject *owner, UBYTE *pubClass,
  48.                      AttrList& attrs) : GadgetCV(owner,attrs)
  49.                      { create(NULL,pubClass);  }
  50.  
  51.       // create Boopsi gagdet from private class pointer.
  52.       BoopsiGadget(  GraphicObject *owner, Class *privClass,
  53.                      AttrList& attrs) : GadgetCV(owner,attrs)
  54.                      { create(privClass,NULL);  }
  55.  
  56.       ~BoopsiGadget();
  57.  
  58.       APTR redrawSelf(GWindow *,ULONG&);                // inherited from GraphicObject
  59.       void callback(const IntuiMessageC *imsg);         // inherited from GadgetCV
  60.  
  61.       // change gadget attributes
  62.       ULONG setAttributes(AttrList& attrs);             // inherited from IntuiObject
  63.         
  64.       // read a specific attribute. Returns 0L if the object does not recognize the attribute.
  65.       ULONG getAttribute(Tag ,ULONG& dataStore);
  66. };
  67.  
  68. #define BOOPSIGADGET_NEWOBJECT_FAILED  (IOTYPE_BOOPSIGADGET+1)
  69.  
  70. #endif
  71.  
  72.  
  73.