]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/scrolbar.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKSCROLLBARH__
13 #define __GTKSCROLLBARH__
20 #include "wx/object.h"
21 #include "wx/control.h"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 extern const char *wxScrollBarNameStr
;
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 class wxScrollBar
: public wxControl
41 DECLARE_DYNAMIC_CLASS(wxScrollBar
)
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
)
53 Create( parent
, id
, pos
, size
, style
, validator
, name
);
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
);
62 int GetPosition(void) const;
63 int GetThumbSize() const;
64 int GetPageSize() const;
66 virtual void SetPosition( int viewStart
);
67 virtual void SetScrollbar( int position
, int thumbSize
, int range
, int pageSize
,
68 bool refresh
= TRUE
);
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
);
82 bool IsOwnGtkWindow( GdkWindow
*window
);
84 GtkAdjustment
*m_adjust
;