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