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