]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/scrolbar.h
Fixed event handling for DialogEd
[wxWidgets.git] / include / wx / gtk1 / 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 = (GtkAdjustment *) NULL; m_oldPos = 0.0; };
46 inline wxScrollBar( wxWindow *parent, wxWindowID id,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 long style = wxSB_HORIZONTAL,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxScrollBarNameStr )
52 {
53 Create( parent, id, pos, size, style, validator, name );
54 }
55 bool Create( wxWindow *parent, wxWindowID id,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
58 long style = wxSB_HORIZONTAL,
59 const wxValidator& validator = wxDefaultValidator,
60 const wxString& name = wxScrollBarNameStr );
61 ~wxScrollBar(void);
62 int GetPosition(void) const;
63 int GetThumbSize() const;
64 int GetPageSize() const;
65 int GetRange() const;
66 virtual void SetPosition( int viewStart );
67 virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
68 bool refresh = TRUE );
69
70 // Backward compatibility
71 int GetValue(void) const;
72 void SetValue( int viewStart );
73 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
74 int GetViewLength() const;
75 int GetObjectLength() const;
76 void SetPageSize( int pageLength );
77 void SetObjectLength( int objectLength );
78 void SetViewLength( int viewLength );
79
80 public:
81
82 GtkAdjustment *m_adjust;
83 float m_oldPos;
84 };
85
86 #endif
87 // __GTKSCROLLBARH__