1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: scrollbar.h
|
|
|
|
// Purpose: wxScrollBar class
|
1999-10-15 17:00:38 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-15 17:00:38 -04:00
|
|
|
// Created: 10/15/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-15 17:00:38 -04:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_SCROLBAR_H_
|
|
|
|
#define _WX_SCROLBAR_H_
|
|
|
|
|
2001-07-06 17:45:11 -04:00
|
|
|
#include "wx/scrolbar.h"
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
// Scrollbar item
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxScrollBar : public wxScrollBarBase
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
|
|
|
public:
|
2003-01-06 12:42:48 -05:00
|
|
|
inline wxScrollBar()
|
|
|
|
{
|
|
|
|
m_nPageSize = 0;
|
|
|
|
m_nViewSize = 0;
|
|
|
|
m_nObjectSize = 0;
|
|
|
|
}
|
|
|
|
inline wxScrollBar( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = wxSB_HORIZONTAL
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
#endif
|
|
|
|
,const wxString& rsName = wxScrollBarNameStr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,lStyle
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
,rValidator
|
|
|
|
#endif
|
|
|
|
,rsName
|
|
|
|
);
|
|
|
|
}
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxScrollBar();
|
1999-10-15 17:00:38 -04:00
|
|
|
|
2003-01-06 12:42:48 -05:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = wxSB_HORIZONTAL
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
1999-10-15 17:00:38 -04:00
|
|
|
#endif
|
2003-01-06 12:42:48 -05:00
|
|
|
,const wxString& rsName = wxScrollBarNameStr
|
|
|
|
);
|
1999-10-15 17:00:38 -04:00
|
|
|
|
2003-01-06 12:42:48 -05:00
|
|
|
int GetThumbPosition(void) const ;
|
|
|
|
inline int GetThumbSize(void) const { return m_nPageSize; }
|
|
|
|
inline int GetPageSize(void) const { return m_nViewSize; }
|
|
|
|
inline int GetRange(void) const { return m_nObjectSize; }
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2003-01-06 12:42:48 -05:00
|
|
|
virtual void SetThumbPosition(int nViewStart);
|
|
|
|
virtual void SetScrollbar( int nPosition
|
|
|
|
,int nThumbSize
|
|
|
|
,int nRange
|
|
|
|
,int nPageSize
|
|
|
|
,bool bRefresh = TRUE
|
|
|
|
);
|
1999-10-15 17:00:38 -04:00
|
|
|
|
2003-01-06 12:42:48 -05:00
|
|
|
void Command(wxCommandEvent& rEvent);
|
|
|
|
virtual WXHBRUSH OnCtlColor( WXHDC hDC
|
|
|
|
,WXHWND hWnd
|
|
|
|
,WXUINT uCtlColor
|
|
|
|
,WXUINT uMessage
|
|
|
|
,WXWPARAM wParam
|
|
|
|
,WXLPARAM lParam
|
|
|
|
);
|
|
|
|
virtual bool OS2OnScroll( int nOrientation
|
|
|
|
,WXWORD wParam
|
|
|
|
,WXWORD wPos
|
|
|
|
,WXHWND hControl
|
|
|
|
);
|
1999-10-15 17:00:38 -04:00
|
|
|
|
1999-07-29 01:11:30 -04:00
|
|
|
protected:
|
2003-01-06 12:42:48 -05:00
|
|
|
int m_nPageSize;
|
|
|
|
int m_nViewSize;
|
|
|
|
int m_nObjectSize;
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2003-01-06 12:42:48 -05:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxScrollBar)
|
|
|
|
}; // end of CLASS wxScrollBar
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_SCROLBAR_H_
|