]>
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__
22 #include "wx/object.h"
23 #include "wx/control.h"
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 extern const char *wxScrollBarNameStr
;
37 //-----------------------------------------------------------------------------
39 //-----------------------------------------------------------------------------
41 class wxScrollBar
: public wxControl
45 { 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 GetThumbPosition() const;
63 int GetThumbSize() const;
64 int GetPageSize() const;
66 virtual void SetThumbPosition( int viewStart
);
67 virtual void SetScrollbar( int position
, int thumbSize
, int range
, int pageSize
,
68 bool refresh
= TRUE
);
70 // Backward compatibility
71 // ----------------------
73 int GetValue(void) const;
74 void SetValue( int viewStart
);
75 void GetValues( int *viewStart
, int *viewLength
, int *objectLength
, int *pageLength
) const;
76 int GetViewLength() const;
77 int GetObjectLength() const;
78 void SetPageSize( int pageLength
);
79 void SetObjectLength( int objectLength
);
80 void SetViewLength( int viewLength
);
85 bool IsOwnGtkWindow( GdkWindow
*window
);
86 void ApplyWidgetStyle();
88 GtkAdjustment
*m_adjust
;
93 DECLARE_DYNAMIC_CLASS(wxScrollBar
)