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

  1. #ifndef __OOL_XPINBTN_H__
  2. #define __OOL_XPINBTN_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XSpinButton                           */
  8. /*                       derived from: XControl                              */
  9. /*                        last update: 12/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13. #include "xcontrol.h"
  14.  
  15. #define SP_LEFT     SPBS_JUSTLEFT
  16. #define SP_RIGHT    SPBS_JUSTRIGHT
  17. #define SP_CENTER   SPBS_JUSTCENTER
  18. #define SP_NOBORDER SPBS_NOBORDER
  19. #define SP_FAST     SPBS_FASTDSPIN
  20. #define SP_MASTER   SPBS_MASTER
  21. #define SP_SERVANT  SPBS_SERVANT
  22. #define SP_READONLY SPBS_READONLY
  23. #define SP_NUMERIC  SPBS_NUMERICONLY
  24. #define SP_CHAR     SPBS_ALLCHARACTERS
  25. #define SP_FILLZERO SPBS_PADWITHZEROS
  26.  
  27.  
  28. class _export_ XSpinButton: public XControl{
  29.       friend void BuildChilds( HWND );
  30.    private:
  31.       XSpinButton( const OOL_WINDOWHANDLE hwnd): XControl(hwnd) {;}
  32.    public:
  33.       XSpinButton( const XWindow * owner, const XRect& rec=XRect(), const USHORT id = 0, const ULONG style=SP_NUMERIC|SP_MASTER|SP_RIGHT|WIN_VISIBLE, const char * string="", const char * font = NULL);
  34.       virtual ~XSpinButton() {;}
  35.       LONG GetValue( void) const;
  36.       void SetLimits( const LONG lowerLimit, const LONG upperLimit) const ;
  37.       BOOL SetMaster( const XWindow * master) const ;
  38.       void SetTextLimit( const SHORT limit) const ;
  39.       void SetValue( const LONG val) const ;
  40.       void SpinDown( const LONG units) const ;
  41.       void SpinUp( const LONG units) const ;
  42. };
  43.  
  44. #endif
  45.