compilation fixes
[wxWidgets.git] / include / wx / gtk / slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: slider.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __GTKSLIDERH__
11 #define __GTKSLIDERH__
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "wx/defs.h"
18
19 #if wxUSE_SLIDER
20
21 #include "wx/object.h"
22 #include "wx/list.h"
23 #include "wx/control.h"
24
25 //-----------------------------------------------------------------------------
26 // classes
27 //-----------------------------------------------------------------------------
28
29 class wxSlider;
30
31 //-----------------------------------------------------------------------------
32 // global data
33 //-----------------------------------------------------------------------------
34
35 extern const char *wxSliderNameStr;
36
37 //-----------------------------------------------------------------------------
38 // wxSlider
39 //-----------------------------------------------------------------------------
40
41 class wxSlider: public wxControl
42 {
43 public:
44 wxSlider();
45 inline wxSlider( wxWindow *parent, wxWindowID id,
46 int value, int minValue, int maxValue,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 long style = wxSL_HORIZONTAL,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxSliderNameStr )
52 {
53 Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name );
54 }
55 ~wxSlider();
56 bool Create(wxWindow *parent, wxWindowID id,
57 int value, int minValue, int maxValue,
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 long style = wxSL_HORIZONTAL,
61 const wxValidator& validator = wxDefaultValidator,
62 const wxString& name = wxSliderNameStr );
63 virtual int GetValue() const;
64 virtual void SetValue( int );
65 void SetRange( int minValue, int maxValue );
66 int GetMin() const;
67 int GetMax() const;
68 void SetTickFreq( int n, int pos );
69 int GetTickFreq() const;
70 void SetPageSize( int pageSize );
71 int GetPageSize() const;
72 void ClearSel();
73 void ClearTicks();
74 void SetLineSize( int lineSize );
75 int GetLineSize() const;
76 int GetSelEnd() const;
77 int GetSelStart() const;
78 void SetSelection( int minPos, int maxPos );
79 void SetThumbLength( int len );
80 int GetThumbLength() const;
81 void SetTick( int tickPos );
82
83 // implementation
84 // --------------
85
86 bool IsOwnGtkWindow( GdkWindow *window );
87 void ApplyWidgetStyle();
88
89 GtkAdjustment *m_adjust;
90 float m_oldPos;
91
92 private:
93 DECLARE_DYNAMIC_CLASS(wxSlider)
94 };
95
96 #endif
97
98 #endif // __GTKSLIDERH__