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

  1. #ifndef _ICSLIDER_
  2.    #define _ICSLIDER_
  3. /*******************************************************************************
  4. * FILE NAME: icslider.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     ICircularSlider                                                          *
  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 <itextctl.hpp>
  19. #include <irect.hpp>
  20.  
  21. class IRange;
  22. class ISize;
  23. class IResourceId;
  24. class IWindowHandle;
  25. class IBitmapHandle;
  26. class ICircularSliderData;
  27.  
  28. #pragma pack(4)
  29.  
  30.  
  31. class ICircularSlider : public ITextControl {
  32. typedef ITextControl
  33.   Inherited;
  34. public:
  35. class Style;
  36.  
  37. /*------------------------------ Constructors --------------------------------*/
  38.   ICircularSlider  (unsigned long Identifier,
  39.                     IWindow* parent,
  40.                     IWindow* owner,
  41.                     const IRectangle& initial = IRectangle(),
  42.                     const Style& style = defaultStyle());
  43.  
  44.   ICircularSlider  (unsigned long Identifier,
  45.                     IWindow* parentAndOwner);
  46.  
  47.   ICircularSlider  (const IWindowHandle& handle);
  48.  
  49. virtual
  50.   ~ICircularSlider ();
  51.  
  52. /*---------------------------------- Styles ----------------------------------*/
  53. INESTEDBITFLAGCLASSDEF2(Style, ICircularSlider, IWindow, IControl);
  54.  
  55. static const Style
  56.   IC_IMPORTU buttons,
  57.   IC_IMPORTU label,
  58.   IC_IMPORTU displayValue,
  59.   IC_IMPORTU jumpToPointer,
  60.   IC_IMPORTU full360,
  61.   IC_IMPORTU midpoint,
  62.   IC_IMPORTU proportionalTicks,
  63.   IC_IMPORTU noTicks,
  64.   IC_IMPORTU circularArm,
  65.   IC_IMPORTU classDefaultStyle;
  66.  
  67. static Style
  68.   defaultStyle     ( );
  69. static void
  70.   setDefaultStyle  ( const Style& style );
  71.  
  72. virtual unsigned long
  73.   convertToGUIStyle ( const IBitFlag& style,
  74.                       Boolean         extendedOnly = false ) const;
  75.  
  76. /*------------------------------ Arm Operations ------------------------------*/
  77. IRange
  78.   armRange             () const;
  79. long
  80.   value                () const;
  81. unsigned long
  82.   radius               () const,
  83.   rotationIncrement    () const,
  84.   tickSpacing          () const;
  85.  
  86. ICircularSlider
  87.   &setArmRange         (const IRange& range),
  88.   &setValue            (long value),
  89.   &setRotationIncrement(unsigned long increment),
  90.   &setTickSpacing      (unsigned long tick),
  91.   &setDecrementBitmaps (const IResourceId& leftUp,
  92.                         const IResourceId& leftDown),
  93.   &setDecrementBitmaps (const IBitmapHandle& leftUp,
  94.                         const IBitmapHandle& leftDown),
  95.   &setIncrementBitmaps (const IResourceId& rightUp,
  96.                         const IResourceId& rightDown),
  97.   &setIncrementBitmaps (const IBitmapHandle& rightUp,
  98.                         const IBitmapHandle& rightDown);
  99.  
  100. /*----------------------- Notification Event Descriptions --------------------*/
  101. static INotificationId const
  102.   IC_IMPORTU valueId,
  103.   IC_IMPORTU trackId;
  104.  
  105. /*--------------------------- Observer Notification --------------------------*/
  106. virtual ICircularSlider
  107.  &enableNotification ( Boolean enable=true );
  108.  
  109. protected:
  110. /*------------------------------ Layout Support ------------------------------*/
  111. virtual ISize
  112.   calcMinimumSize() const;
  113.  
  114. private:
  115. /*------------------------------ Hidden Members ------------------------------*/
  116.   ICircularSlider       ( const ICircularSlider& slider );
  117. ICircularSlider
  118.  &operator=             ( const ICircularSlider& slider );
  119.  
  120. /*--------------------------------- Private ----------------------------------*/
  121. static Boolean
  122.   IC_IMPORTU fRegistered;
  123. static Style
  124.   IC_IMPORTU currentDefaultStyle;
  125. void*
  126.   fData;
  127.  
  128. ICircularSliderData
  129.  *fCircularSliderData;
  130. }; // ICircularSlider
  131.  
  132. INESTEDBITFLAGCLASSFUNCS(Style, ICircularSlider);
  133.  
  134.  
  135. #pragma pack()
  136.  
  137. #endif /* _ICSLIDER_ */
  138.