1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/motif/scrolbar.h
|
1998-09-18 06:19:10 -04:00
|
|
|
// Purpose: wxScrollBar class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// Copyright: (c) Julian Smart
|
2006-07-25 10:31:55 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_SCROLBAR_H_
|
|
|
|
#define _WX_SCROLBAR_H_
|
|
|
|
|
|
|
|
// Scrollbar item
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2002-02-05 11:34:33 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxScrollBar)
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
public:
|
2002-02-05 11:34:33 -05:00
|
|
|
inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxScrollBar();
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
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);
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
int GetThumbPosition() const ;
|
|
|
|
inline int GetThumbSize() const { return m_pageSize; }
|
|
|
|
inline int GetPageSize() const { return m_viewSize; }
|
|
|
|
inline int GetRange() const { return m_objectSize; }
|
2002-06-28 07:35:43 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
virtual void SetThumbPosition(int viewStart);
|
|
|
|
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
2005-02-06 12:38:33 -05:00
|
|
|
bool refresh = true);
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
void Command(wxCommandEvent& event);
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
// Implementation
|
2005-02-06 12:38:33 -05:00
|
|
|
virtual void ChangeFont(bool keepOriginalSize = true);
|
2002-02-05 11:34:33 -05:00
|
|
|
virtual void ChangeBackgroundColour();
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
protected:
|
|
|
|
int m_pageSize;
|
|
|
|
int m_viewSize;
|
|
|
|
int m_objectSize;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 11:34:33 -05:00
|
|
|
// _WX_SCROLBAR_H_
|