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

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // (C) Copyright 1993, 1994 by Borland International, All Rights Reserved
  4. //
  5. //   Implementation of class TBitmapGadget
  6. //----------------------------------------------------------------------------
  7. #if !defined(OWL_BITMAPGA_H)
  8. #define OWL_BITMAPGA_H
  9.  
  10. #if !defined(OWL_GADGET_H)
  11. # include <owl/gadget.h>
  12. #endif
  13. class _OWLCLASS TCelArray;
  14.  
  15. //
  16. //  class TBitmapGadget
  17. //  ----- -------------
  18. //
  19. //  simple gadget that can display an array of bitmap images, one at a time.
  20. //
  21. class _OWLCLASS TBitmapGadget : public TGadget {
  22.   public:
  23.     TBitmapGadget(TResId bmpResId,
  24.                   int id,
  25.                   TBorderStyle borderStyle,
  26.                   int numImages, 
  27.                   int startImage);
  28.    ~TBitmapGadget();
  29.     
  30.     int  SelectImage(int imageNum, bool immediate);
  31.     int  GetImage() const {return CurrentImage;}
  32.  
  33.     void SysColorChange();
  34.  
  35.   protected:
  36.     void Paint(TDC& dc);
  37.     
  38.     void SetBounds(TRect& boundRect);
  39.     void GetDesiredSize(TSize& size);
  40.     
  41.   private:
  42.     TResId     ResId;
  43.     TCelArray* ImageArray;
  44.     int        CurrentImage;
  45.     int        NumImages;
  46.     TPoint     BitmapOrigin;
  47. };
  48.  
  49. #endif  // OWL_BITMAPGA_H
  50.