]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/scrolbar.h
75344cb221490c347d656577cb62c44b9b47bdf1
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
43 DECLARE_DYNAMIC_CLASS(wxScrollBar
)
47 wxScrollBar(void) { m_adjust
= (GtkAdjustment
*) NULL
; m_oldPos
= 0.0; };
48 inline wxScrollBar( wxWindow
*parent
, wxWindowID id
,
49 const wxPoint
& pos
= wxDefaultPosition
,
50 const wxSize
& size
= wxDefaultSize
,
51 long style
= wxSB_HORIZONTAL
,
52 const wxValidator
& validator
= wxDefaultValidator
,
53 const wxString
& name
= wxScrollBarNameStr
)
55 Create( parent
, id
, pos
, size
, style
, validator
, name
);
57 bool Create( wxWindow
*parent
, wxWindowID id
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
60 long style
= wxSB_HORIZONTAL
,
61 const wxValidator
& validator
= wxDefaultValidator
,
62 const wxString
& name
= wxScrollBarNameStr
);
64 int GetThumbPosition(void) const;
65 int GetThumbSize() const;
66 int GetPageSize() const;
68 virtual void SetThumbPosition( int viewStart
);
69 virtual void SetScrollbar( int position
, int thumbSize
, int range
, int pageSize
,
70 bool refresh
= TRUE
);
72 // Backward compatibility
74 int GetValue(void) const;
75 void SetValue( int viewStart
);
76 void GetValues( int *viewStart
, int *viewLength
, int *objectLength
, int *pageLength
) const;
77 int GetViewLength() const;
78 int GetObjectLength() const;
79 void SetPageSize( int pageLength
);
80 void SetObjectLength( int objectLength
);
81 void SetViewLength( int viewLength
);
85 bool IsOwnGtkWindow( GdkWindow
*window
);
86 void ApplyWidgetStyle();
88 GtkAdjustment
*m_adjust
;