1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKSCROLLBARH__
11 #define __GTKSCROLLBARH__
15 //-----------------------------------------------------------------------------
17 //-----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxScrollBar
;
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
25 class WXDLLIMPEXP_CORE wxScrollBar
: public wxScrollBarBase
29 { m_adjust
= (GtkAdjustment
*) NULL
; m_oldPos
= 0.0; }
30 inline wxScrollBar( wxWindow
*parent
, wxWindowID id
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
33 long style
= wxSB_HORIZONTAL
,
34 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxScrollBarNameStr
)
37 Create( parent
, id
, pos
, size
, style
, validator
, name
);
39 bool Create( wxWindow
*parent
, wxWindowID id
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxSB_HORIZONTAL
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxScrollBarNameStr
);
46 int GetThumbPosition() const;
47 int GetThumbSize() const;
48 int GetPageSize() const;
50 virtual void SetThumbPosition( int viewStart
);
51 virtual void SetScrollbar( int position
, int thumbSize
, int range
, int pageSize
,
52 bool refresh
= TRUE
);
54 // Backward compatibility
55 // ----------------------
57 int GetValue(void) const;
58 void SetValue( int viewStart
);
59 void GetValues( int *viewStart
, int *viewLength
, int *objectLength
, int *pageLength
) const;
60 int GetViewLength() const;
61 int GetObjectLength() const;
62 void SetPageSize( int pageLength
);
63 void SetObjectLength( int objectLength
);
64 void SetViewLength( int viewLength
);
66 static wxVisualAttributes
67 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
72 bool IsOwnGtkWindow( GdkWindow
*window
);
74 GtkAdjustment
*m_adjust
;
78 virtual wxSize
DoGetBestSize() const;
81 DECLARE_DYNAMIC_CLASS(wxScrollBar
)