]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: scrolbar.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_GTK_SCROLLBAR_H_ | |
11 | #define _WX_GTK_SCROLLBAR_H_ | |
12 | ||
13 | #include "wx/defs.h" | |
14 | ||
15 | //----------------------------------------------------------------------------- | |
16 | // classes | |
17 | //----------------------------------------------------------------------------- | |
18 | ||
19 | class WXDLLIMPEXP_CORE wxScrollBar; | |
20 | ||
21 | //----------------------------------------------------------------------------- | |
22 | // wxScrollBar | |
23 | //----------------------------------------------------------------------------- | |
24 | ||
25 | class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase | |
26 | { | |
27 | public: | |
28 | wxScrollBar(); | |
29 | inline wxScrollBar( wxWindow *parent, wxWindowID id, | |
30 | const wxPoint& pos = wxDefaultPosition, | |
31 | const wxSize& size = wxDefaultSize, | |
32 | long style = wxSB_HORIZONTAL, | |
33 | const wxValidator& validator = wxDefaultValidator, | |
34 | const wxString& name = wxScrollBarNameStr ) | |
35 | { | |
36 | Create( parent, id, pos, size, style, validator, name ); | |
37 | } | |
38 | bool Create( wxWindow *parent, wxWindowID id, | |
39 | const wxPoint& pos = wxDefaultPosition, | |
40 | const wxSize& size = wxDefaultSize, | |
41 | long style = wxSB_HORIZONTAL, | |
42 | const wxValidator& validator = wxDefaultValidator, | |
43 | const wxString& name = wxScrollBarNameStr ); | |
44 | virtual ~wxScrollBar(); | |
45 | int GetThumbPosition() const; | |
46 | int GetThumbSize() const; | |
47 | int GetPageSize() const; | |
48 | int GetRange() const; | |
49 | virtual void SetThumbPosition( int viewStart ); | |
50 | virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, | |
51 | bool refresh = true ); | |
52 | ||
53 | void SetThumbSize(int thumbSize); | |
54 | void SetPageSize( int pageLength ); | |
55 | void SetRange(int range); | |
56 | ||
57 | static wxVisualAttributes | |
58 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
59 | ||
60 | protected: | |
61 | virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; | |
62 | ||
63 | private: | |
64 | DECLARE_DYNAMIC_CLASS(wxScrollBar) | |
65 | }; | |
66 | ||
67 | #endif // _WX_GTK_SCROLLBAR_H_ |