]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/scrolbar.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKSCROLLBARH__
12 #define __GTKSCROLLBARH__
14 #if defined(__GNUG__) && !defined(__APPLE__)
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 class wxScrollBar
: public wxScrollBarBase
34 { m_adjust
= (GtkAdjustment
*) NULL
; m_oldPos
= 0.0; }
35 inline wxScrollBar( wxWindow
*parent
, wxWindowID id
,
36 const wxPoint
& pos
= wxDefaultPosition
,
37 const wxSize
& size
= wxDefaultSize
,
38 long style
= wxSB_HORIZONTAL
,
39 const wxValidator
& validator
= wxDefaultValidator
,
40 const wxString
& name
= wxScrollBarNameStr
)
42 Create( parent
, id
, pos
, size
, style
, validator
, name
);
44 bool Create( wxWindow
*parent
, wxWindowID id
,
45 const wxPoint
& pos
= wxDefaultPosition
,
46 const wxSize
& size
= wxDefaultSize
,
47 long style
= wxSB_HORIZONTAL
,
48 const wxValidator
& validator
= wxDefaultValidator
,
49 const wxString
& name
= wxScrollBarNameStr
);
51 int GetThumbPosition() const;
52 int GetThumbSize() const;
53 int GetPageSize() const;
55 virtual void SetThumbPosition( int viewStart
);
56 virtual void SetScrollbar( int position
, int thumbSize
, int range
, int pageSize
,
57 bool refresh
= TRUE
);
59 // Backward compatibility
60 // ----------------------
62 int GetValue(void) const;
63 void SetValue( int viewStart
);
64 void GetValues( int *viewStart
, int *viewLength
, int *objectLength
, int *pageLength
) const;
65 int GetViewLength() const;
66 int GetObjectLength() const;
67 void SetPageSize( int pageLength
);
68 void SetObjectLength( int objectLength
);
69 void SetViewLength( int viewLength
);
74 bool IsOwnGtkWindow( GdkWindow
*window
);
75 void ApplyWidgetStyle();
77 GtkAdjustment
*m_adjust
;
81 DECLARE_DYNAMIC_CLASS(wxScrollBar
)