home *** CD-ROM | disk | FTP | other *** search
/ Dream 57 / Amiga_Dream_57.iso / Amiga / Programmation / c / Extensions / APPSource.lha / APlusPlus / libsource / GT_Scroller.cxx < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-29  |  1.4 KB  |  50 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_Scroller.cxx,v $
  9.  **   $Revision: 1.9 $
  10.  **   $Date: 1994/07/27 11:48:51 $
  11.  **   $Author: Armin_Vogt $
  12.  **
  13.  ******************************************************************************/
  14.  
  15.  
  16. extern "C" {
  17. #ifdef __GNUG__
  18. #endif
  19.  
  20. #ifdef __SASC
  21. #endif
  22. }
  23. #include <APlusPlus/gadtools/GT_Scroller.h>
  24. #include <APlusPlus/intuition/IntuiMessageC.h>
  25.  
  26.  
  27. static const char rcs_id[] = "$Id: GT_Scroller.cxx,v 1.9 1994/07/27 11:48:51 Armin_Vogt Exp Armin_Vogt $";
  28.  
  29. //runtime type inquiry support
  30. intui_typeinfo(GT_Scroller, derived(from(GT_Gadget)), rcs_id)
  31.  
  32.  
  33. GT_Scroller::GT_Scroller(GraphicObject* owner,AttrList& attrs)
  34.    : GT_Gadget(owner,SCROLLER_KIND,attrs)
  35. {
  36. }
  37.  
  38. void GT_Scroller::callback(const IntuiMessageC* imsg)
  39.    /* Scroller gadgets may send GADGETUP,GADGETDOWN and MOUSEMOVE. For all of these messages
  40.       the Code field will contain the new Top value.
  41.    */
  42. {
  43.    // since GT_Gadget sets IDCMP to LISTVIEW_IDCMP per default,
  44.    // also INTUITICKS, which hold no information in the Code field,will arive here!
  45.    if (imsg->getClass()!=CLASS_INTUITICKS)
  46.    {
  47.       setAttrs( AttrList(GTSC_Top,(WORD)imsg->Code, GA_ID,gadgetPtr()->GadgetID, TAG_END) );
  48.    }
  49. }
  50.