home *** CD-ROM | disk | FTP | other *** search
- #ifndef APP_BoopsiGadget_H
- #define APP_BoopsiGadget_H
- /******************************************************************************
- **
- ** C++ Class Library for the Amiga© system software.
- **
- ** Copyright (C) 1994 by Armin Vogt ** EMail: armin@uni-paderborn.de
- ** All Rights Reserved.
- **
- ** $VER: apphome:APlusPlus/intuition/BoopsiGadget.h 1.04 (04.05.94) $
- **
- ******************************************************************************/
-
- extern "C" {
- #include <intuition/gadgetclass.h>
- #include <intuition/classes.h>
- #include <intuition/icclass.h>
- #include <intuition/classusr.h>
- }
- #include <APlusPlus/intuition/GadgetCV.h>
-
-
- /******************************************************************************************
- » BoopsiGadget class «
-
- identifies Boopsi gadgets with a GadgetCV object.
- The BoopsiGadget user MUST announce each attribute in the creation taglist that is
- likely to change due to user activity.
- Since the underlying BoopsiGadget is disposed and recreated each time the windowsize
- changes the IntuiObject creation taglist is applied for recreation, and all tags that
- are not explicitly set will adopt default values.
-
- ******************************************************************************************/
- class BoopsiGadget : public GadgetCV
- {
- /** BOOPSI gadgets are object pointer to one Intuition gadget that represents the
- ** BOOPSI object and is linked to the window's gadget list.
- **/
- private:
- UBYTE *publicClass;
- IClass *privateClass; // IClass is from Kick.3.0 includes !!
-
- void create(Class *, UBYTE*);
-
- public:
- // create Boopsi gadget from given Boopsi class name.
- BoopsiGadget( GraphicObject *owner, UBYTE *pubClass,
- AttrList& attrs) : GadgetCV(owner,attrs)
- { create(NULL,pubClass); }
-
- // create Boopsi gagdet from private class pointer.
- BoopsiGadget( GraphicObject *owner, Class *privClass,
- AttrList& attrs) : GadgetCV(owner,attrs)
- { create(privClass,NULL); }
-
- ~BoopsiGadget();
-
- APTR redrawSelf(GWindow *,ULONG&); // inherited from GraphicObject
- void callback(const IntuiMessageC *imsg); // inherited from GadgetCV
-
- // change gadget attributes
- ULONG setAttributes(AttrList& attrs); // inherited from IntuiObject
-
- // read a specific attribute. Returns 0L if the object does not recognize the attribute.
- ULONG getAttribute(Tag ,ULONG& dataStore);
- };
-
- #define BOOPSIGADGET_NEWOBJECT_FAILED (IOTYPE_BOOPSIGADGET+1)
-
- #endif
-
-
-