home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / OWLINC.PAK / CONTROLG.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  1KB  |  53 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // (C) Copyright 1992, 1994 by Borland International, All Rights Reserved
  4. //
  5. //   Class TControlGadget definition
  6. //----------------------------------------------------------------------------
  7. #if !defined(OWL_CONTROLG_H)
  8. #define OWL_CONTROLG_H
  9.  
  10. #if !defined(OWL_GADGET_H)
  11. # include <owl/gadget.h>
  12. #endif
  13.  
  14. //
  15. //  class TControlGadget
  16. //  ----- --------------
  17. //
  18. class _OWLCLASS TControlGadget : public TGadget {
  19.   public:
  20.     TControlGadget(TWindow& control, TBorderStyle = None);
  21.    ~TControlGadget();
  22.  
  23.   protected:
  24.     void           Inserted();
  25.     void           Removed();
  26.  
  27.     void           Invalidate(bool erase = true);
  28.     void           InvalidateRect(const TRect& rect, // receiver's coord system
  29.                                   bool  erase = true);
  30.     void           Update();  // Paint now if possible
  31.  
  32.     void           SetBounds(TRect& rect);
  33.  
  34.     //
  35.     // computes the area excluding the borders and margins
  36.     //
  37.     void           GetInnerRect(TRect& rect);
  38.  
  39.     void           GetDesiredSize(TSize& size);
  40.  
  41.   protected:
  42.     TWindow*       Control;
  43.  
  44.   private:
  45.     //
  46.     // hidden to prevent accidental copying or assignment
  47.     //
  48.     TControlGadget(const TControlGadget&);
  49.     TControlGadget& operator =(const TControlGadget&);
  50. };
  51.  
  52. #endif  // OWL_CONTROLG_H
  53.