2005-03-16 16:18:31 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: scrolbar.h
|
|
|
|
// Purpose: wxScrollBar base header
|
|
|
|
// Author: wxWidgets Team
|
|
|
|
// Modified by:
|
|
|
|
// Created:
|
|
|
|
// Copyright: (c) wxWidgets Team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
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
|
|
|
|
2005-03-16 16:18:31 +00:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#if wxUSE_SCROLLBAR
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
2005-01-21 18:48:22 +00:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar*) wxScrollBarNameStr;
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// 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,
|
2004-09-22 14:38:52 +00:00
|
|
|
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"
|
2004-06-23 15:26:44 +00:00
|
|
|
#elif defined(__WXCOCOA__)
|
|
|
|
#include "wx/cocoa/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_
|