home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2240.zip / wxWindows-2.4.0 / include / wx / os2 / scrolbar.h < prev    next >
C/C++ Source or Header  |  2002-12-27  |  4KB  |  94 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name:        scrollbar.h
  3. // Purpose:     wxScrollBar class
  4. // Author:      David Webster
  5. // Modified by:
  6. // Created:     10/15/99
  7. // RCS-ID:      $Id: SCROLBAR.H,v 1.7.2.2 2002/12/27 14:49:42 JS Exp $
  8. // Copyright:   (c) David Webster
  9. // Licence:     wxWindows licence
  10. /////////////////////////////////////////////////////////////////////////////
  11.  
  12. #ifndef _WX_SCROLBAR_H_
  13. #define _WX_SCROLBAR_H_
  14.  
  15. #include "wx/scrolbar.h"
  16.  
  17. // Scrollbar item
  18. class WXDLLEXPORT wxScrollBar : public wxScrollBarBase
  19. {
  20. public:
  21.     inline wxScrollBar()
  22.     {
  23.         m_nPageSize = 0;
  24.         m_nViewSize = 0;
  25.         m_nObjectSize = 0;
  26.     }
  27.     inline wxScrollBar( wxWindow*          pParent
  28.                        ,wxWindowID         vId
  29.                        ,const wxPoint&     rPos = wxDefaultPosition
  30.                        ,const wxSize&      rSize = wxDefaultSize
  31.                        ,long               lStyle = wxSB_HORIZONTAL
  32.                        ,const wxValidator& rValidator = wxDefaultValidator
  33.                        ,const wxString&    rsName = wxScrollBarNameStr
  34.                       )
  35.     {
  36.         Create( pParent
  37.                ,vId
  38.                ,rPos
  39.                ,rSize
  40.                ,lStyle
  41.                ,rValidator
  42.                ,rsName
  43.               );
  44.     }
  45.     ~wxScrollBar();
  46.  
  47.     bool Create( wxWindow*          pParent
  48.                 ,wxWindowID         vId
  49.                 ,const wxPoint&     rPos = wxDefaultPosition
  50.                 ,const wxSize&      rSize = wxDefaultSize
  51.                 ,long               lStyle = wxSB_HORIZONTAL
  52.                 ,const wxValidator& rValidator = wxDefaultValidator
  53.                 ,const wxString&    rsName = wxScrollBarNameStr
  54.                );
  55.  
  56.                    int   GetThumbPosition(void) const ;
  57.     inline         int   GetThumbSize(void) const { return m_nPageSize; }
  58.     inline         int   GetPageSize(void) const { return m_nViewSize; }
  59.     inline         int   GetRange(void) const { return m_nObjectSize; }
  60.  
  61.            virtual void  SetThumbPosition(int nViewStart);
  62.            virtual void  SetScrollbar( int  nPosition
  63.                                       ,int  nThumbSize
  64.                                       ,int  nRange
  65.                                       ,int  nPageSize
  66.                                       ,bool bRefresh = TRUE
  67.                                      );
  68.  
  69.                    void      Command(wxCommandEvent& rEvent);
  70.             virtual WXHBRUSH OnCtlColor( WXHDC    hDC
  71.                                         ,WXHWND   hWnd
  72.                                         ,WXUINT   uCtlColor
  73.                                         ,WXUINT   uMessage
  74.                                         ,WXWPARAM wParam
  75.                                         ,WXLPARAM lParam
  76.                                        );
  77.             virtual bool     OS2OnScroll( int    nOrientation
  78.                                          ,WXWORD wParam
  79.                                          ,WXWORD wPos
  80.                                          ,WXHWND hControl
  81.                                         );
  82.  
  83. protected:
  84.     int                             m_nPageSize;
  85.     int                             m_nViewSize;
  86.     int                             m_nObjectSize;
  87.  
  88. private:
  89.     DECLARE_DYNAMIC_CLASS(wxScrollBar)
  90. }; // end of CLASS wxScrollBar
  91.  
  92. #endif
  93.     // _WX_SCROLBAR_H_
  94.