1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_SCROLBAR_H_BASE_
|
|
|
|
#define _WX_SCROLBAR_H_BASE_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2001-06-26 16:59:19 -04: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:
|
|
|
|
// 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;
|
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/scrolbar.h"
|
|
|
|
#elif defined(__WXMSW__)
|
|
|
|
#include "wx/msw/scrolbar.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXMOTIF__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/motif/scrolbar.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXGTK__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/gtk/scrolbar.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXMAC__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/mac/scrolbar.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/os2/scrolbar.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXSTUBS__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/stubs/scrolbar.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#endif // wxUSE_SCROLLBAR
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
1998-08-14 20:23:28 -04:00
|
|
|
// _WX_SCROLBAR_H_BASE_
|