]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/scrolbar.h
Added "const" to the (char *) type params that should have been const params
[wxWidgets.git] / include / wx / gtk / scrolbar.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: scrolbar.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
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"
19
20#if wxUSE_SCROLLBAR
21
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{
43public:
44 wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; };
45 inline wxScrollBar( wxWindow *parent, wxWindowID id,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
48 long style = wxSB_HORIZONTAL,
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxScrollBarNameStr )
51 {
52 Create( parent, id, pos, size, style, validator, name );
53 }
54 bool Create( wxWindow *parent, wxWindowID id,
55 const wxPoint& pos = wxDefaultPosition,
56 const wxSize& size = wxDefaultSize,
57 long style = wxSB_HORIZONTAL,
58 const wxValidator& validator = wxDefaultValidator,
59 const wxString& name = wxScrollBarNameStr );
60 ~wxScrollBar(void);
61 int GetThumbPosition(void) const;
62 int GetThumbSize() const;
63 int GetPageSize() const;
64 int GetRange() const;
65 virtual void SetThumbPosition( int viewStart );
66 virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
67 bool refresh = TRUE );
68
69 // Backward compatibility
70 // ----------------------
71
72 int GetValue(void) const;
73 void SetValue( int viewStart );
74 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
75 int GetViewLength() const;
76 int GetObjectLength() const;
77 void SetPageSize( int pageLength );
78 void SetObjectLength( int objectLength );
79 void SetViewLength( int viewLength );
80
81 // implementation
82 // --------------
83
84 bool IsOwnGtkWindow( GdkWindow *window );
85 void ApplyWidgetStyle();
86
87 GtkAdjustment *m_adjust;
88 float m_oldPos;
89
90private:
91 DECLARE_DYNAMIC_CLASS(wxScrollBar)
92};
93
94#endif
95
96#endif
97 // __GTKSCROLLBARH__