home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / aplusplus-1.01-src.lha / GNU / src / amiga / APlusPlus-1.01 / libsource / StdGadget.cxx < prev    next >
C/C++ Source or Header  |  1994-04-23  |  2KB  |  78 lines

  1. /******************************************************************************
  2.  **
  3.  **    C++ Class Library for the Amiga© system software.
  4.  **
  5.  **    Copyright (C) 1994 by Armin Vogt  **  EMail: armin@uni-paderborn.de
  6.  **    All Rights Reserved.
  7.  **
  8.  **    $Source: apphome:APlusPlus/RCS/libsource/StdGadget.cxx,v $
  9.  **    $Revision: 1.3 $
  10.  **    $Date: 1994/04/23 21:02:33 $
  11.  **    $Author: Armin_Vogt $
  12.  **
  13.  ******************************************************************************/
  14.  
  15.  
  16. extern "C" {
  17. #ifdef __GNUG__
  18. #include <inline/intuition.h>
  19. #endif
  20.  
  21. #ifdef __SASC
  22. #include <proto/intuition.h>
  23. #endif
  24.  
  25. #include <intuition/intuition.h>
  26. }
  27. #include <APlusPlus/intuition/StdGadget.h>
  28.  
  29.  
  30. volatile static char rcs_id[] = "$Id: StdGadget.cxx,v 1.3 1994/04/23 21:02:33 Armin_Vogt Exp Armin_Vogt $";
  31.  
  32.  
  33. StdGadget::StdGadget(GOB_OWNER, UWORD flags,UWORD activation,UWORD gadgetType,
  34.                         APTR gadgetRender,APTR selectRender,struct IntuiText *gadgetText,
  35.                         LONG mutualExclude,APTR specialInfo,UWORD gadgetID,AttrList& attrs)
  36.     : GadgetCV(gob_owner,attrs)                            
  37. {
  38.    gadget.Flags      = flags;
  39.    gadget.Activation = activation;
  40.    gadget.GadgetType = gadgetType;
  41.    gadget.GadgetRender  = gadgetRender;
  42.    gadget.SelectRender  = selectRender;
  43.    gadget.GadgetText    = gadgetText;
  44.    gadget.MutualExclude = mutualExclude;
  45.    gadget.SpecialInfo   = specialInfo;
  46.    gadget.GadgetID      = gadgetID;
  47.  
  48.    storeGadget(&gadget);
  49.  
  50.    setIOType(IOTYPE_STDGADGET);
  51. }
  52.  
  53.  
  54. APTR StdGadget::redrawSelf(GWindow *homeWindow,ULONG& returnType)
  55. {
  56.    gadget.LeftEdge   = (WORD)iLeft();
  57.    gadget.TopEdge    = (WORD)iTop();
  58.    gadget.Width      = (WORD) iWidth();
  59.    gadget.Height     = (WORD)iHeight();
  60.  
  61.    gadget.NextGadget = NULL;     // clear the link
  62.  
  63.     GadgetCV::redrawSelf(homeWindow,returnType);
  64.     
  65.    returnType = IOTYPE_STDGADGET;    
  66.    return gadgetPtr();
  67. }
  68.  
  69. ULONG StdGadget::setAttributes(AttrList& attrs)
  70. {
  71.     return GadgetCV::setAttributes(attrs);
  72. }
  73.  
  74. ULONG StdGadget::getAttribute(Tag tag,ULONG& dataStore)
  75. {
  76.     return GadgetCV::getAttribute(tag,dataStore);
  77. }
  78.