]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/scrolbar.h
Initial version
[wxWidgets.git] / include / wx / gtk1 / scrolbar.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: scrolbar.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifndef __GTKSCROLLBARH__
13#define __GTKSCROLLBARH__
14
15#ifdef __GNUG__
16#pragma interface
17#endif
18
19#include "wx/defs.h"
20#include "wx/object.h"
21#include "wx/control.h"
22
23//-----------------------------------------------------------------------------
24// classes
25//-----------------------------------------------------------------------------
26
27class wxScrollBar;
28
29//-----------------------------------------------------------------------------
30// global data
31//-----------------------------------------------------------------------------
32
33extern const char *wxScrollBarNameStr;
34
35//-----------------------------------------------------------------------------
36// wxScrollBar
37//-----------------------------------------------------------------------------
38
39class wxScrollBar: public wxControl
40{
41 DECLARE_DYNAMIC_CLASS(wxScrollBar)
42
43 public:
44
45 wxScrollBar(void) { m_adjust = NULL; m_oldPos = 0.0; };
debe6624 46 wxScrollBar(wxWindow *parent, wxWindowID id,
c801d85f
KB
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
debe6624 49 long style = wxSB_HORIZONTAL,
c801d85f
KB
50 const wxString& name = wxScrollBarNameStr );
51 ~wxScrollBar(void);
debe6624 52 bool Create(wxWindow *parent, wxWindowID id,
c801d85f
KB
53 const wxPoint& pos = wxDefaultPosition,
54 const wxSize& size = wxDefaultSize,
debe6624 55 long style = wxSB_HORIZONTAL,
c801d85f
KB
56 const wxString& name = wxScrollBarNameStr);
57 int GetPosition(void) const;
58 int GetThumbSize() const;
59 int GetPageSize() const;
60 int GetRange() const;
debe6624
JS
61 virtual void SetPosition( int viewStart );
62 virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
63 bool refresh = TRUE );
c801d85f
KB
64
65 // Backward compatibility
66 int GetValue(void) const;
debe6624 67 void SetValue( int viewStart );
c801d85f
KB
68 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
69 int GetViewLength() const;
70 int GetObjectLength() const;
debe6624
JS
71 void SetPageSize( int pageLength );
72 void SetObjectLength( int objectLength );
73 void SetViewLength( int viewLength );
74
c801d85f
KB
75 public:
76
77 GtkAdjustment *m_adjust;
78 float m_oldPos;
79};
80
81#endif
82 // __GTKSCROLLBARH__