1999-01-01 16:05:26 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: scrollbar.h
|
|
|
|
// Purpose: wxScrollBar class
|
2003-02-28 21:54:04 +00:00
|
|
|
// Author: Stefan Csomor
|
1999-01-01 16:05:26 +00:00
|
|
|
// Modified by:
|
2003-02-28 21:54:04 +00:00
|
|
|
// Created: 1998-01-01
|
1999-01-01 16:05:26 +00:00
|
|
|
// RCS-ID: $Id$
|
2003-02-28 21:54:04 +00:00
|
|
|
// Copyright: (c) Stefan Csomor
|
2003-02-28 23:48:13 +00:00
|
|
|
// Licence: wxWindows licence
|
1999-01-01 16:05:26 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_SCROLBAR_H_
|
|
|
|
#define _WX_SCROLBAR_H_
|
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-01-01 16:05:26 +00:00
|
|
|
#pragma interface "scrolbar.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
2003-03-27 20:14:39 +00:00
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxScrollBarNameStr;
|
1999-01-01 16:05:26 +00:00
|
|
|
|
|
|
|
// Scrollbar item
|
|
|
|
class WXDLLEXPORT wxScrollBar: public wxControl
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxScrollBar)
|
|
|
|
|
|
|
|
public:
|
|
|
|
inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
|
|
|
|
~wxScrollBar();
|
|
|
|
|
|
|
|
inline wxScrollBar(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSB_HORIZONTAL,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxScrollBarNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
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);
|
|
|
|
|
|
|
|
int GetThumbPosition() const ;
|
2002-01-20 16:11:37 +00:00
|
|
|
inline int GetThumbSize() const { return m_viewSize; }
|
|
|
|
inline int GetPageSize() const { return m_pageSize; }
|
1999-01-01 16:05:26 +00:00
|
|
|
inline int GetRange() const { return m_objectSize; }
|
|
|
|
|
2001-11-27 05:44:36 +00:00
|
|
|
bool IsVertical() const { return (m_windowStyle & wxVERTICAL) != 0; }
|
|
|
|
|
1999-01-01 16:05:26 +00:00
|
|
|
virtual void SetThumbPosition(int viewStart);
|
|
|
|
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
|
|
|
bool refresh = TRUE);
|
|
|
|
|
|
|
|
void Command(wxCommandEvent& event);
|
2003-06-07 20:29:57 +00:00
|
|
|
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
|
1999-01-01 16:05:26 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
int m_pageSize;
|
|
|
|
int m_viewSize;
|
|
|
|
int m_objectSize;
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_SCROLBAR_H_
|