]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/scrolbar.h
added and documented wxApp::OnExceptionInMainLoop()
[wxWidgets.git] / include / wx / gtk / scrolbar.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: scrolbar.h
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
1e6feb95 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKSCROLLBARH__
12#define __GTKSCROLLBARH__
13
12028905 14#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
2b5f62a0 15#pragma interface "scrolbar.h"
c801d85f
KB
16#endif
17
18#include "wx/defs.h"
dcf924a3 19
c801d85f
KB
20//-----------------------------------------------------------------------------
21// classes
22//-----------------------------------------------------------------------------
23
24class wxScrollBar;
25
c801d85f
KB
26//-----------------------------------------------------------------------------
27// wxScrollBar
28//-----------------------------------------------------------------------------
29
1e6feb95 30class wxScrollBar: public wxScrollBarBase
c801d85f 31{
20e05ffb 32public:
1e6feb95 33 wxScrollBar()
9826157f 34 { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }
6de97a3b 35 inline wxScrollBar( wxWindow *parent, wxWindowID id,
c801d85f
KB
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
debe6624 38 long style = wxSB_HORIZONTAL,
6de97a3b
RR
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxScrollBarNameStr )
41 {
9826157f 42 Create( parent, id, pos, size, style, validator, name );
6de97a3b
RR
43 }
44 bool Create( wxWindow *parent, wxWindowID id,
c801d85f
KB
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
debe6624 47 long style = wxSB_HORIZONTAL,
6de97a3b
RR
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxScrollBarNameStr );
9826157f
RR
50 ~wxScrollBar();
51 int GetThumbPosition() const;
c801d85f
KB
52 int GetThumbSize() const;
53 int GetPageSize() const;
54 int GetRange() const;
4fabb575 55 virtual void SetThumbPosition( int viewStart );
debe6624
JS
56 virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
57 bool refresh = TRUE );
c801d85f 58
20e05ffb
RR
59 // Backward compatibility
60 // ----------------------
1e6feb95 61
c801d85f 62 int GetValue(void) const;
debe6624 63 void SetValue( int viewStart );
c801d85f
KB
64 void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const;
65 int GetViewLength() const;
66 int GetObjectLength() const;
debe6624
JS
67 void SetPageSize( int pageLength );
68 void SetObjectLength( int objectLength );
69 void SetViewLength( int viewLength );
70
20e05ffb
RR
71 // implementation
72 // --------------
1e6feb95 73
b4071e91 74 bool IsOwnGtkWindow( GdkWindow *window );
58614078 75 void ApplyWidgetStyle();
1e6feb95 76
c801d85f
KB
77 GtkAdjustment *m_adjust;
78 float m_oldPos;
1e6feb95 79
7f980cff
VS
80protected:
81 virtual wxSize DoGetBestSize() const;
82
20e05ffb
RR
83private:
84 DECLARE_DYNAMIC_CLASS(wxScrollBar)
c801d85f
KB
85};
86
87#endif
88 // __GTKSCROLLBARH__