]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/scrolbar.h
#ifdefed out a typedef not appropriate to MSW; added SetSelection to choice dialog
[wxWidgets.git] / include / wx / gtk / scrolbar.h
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
27 class wxScrollBar;
28
29 //-----------------------------------------------------------------------------
30 // global data
31 //-----------------------------------------------------------------------------
32
33 extern const char *wxScrollBarNameStr;
34
35 //-----------------------------------------------------------------------------
36 // wxScrollBar
37 //-----------------------------------------------------------------------------
38
39 class wxScrollBar: public wxControl
40 {
41 DECLARE_DYNAMIC_CLASS(wxScrollBar)
42
43 public:
44
45 wxScrollBar(void) { m_adjust = NULL; m_oldPos = 0.0; };
46 wxScrollBar(wxWindow *parent, const wxWindowID id,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 const long style = wxSB_HORIZONTAL,
50 const wxString& name = wxScrollBarNameStr );
51 ~wxScrollBar(void);
52 bool Create(wxWindow *parent, const wxWindowID id,
53 const wxPoint& pos = wxDefaultPosition,
54 const wxSize& size = wxDefaultSize,
55 const long style = wxSB_HORIZONTAL,
56 const wxString& name = wxScrollBarNameStr);
57 int GetPosition(void) const;
58 int GetThumbSize() const;
59 int GetPageSize() const;
60 int GetRange() const;
61 virtual void SetPosition( const int viewStart );
62 virtual void SetScrollbar( const int position, const int thumbSize, const int range, const int pageSize,
63 const bool refresh = TRUE );
64
65 // Backward compatibility
66 int GetValue(void) const;
67 void SetValue( const int viewStart );
68 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
69 int GetViewLength() const;
70 int GetObjectLength() const;
71 void SetPageSize( const int pageLength );
72 void SetObjectLength( const int objectLength );
73 void SetViewLength( const int viewLength );
74
75 public:
76
77 GtkAdjustment *m_adjust;
78 float m_oldPos;
79 };
80
81 #endif
82 // __GTKSCROLLBARH__