]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/scrolbar.h
Checking for wxUSE_SOCKETS and __GSOCKET_STANDALONE__ should be right, now
[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{
43 DECLARE_DYNAMIC_CLASS(wxScrollBar)
44
45 public:
46
c67daf87 47 wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; };
6de97a3b 48 inline wxScrollBar( wxWindow *parent, wxWindowID id,
c801d85f
KB
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
debe6624 51 long style = wxSB_HORIZONTAL,
6de97a3b
RR
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxScrollBarNameStr )
54 {
55 Create( parent, id, pos, size, style, validator, name );
56 }
57 bool Create( wxWindow *parent, wxWindowID id,
c801d85f
KB
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
debe6624 60 long style = wxSB_HORIZONTAL,
6de97a3b
RR
61 const wxValidator& validator = wxDefaultValidator,
62 const wxString& name = wxScrollBarNameStr );
63 ~wxScrollBar(void);
4fabb575 64 int GetThumbPosition(void) const;
c801d85f
KB
65 int GetThumbSize() const;
66 int GetPageSize() const;
67 int GetRange() const;
4fabb575 68 virtual void SetThumbPosition( int viewStart );
debe6624
JS
69 virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
70 bool refresh = TRUE );
c801d85f 71
58614078
RR
72 // Backward compatibility
73
c801d85f 74 int GetValue(void) const;
debe6624 75 void SetValue( int viewStart );
c801d85f
KB
76 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
77 int GetViewLength() const;
78 int GetObjectLength() const;
debe6624
JS
79 void SetPageSize( int pageLength );
80 void SetObjectLength( int objectLength );
81 void SetViewLength( int viewLength );
82
b4071e91
RR
83 // implementation
84
85 bool IsOwnGtkWindow( GdkWindow *window );
58614078 86 void ApplyWidgetStyle();
c801d85f
KB
87
88 GtkAdjustment *m_adjust;
89 float m_oldPos;
90};
91
dcf924a3
RR
92#endif
93
c801d85f
KB
94#endif
95 // __GTKSCROLLBARH__