]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/scrolbar.h
remove unused variable assignment, closes #14928
[wxWidgets.git] / include / wx / msw / scrolbar.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/msw/scrolbar.h
2bda0e17
KB
3// Purpose: wxScrollBar class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_SCROLBAR_H_
13#define _WX_SCROLBAR_H_
2bda0e17 14
2bda0e17 15// Scrollbar item
53a2db12 16class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase
2bda0e17 17{
2bda0e17 18public:
a23fd0e1 19 wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; }
d3c7fc99 20 virtual ~wxScrollBar();
a23fd0e1
VZ
21
22 wxScrollBar(wxWindow *parent, wxWindowID id,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize,
25 long style = wxSB_HORIZONTAL,
26 const wxValidator& validator = wxDefaultValidator,
27 const wxString& name = wxScrollBarNameStr)
28 {
29 Create(parent, id, pos, size, style, validator, name);
30 }
31 bool Create(wxWindow *parent, wxWindowID id,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = wxSB_HORIZONTAL,
35 const wxValidator& validator = wxDefaultValidator,
36 const wxString& name = wxScrollBarNameStr);
37
38 int GetThumbPosition() const ;
39 int GetThumbSize() const { return m_pageSize; }
40 int GetPageSize() const { return m_viewSize; }
41 int GetRange() const { return m_objectSize; }
42
43 virtual void SetThumbPosition(int viewStart);
44 virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
57f4f925 45 bool refresh = true);
2bda0e17 46
a06bb527
SC
47 // needed for RTTI
48 void SetThumbSize( int s ) { SetScrollbar( GetThumbPosition() , s , GetRange() , GetPageSize() , true ) ; }
49 void SetPageSize( int s ) { SetScrollbar( GetThumbPosition() , GetThumbSize() , GetRange() , s , true ) ; }
50 void SetRange( int s ) { SetScrollbar( GetThumbPosition() , GetThumbSize() , s , GetPageSize() , true ) ; }
51
a23fd0e1 52 void Command(wxCommandEvent& event);
a23fd0e1
VZ
53 virtual bool MSWOnScroll(int orientation, WXWORD wParam,
54 WXWORD pos, WXHWND control);
2bda0e17 55
0cf11995
VZ
56 // override wxControl version to not use solid background here
57 virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd);
caafd082 58
6f02a879
VZ
59 virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
60
a047aff2
JS
61 // returns true if the platform should explicitly apply a theme border
62 virtual bool CanApplyThemeBorder() const { return false; }
63
0cf11995
VZ
64protected:
65 virtual wxSize DoGetBestSize() const;
caafd082 66
2bda0e17
KB
67 int m_pageSize;
68 int m_viewSize;
69 int m_objectSize;
70
fc7a2a60 71 DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrollBar)
2bda0e17
KB
72};
73
74#endif
bbcdf8bc 75 // _WX_SCROLBAR_H_