1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-01-23 23:23:46 +00:00
|
|
|
// Name: wx/generic/scrolwin.h
|
2008-12-24 16:43:30 +00:00
|
|
|
// Purpose: generic wxScrollHelper
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Created: 2008-12-24 (replacing old file with the same name)
|
1998-05-20 14:01:55 +00:00
|
|
|
// RCS-ID: $Id$
|
2008-12-24 16:43:30 +00:00
|
|
|
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2000-01-23 23:23:46 +00:00
|
|
|
#ifndef _WX_GENERIC_SCROLLWIN_H_
|
|
|
|
#define _WX_GENERIC_SCROLLWIN_H_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-01-23 23:23:46 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
2008-12-24 16:43:30 +00:00
|
|
|
// generic wxScrollHelper implementation
|
2000-01-23 23:23:46 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-12-24 16:43:30 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxScrollHelper(wxWindow *winToScroll);
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2008-12-24 16:43:30 +00:00
|
|
|
// implement base class pure virtuals
|
|
|
|
virtual void AdjustScrollbars();
|
|
|
|
|
2008-12-25 12:27:20 +00:00
|
|
|
protected:
|
2008-12-24 16:43:30 +00:00
|
|
|
virtual void DoScroll(int x, int y);
|
|
|
|
virtual void DoShowScrollbars(wxScrollbarVisibility horz,
|
|
|
|
wxScrollbarVisibility vert);
|
|
|
|
|
2008-12-25 12:27:20 +00:00
|
|
|
private:
|
2008-12-24 16:43:30 +00:00
|
|
|
// helper of AdjustScrollbars(): does the work for the single scrollbar
|
|
|
|
//
|
|
|
|
// notice that the parameters passed by non-const references are modified
|
|
|
|
// by this function
|
|
|
|
void DoAdjustScrollbar(int orient,
|
|
|
|
int clientSize,
|
|
|
|
int virtSize,
|
2008-12-24 21:58:05 +00:00
|
|
|
int pixelsPerUnit,
|
2008-12-24 16:43:30 +00:00
|
|
|
int& scrollUnits,
|
|
|
|
int& scrollPosition,
|
2008-12-24 21:58:05 +00:00
|
|
|
int& scrollLinesPerPage,
|
2008-12-24 16:43:30 +00:00
|
|
|
wxScrollbarVisibility visibility);
|
|
|
|
|
|
|
|
|
|
|
|
wxScrollbarVisibility m_xVisibility,
|
|
|
|
m_yVisibility;
|
|
|
|
|
2009-02-08 11:45:59 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxScrollHelper);
|
2008-12-24 16:43:30 +00:00
|
|
|
};
|
2000-01-23 23:23:46 +00:00
|
|
|
|
2005-10-09 22:34:08 +00:00
|
|
|
#endif // _WX_GENERIC_SCROLLWIN_H_
|
2002-04-19 22:12:38 +00:00
|
|
|
|