]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/scrolbar.h
Removed unnecessary code from utilsunx.cpp
[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()
45 { 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();
62 int GetThumbPosition() const;
63 int GetThumbSize() const;
64 int GetPageSize() const;
65 int GetRange() const;
66 virtual void SetThumbPosition( int viewStart );
67 virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
68 bool refresh = TRUE );
69
70 // Backward compatibility
71 // ----------------------
72
73 int GetValue(void) const;
74 void SetValue( int viewStart );
75 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
76 int GetViewLength() const;
77 int GetObjectLength() const;
78 void SetPageSize( int pageLength );
79 void SetObjectLength( int objectLength );
80 void SetViewLength( int viewLength );
81
82 // implementation
83 // --------------
84
85 bool IsOwnGtkWindow( GdkWindow *window );
86 void ApplyWidgetStyle();
87
88 GtkAdjustment *m_adjust;
89 float m_oldPos;
90
91private:
92 DECLARE_DYNAMIC_CLASS(wxScrollBar)
93};
94
95#endif
96
97#endif
98 // __GTKSCROLLBARH__