]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/slider.h
Second try at doing Set/GetClient right
[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
11 #ifndef __GTKSLIDERH__
12 #define __GTKSLIDERH__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19 #include "wx/object.h"
20 #include "wx/list.h"
21 #include "wx/control.h"
22
23 //-----------------------------------------------------------------------------
24 // classes
25 //-----------------------------------------------------------------------------
26
27 class wxSlider;
28
29 //-----------------------------------------------------------------------------
30 // global data
31 //-----------------------------------------------------------------------------
32
33 extern const char *wxSliderNameStr;
34
35 //-----------------------------------------------------------------------------
36 // wxSlider
37 //-----------------------------------------------------------------------------
38
39 class wxSlider: public wxControl
40 {
41 DECLARE_DYNAMIC_CLASS(wxSlider)
42
43 public:
44 wxSlider(void);
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(void);
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(void) const;
64 virtual void SetValue( int );
65 void SetRange( int minValue, int maxValue );
66 int GetMin(void) const;
67 int GetMax(void) const;
68 void SetTickFreq( int n, int pos );
69 int GetTickFreq(void) const;
70 void SetPageSize( int pageSize );
71 int GetPageSize(void) const;
72 void ClearSel(void);
73 void ClearTicks(void);
74 void SetLineSize( int lineSize );
75 int GetLineSize(void) const;
76 int GetSelEnd(void) const;
77 int GetSelStart(void) const;
78 void SetSelection( int minPos, int maxPos );
79 void SetThumbLength( int len );
80 int GetThumbLength(void) const;
81 void SetTick( int tickPos );
82
83 // implementation
84
85 bool IsOwnGtkWindow( GdkWindow *window );
86 void ApplyWidgetStyle();
87
88 GtkAdjustment *m_adjust;
89 float m_oldPos;
90
91 };
92
93 #endif // __GTKSLIDERH__