home *** CD-ROM | disk | FTP | other *** search
/ Dream 57 / Amiga_Dream_57.iso / Amiga / Programmation / c / Extensions / APPSource.lha / APlusPlus / libsource / GT_Boolean.cxx < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-29  |  1.3 KB  |  48 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:RCS/libsource/GT_Boolean.cxx,v $
  9.  **   $Revision: 1.7 $
  10.  **   $Date: 1994/07/27 11:48:31 $
  11.  **   $Author: Armin_Vogt $
  12.  **
  13.  ******************************************************************************/
  14.  
  15. extern "C" {
  16. #ifdef __GNUG__
  17. #endif
  18.  
  19. #ifdef __SASC
  20. #endif
  21. }
  22.  
  23. #include <APlusPlus/gadtools/GT_Boolean.h>
  24. #include <APlusPlus/intuition/IntuiMessageC.h>
  25.  
  26.  
  27. static const char rcs_id[] = "$Id: GT_Boolean.cxx,v 1.7 1994/07/27 11:48:31 Armin_Vogt Exp Armin_Vogt $";
  28.  
  29. //runtime type inquiry support
  30. intui_typeinfo(GT_Boolean, derived(from(GT_Gadget)), rcs_id)
  31.  
  32.  
  33. GT_Boolean::GT_Boolean(GOB_OWNER,AttrList& attrs)
  34.    : GT_Gadget(gob_owner,BUTTON_KIND,attrs)
  35. {
  36. }
  37.  
  38. void GT_Boolean::callback(const IntuiMessageC* imsg)
  39. {
  40.    // when the user selects the button the GA_ID attribute tag is touched to
  41.    // cause a notification stream composed of GA_ID,<this_ID>.
  42.    // GA_ID is set by the class user on the constructor Attribute Taglist.
  43.    if (imsg->getClass()==CLASS_GADGETUP)
  44.    {
  45.       setAttrs( AttrList(GA_ID,intuiAttrs().getTagData(GA_ID,4711),TAG_END) );
  46.    }
  47. }
  48.