]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/scrolbar.h
No real changes, just make wxWindow::CanScroll() virtual.
[wxWidgets.git] / include / wx / gtk1 / scrolbar.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/scrolbar.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078 5// Copyright: (c) 1998 Robert Roebling
65571936 6// Licence: wxWindows licence
c801d85f
KB
7/////////////////////////////////////////////////////////////////////////////
8
c801d85f
KB
9#ifndef __GTKSCROLLBARH__
10#define __GTKSCROLLBARH__
11
c801d85f 12#include "wx/defs.h"
dcf924a3 13
c801d85f
KB
14//-----------------------------------------------------------------------------
15// classes
16//-----------------------------------------------------------------------------
17
b5dbe15d 18class WXDLLIMPEXP_FWD_CORE wxScrollBar;
c801d85f 19
c801d85f
KB
20//-----------------------------------------------------------------------------
21// wxScrollBar
22//-----------------------------------------------------------------------------
23
20123d49 24class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase
c801d85f 25{
20e05ffb 26public:
1e6feb95 27 wxScrollBar()
d3b9f782 28 { m_adjust = NULL; m_oldPos = 0.0; }
6de97a3b 29 inline wxScrollBar( wxWindow *parent, wxWindowID id,
c801d85f
KB
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
debe6624 32 long style = wxSB_HORIZONTAL,
6de97a3b
RR
33 const wxValidator& validator = wxDefaultValidator,
34 const wxString& name = wxScrollBarNameStr )
35 {
9826157f 36 Create( parent, id, pos, size, style, validator, name );
6de97a3b
RR
37 }
38 bool Create( wxWindow *parent, wxWindowID id,
c801d85f
KB
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
debe6624 41 long style = wxSB_HORIZONTAL,
6de97a3b
RR
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxScrollBarNameStr );
d3c7fc99 44 virtual ~wxScrollBar();
9826157f 45 int GetThumbPosition() const;
c801d85f
KB
46 int GetThumbSize() const;
47 int GetPageSize() const;
48 int GetRange() const;
4fabb575 49 virtual void SetThumbPosition( int viewStart );
debe6624
JS
50 virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
51 bool refresh = TRUE );
c801d85f 52
20e05ffb
RR
53 // Backward compatibility
54 // ----------------------
1e6feb95 55
c801d85f 56 int GetValue(void) const;
debe6624 57 void SetValue( int viewStart );
c801d85f
KB
58 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
59 int GetViewLength() const;
60 int GetObjectLength() const;
debe6624
JS
61 void SetPageSize( int pageLength );
62 void SetObjectLength( int objectLength );
63 void SetViewLength( int viewLength );
64
9d522606
RD
65 static wxVisualAttributes
66 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
8ef94bfc 67
20e05ffb
RR
68 // implementation
69 // --------------
1e6feb95 70
b4071e91 71 bool IsOwnGtkWindow( GdkWindow *window );
1e6feb95 72
c801d85f
KB
73 GtkAdjustment *m_adjust;
74 float m_oldPos;
1e6feb95 75
7f980cff
VS
76protected:
77 virtual wxSize DoGetBestSize() const;
78
20e05ffb
RR
79private:
80 DECLARE_DYNAMIC_CLASS(wxScrollBar)
c801d85f
KB
81};
82
83#endif
84 // __GTKSCROLLBARH__