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 / GWindow.h < prev    next >
C/C++ Source or Header  |  1994-05-09  |  3KB  |  69 lines

  1. #ifndef APP_GWindow_H
  2. #define APP_GWindow_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/GWindow.h 1.04 (04.05.94) $
  11.  **    
  12.  ******************************************************************************/
  13.  
  14. #include <APlusPlus/intuition/WindowCV.h>
  15. #include <APlusPlus/graphics/DrawArea.h>
  16. #include <APlusPlus/intuition/GadgetCV.h>
  17.  
  18.  
  19. /******************************************************************************************
  20.       » GWindow class «
  21.  
  22.    This Window class combines all Intuition supported gadget types including BOOPSI and,
  23.    additionally to GWindow class, GadTools. All gadget types may be used together in
  24.    one GWindow. Furthermore a DrawArea is provided for the inner window box.
  25.  
  26.  ******************************************************************************************/
  27.  
  28. class GWindow : public WindowCV, public DrawArea
  29. {   
  30.    // find the GadgetCV object to a Gadget structure, for instance received with an IntuiMessage
  31.     friend GadgetCV;
  32.    private:
  33.       GadgetCV *activeGadget;    // gadget that is actual to get all IDCMP messages without an IAddress.
  34.       GadgetCV *defaultGadget;   // may be defined to receive IDCMP messages without gadget reference.
  35.       struct Gadget *firstUserGad;  // holds the beginning of the list of user gadgets.
  36.          // Remember: The first gadgets in a window's list after being opened are the system gadgets!
  37.       struct Gadget *GT_context; // context data for Gadtools.
  38.       struct Gadget *GT_last;    // tail of the linked list of GadTools gadgets during the ON_NEWSIZE proc.
  39.         FontC screenFont;
  40.         FontC defaultFont;
  41.  
  42.       // preset IDCMP callbacks
  43.       void On_GADGETDOWN(const IntuiMessageC *);
  44.       void On_GADGETUP(const IntuiMessageC *);
  45.         void On_SIZEVERIFY(const IntuiMessageC *);
  46.       void On_NEWSIZE(const IntuiMessageC *);
  47.       void On_REFRESHWINDOW(const IntuiMessageC *);
  48.  
  49.       void default_IMsgCallback(const IntuiMessageC *imsg);        
  50.                 
  51.    protected:
  52.       void handleIntuiMsg(const IntuiMessageC*);    // inherited from WindowCV
  53.  
  54.    public:
  55.       GWindow(IntuiObject *owner,AttrList& attrs);      
  56.       ~GWindow();
  57.         
  58.       void refreshGList() { On_NEWSIZE(NULL); }   // redraw all gadgets
  59.             
  60.         const FontC& getScreenFont() { return screenFont; }    // this is the Screen Text font from Preferences
  61.         const FontC& getDefaultFont() { return defaultFont; }    // and this the System Default font from Preferences
  62.         
  63.         void setActiveGadget(GadgetCV *newActive);    
  64.       // force a certain Gadget to become the active one, that is the one that
  65.       // receives all undirected IDCMP messages.
  66.       // 'newActive' may be NULL to deactivate itself
  67. };
  68. #endif
  69.