home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ibmpctl.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  5.0 KB  |  141 lines

  1. #ifndef _IBMPCTL_
  2.   #define _IBMPCTL_
  3. /*******************************************************************************
  4. * FILE NAME: ibmpctl.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IBitmapControl                                                           *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #include <istattxt.hpp>
  19. #include <irect.hpp>
  20. #include <ihandle.hpp>
  21.  
  22. class IResourceId;
  23. class ISize;
  24. class IBitmapControlData;
  25.  
  26. #pragma pack(4)
  27.  
  28. class IBitmapControl : public IStaticText {
  29. typedef IStaticText
  30.   Inherited;
  31. public:
  32. class Style;
  33. /*------------------------ Constructors --------------------------------------*/
  34. IBitmapControl ( unsigned long      id,
  35.                  IWindow*           parent,
  36.                  IWindow*           owner,
  37.                  const IResourceId& bitmapId,
  38.                  const IRectangle&  initial= IRectangle(),
  39.                  const Style&       style = defaultStyle() );
  40.  
  41. IBitmapControl ( unsigned long     id,
  42.                  IWindow*          parent,
  43.                  IWindow*          owner,
  44.                  unsigned long     bitmapId,
  45.                  const IRectangle& initial= IRectangle(),
  46.                  const Style&      style = defaultStyle() );
  47.  
  48. IBitmapControl ( unsigned long        id,
  49.                  IWindow*             parent,
  50.                  IWindow*             owner,
  51.                  const IBitmapHandle& bitmapId = IBitmapHandle(),
  52.                  const IRectangle&    initial= IRectangle(),
  53.                  const Style&         style = defaultStyle() );
  54.  
  55. IBitmapControl ( unsigned long                   id,
  56.                  IWindow*                        parent,
  57.                  IWindow*                        owner,
  58.                  ISystemBitmapHandle::Identifier bitmapId,
  59.                  const IRectangle&               initial= IRectangle(),
  60.                  const Style&                    style = defaultStyle() );
  61.  
  62. IBitmapControl ( unsigned long id,
  63.                  IWindow*      parentDialog );
  64.  
  65. IBitmapControl ( const IWindowHandle& handle );
  66.  
  67. virtual
  68.   ~IBitmapControl();
  69.  
  70. /*---------------------------------- Styles ----------------------------------*/
  71. INESTEDBITFLAGCLASSDEF3(Style, IBitmapControl, IWindow, IControl, IStaticText);
  72.  
  73. static const Style
  74.   IC_IMPORTU classDefaultStyle,
  75.   IC_IMPORTU sizeToBitmap;
  76.  
  77. static Style
  78.   defaultStyle      ( );
  79.  
  80. static void
  81.   setDefaultStyle   ( const Style&    style );
  82.  
  83. virtual unsigned long
  84.   convertToGUIStyle ( const IBitFlag& style,
  85.                       Boolean         extendedOnly = false ) const;
  86.  
  87. /*-------------------------------- Bitmaps -----------------------------------*/
  88. virtual IBitmapControl
  89.   &setBitmap ( unsigned long        bitmapId ),
  90.   &setBitmap ( const IResourceId&   bitmapId ),
  91.   &setBitmap ( const IBitmapHandle& handle );
  92.  
  93. virtual IBitmapControl
  94.   &setBitmap ( ISystemBitmapHandle::Identifier bitmap );
  95.  
  96. IBitmapHandle
  97.   bitmap    ( ) const;
  98.  
  99. /*----------------------------- Layout Support -------------------------------*/
  100. virtual IBitmapControl
  101.  &setLayoutDistorted ( unsigned long layoutAttributesOn,
  102.                        unsigned long layoutAttributesOff );
  103.  
  104. /*-------------------------------- Window Positioning ------------------------*/
  105.  
  106. protected:
  107. /*----------------------------- Layout Support -------------------------------*/
  108. virtual ISize
  109.   calcMinimumSize() const;
  110.  
  111. private:
  112. /*--------------------------------- Private ----------------------------------*/
  113. IBitmapControl
  114.   &initialize(const Style& style);
  115.  
  116. static Style
  117.   currentDefaultStyle;
  118.  
  119. IBitmapControlData
  120.  *fBitmapControlData;
  121.  
  122. IBitmapHandle
  123.   bmpHandle;
  124. Boolean
  125.   bSizeTo,
  126.   returnback;
  127.  
  128. /*---------------------------- Hidden Members --------------------------------*/
  129.   IBitmapControl(const IBitmapControl&);
  130. IBitmapControl
  131.   &operator=(const IBitmapControl);
  132.  
  133. };  // class IBitmapControl
  134.  
  135. INESTEDBITFLAGCLASSFUNCS(Style, IBitmapControl);
  136.                                   // global style functions
  137.  
  138. #pragma pack()
  139.  
  140. #endif  /* _IBMPCTL_ */
  141.