]>
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__
19 #include "wx/object.h"
20 #include "wx/control.h"
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 extern const char *wxScrollBarNameStr
;
34 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 class wxScrollBar
: public wxControl
40 DECLARE_DYNAMIC_CLASS(wxScrollBar
)
44 wxScrollBar(void) { m_adjust
= (GtkAdjustment
*) NULL
; m_oldPos
= 0.0; };
45 inline wxScrollBar( wxWindow
*parent
, wxWindowID id
,
46 const wxPoint
& pos
= wxDefaultPosition
,
47 const wxSize
& size
= wxDefaultSize
,
48 long style
= wxSB_HORIZONTAL
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxScrollBarNameStr
)
52 Create( parent
, id
, pos
, size
, style
, validator
, name
);
54 bool Create( wxWindow
*parent
, wxWindowID id
,
55 const wxPoint
& pos
= wxDefaultPosition
,
56 const wxSize
& size
= wxDefaultSize
,
57 long style
= wxSB_HORIZONTAL
,
58 const wxValidator
& validator
= wxDefaultValidator
,
59 const wxString
& name
= wxScrollBarNameStr
);
61 int GetPosition(void) const;
62 int GetThumbSize() const;
63 int GetPageSize() const;
65 virtual void SetPosition( int viewStart
);
66 virtual void SetScrollbar( int position
, int thumbSize
, int range
, int pageSize
,
67 bool refresh
= TRUE
);
69 // 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
);
83 void ApplyWidgetStyle();
85 GtkAdjustment
*m_adjust
;