]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/scrolbar.h
Compile fix for GIF decoder,
[wxWidgets.git] / include / wx / gtk / scrolbar.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: scrolbar.h
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
c801d85f
KB
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKSCROLLBARH__
12#define __GTKSCROLLBARH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
dcf924a3
RR
19
20#if wxUSE_SCROLLBAR
21
c801d85f
KB
22#include "wx/object.h"
23#include "wx/control.h"
24
25//-----------------------------------------------------------------------------
26// classes
27//-----------------------------------------------------------------------------
28
29class wxScrollBar;
30
31//-----------------------------------------------------------------------------
32// global data
33//-----------------------------------------------------------------------------
34
35extern const char *wxScrollBarNameStr;
36
37//-----------------------------------------------------------------------------
38// wxScrollBar
39//-----------------------------------------------------------------------------
40
41class wxScrollBar: public wxControl
42{
20e05ffb 43public:
9826157f
RR
44 wxScrollBar()
45 { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }
6de97a3b 46 inline wxScrollBar( wxWindow *parent, wxWindowID id,
c801d85f
KB
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
debe6624 49 long style = wxSB_HORIZONTAL,
6de97a3b
RR
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxScrollBarNameStr )
52 {
9826157f 53 Create( parent, id, pos, size, style, validator, name );
6de97a3b
RR
54 }
55 bool Create( wxWindow *parent, wxWindowID id,
c801d85f
KB
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
debe6624 58 long style = wxSB_HORIZONTAL,
6de97a3b
RR
59 const wxValidator& validator = wxDefaultValidator,
60 const wxString& name = wxScrollBarNameStr );
9826157f
RR
61 ~wxScrollBar();
62 int GetThumbPosition() const;
c801d85f
KB
63 int GetThumbSize() const;
64 int GetPageSize() const;
65 int GetRange() const;
4fabb575 66 virtual void SetThumbPosition( int viewStart );
debe6624
JS
67 virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
68 bool refresh = TRUE );
c801d85f 69
20e05ffb
RR
70 // Backward compatibility
71 // ----------------------
58614078 72
c801d85f 73 int GetValue(void) const;
debe6624 74 void SetValue( int viewStart );
c801d85f
KB
75 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
76 int GetViewLength() const;
77 int GetObjectLength() const;
debe6624
JS
78 void SetPageSize( int pageLength );
79 void SetObjectLength( int objectLength );
80 void SetViewLength( int viewLength );
81
20e05ffb
RR
82 // implementation
83 // --------------
b4071e91
RR
84
85 bool IsOwnGtkWindow( GdkWindow *window );
58614078 86 void ApplyWidgetStyle();
c801d85f
KB
87
88 GtkAdjustment *m_adjust;
89 float m_oldPos;
20e05ffb
RR
90
91private:
92 DECLARE_DYNAMIC_CLASS(wxScrollBar)
c801d85f
KB
93};
94
dcf924a3
RR
95#endif
96
c801d85f
KB
97#endif
98 // __GTKSCROLLBARH__