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 / IntuiMessageC.h < prev    next >
C/C++ Source or Header  |  1994-05-04  |  3KB  |  83 lines

  1. #ifndef APP_IntuiMessageC_H
  2. #define APP_IntuiMessageC_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/IntuiMessageC.h 1.04 (04.05.94) $
  11.  **    
  12.  ******************************************************************************/
  13.  
  14. extern "C" {
  15. #include <intuition/intuition.h>
  16. }
  17.  
  18. /** The IDCMPClass defines a type for all IntuiMessage Classes that makes it impossible to
  19.  **  give a false Class value as parameter where an IntuiMessage Class is requested.
  20.  **/
  21.  
  22. enum IDCMPClass {
  23.   CLASS_SIZEVERIFY      = IDCMP_SIZEVERIFY ,
  24.   CLASS_NEWSIZE         = IDCMP_NEWSIZE ,
  25.   CLASS_REFRESHWINDOW   = IDCMP_REFRESHWINDOW ,
  26.   CLASS_MOUSEBUTTONS    = IDCMP_MOUSEBUTTONS,
  27.   CLASS_MOUSEMOVE       = IDCMP_MOUSEMOVE ,
  28.   CLASS_GADGETDOWN      = IDCMP_GADGETDOWN ,
  29.   CLASS_GADGETUP        = IDCMP_GADGETUP ,
  30.   CLASS_REQSET          = IDCMP_REQSET ,
  31.   CLASS_MENUPICK        = IDCMP_MENUPICK ,
  32.   CLASS_CLOSEWINDOW     = IDCMP_CLOSEWINDOW,
  33.   CLASS_RAWKEY          = IDCMP_RAWKEY ,
  34.   CLASS_REQVERIFY       = IDCMP_REQVERIFY ,
  35.   CLASS_REQCLEAR        = IDCMP_REQCLEAR ,
  36.   CLASS_MENUVERIFY      = IDCMP_MENUVERIFY  ,
  37.   CLASS_NEWPREFS        = IDCMP_NEWPREFS ,
  38.   CLASS_DISKINSERTED    = IDCMP_DISKINSERTED ,
  39.   CLASS_DISKREMOVED     = IDCMP_DISKREMOVED  ,
  40.   CLASS_WBENCHMESSAGE   = IDCMP_WBENCHMESSAGE ,
  41.   CLASS_ACTIVEWINDOW    = IDCMP_ACTIVEWINDOW ,
  42.   CLASS_INACTIVEWINDOW  = IDCMP_INACTIVEWINDOW  ,
  43.   CLASS_DELTAMOVE       = IDCMP_DELTAMOVE ,
  44.   CLASS_VANILLAKEY      = IDCMP_VANILLAKEY  ,
  45.   CLASS_INTUITICKS      = IDCMP_INTUITICKS ,
  46.   CLASS_IDCMPUPDATE     = IDCMP_IDCMPUPDATE  ,
  47.   CLASS_MENUHELP        = IDCMP_MENUHELP  ,
  48.   CLASS_CHANGEWINDOW    = IDCMP_CHANGEWINDOW  ,
  49.   CLASS_LONELYMESSAGE   = IDCMP_LONELYMESSAGE
  50. };
  51.  
  52. /******************************************************************************************
  53.       » IntuiMessageC class «
  54.  
  55.    enhances the IntuiMessages structure with useful methods. The IntuiMessage is inherited
  56.    publically, therefore access is permitted to all structure members, but not recommended.
  57.    The provided methods should handle all necessary access in a safe manner.
  58.  
  59.  ******************************************************************************************/
  60. class WindowCV;
  61. class GadgetCV;
  62. class GWindow;
  63. class IntuiMessageC : public IntuiMessage
  64. {
  65.     friend GWindow;
  66.     private:
  67.         IntuiMessageC(IDCMPClass);
  68.         
  69.    public:
  70.       IDCMPClass getClass() const { return (IDCMPClass)Class; }
  71.       APTR getIAddress() const { return (APTR)IAddress; }
  72.         
  73.         BOOL isFakeMsg() const;        // returns TRUE on GADGETUP/DOWN msg. that was created from GWindow 
  74.         
  75.       /* The following decode methods transfer Intuition objects into APlusPlus IntuiObjects.
  76.       ** They may return NULL if it was not possible to gain the encapsulating object.
  77.       */
  78.       WindowCV *decodeWindowCV() const;   // get the message emanating window (safe on all messages)
  79.       GadgetCV *decodeGadgetCV() const;   // get the sending GadgetCV object (safe)
  80.  
  81. };
  82. #endif
  83.