1998-08-15 00:23:28 +00:00
|
|
|
#ifndef _WX_SCROLBAR_H_BASE_
|
|
|
|
#define _WX_SCROLBAR_H_BASE_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#if wxUSE_SCROLLBAR
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxScrollBarNameStr;
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxScrollBar: a scroll bar control
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxScrollBarBase : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
2003-07-22 00:24:07 +00:00
|
|
|
wxScrollBarBase() { }
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
// scrollbar construction
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSB_HORIZONTAL,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxScrollBarNameStr);
|
|
|
|
|
|
|
|
// accessors
|
|
|
|
virtual int GetThumbPosition() const = 0;
|
|
|
|
virtual int GetThumbSize() const = 0;
|
|
|
|
virtual int GetPageSize() const = 0;
|
|
|
|
virtual int GetRange() const = 0;
|
|
|
|
|
|
|
|
bool IsVertical() const { return (m_windowStyle & wxVERTICAL) != 0; }
|
|
|
|
|
|
|
|
// operations
|
|
|
|
virtual void SetThumbPosition(int viewStart) = 0;
|
|
|
|
virtual void SetScrollbar(int position, int thumbSize,
|
|
|
|
int range, int pageSize,
|
|
|
|
bool refresh = TRUE) = 0;
|
2003-07-22 00:24:07 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_NO_COPY_CLASS(wxScrollBarBase)
|
2001-06-26 20:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/scrolbar.h"
|
|
|
|
#elif defined(__WXMSW__)
|
|
|
|
#include "wx/msw/scrolbar.h"
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXMOTIF__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/motif/scrolbar.h"
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXGTK__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/gtk/scrolbar.h"
|
1998-08-15 00:23:28 +00:00
|
|
|
#elif defined(__WXMAC__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/mac/scrolbar.h"
|
1999-07-28 03:38:12 +00:00
|
|
|
#elif defined(__WXPM__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/os2/scrolbar.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_SCROLLBAR
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
1998-08-15 00:23:28 +00:00
|
|
|
// _WX_SCROLBAR_H_BASE_
|