home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xslider.h < prev    next >
Text File  |  1998-04-06  |  3KB  |  62 lines

  1. #ifndef __OOL_XSLIDER_H__
  2. #define __OOL_XSLIDER_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XSlider                               */
  8. /*                       derived from: XControl                              */
  9. /*                        last update: 12/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14. #include "xcontrol.h"
  15.  
  16. #ifdef OOL_FOR_OS2_X86
  17.    #define SL_HORIZONTAL         0x0000
  18.    #define SL_VERTICAL            0x0001
  19.    #define SL_CENTER               0x0000
  20.    #define SL_BOTTOM               0x0002
  21.    #define SL_TOP                  0x0004
  22.    #define SL_LEFT               0x0002
  23.    #define SL_RIGHT               0x0004
  24.    #define SL_SNAPTOINCREMENT      0x0008
  25.    #define SL_BUTTONSBOTTOM      0x0010
  26.    #define SL_BUTTONSTOP         0x0020
  27.    #define SL_BUTTONSLEFT         0x0010
  28.    #define SL_BUTTONSRIGHT         0x0020
  29.    #define SL_READONLY            0x0080
  30.    #define SL_RIBBONSTRIP         0x0100
  31.    #define SL_HOMEBOTTOM         0x0000
  32.    #define SL_HOMETOP            0x0200
  33.    #define SL_HOMELEFT            0x0000
  34.    #define SL_HOMERIGHT              0x0200
  35.    #define SL_PRIMARYSCALE1      0x0000
  36.    #define SL_PRIMARYSCALE2      0x0400
  37. #endif
  38.  
  39.  
  40. class _export_ XSlider: public XControl{
  41.       friend void BuildChilds( HWND );
  42.    private:
  43.       XSlider( const HWND hwnd): XControl(hwnd) {;}
  44.    public:
  45.       XSlider( const XWindow * owner, const XRect& rec=XRect(), const USHORT id = 0, const ULONG style = WIN_VISIBLE|SL_HOMELEFT|SL_LEFT|SL_HORIZONTAL, const char*font=NULL);
  46.       virtual ~XSlider() {;}
  47.       LONG AddDetent( const SHORT detent) const ;
  48.       USHORT GetDetentPos( const LONG detentID) const ;
  49.       void GetScaleText( const SHORT tickNumber, XString * buffer) const;
  50.       LONG GetSliderPos( void ) const ;
  51.       void RemoveDetent( const LONG detendID ) const ;
  52.       void SetScales( const USHORT scale1Incr, const USHORT scale1Space, const USHORT scale2Incr = 0, const USHORT scale2Space = 0);
  53.       void SetScaleText( const SHORT tickNumber, const char * text) const ;
  54.       void SetShaftSize( const SHORT size ) const ;
  55.       void SetSliderPos( const LONG pos) const ;
  56.       void SetSliderSize( const SHORT vert, const SHORT horz ) const ;
  57.       void SetTickSize( const SHORT tickNumber = SMA_SETALLTICKS, const SHORT tickLength = 10) const ;
  58. };
  59.  
  60.  
  61. #endif
  62.