]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/slider.h
1. Assorted Motif 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 DECLARE_DYNAMIC_CLASS(wxSlider)
44
45 public:
46 wxSlider(void);
47 inline wxSlider( wxWindow *parent, wxWindowID id,
48 int value, int minValue, int maxValue,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxSL_HORIZONTAL,
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxSliderNameStr )
54 {
55 Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name );
56 }
57 ~wxSlider(void);
58 bool Create(wxWindow *parent, wxWindowID id,
59 int value, int minValue, int maxValue,
60 const wxPoint& pos = wxDefaultPosition,
61 const wxSize& size = wxDefaultSize,
62 long style = wxSL_HORIZONTAL,
63 const wxValidator& validator = wxDefaultValidator,
64 const wxString& name = wxSliderNameStr );
65 virtual int GetValue(void) const;
66 virtual void SetValue( int );
67 void SetRange( int minValue, int maxValue );
68 int GetMin(void) const;
69 int GetMax(void) const;
70 void SetTickFreq( int n, int pos );
71 int GetTickFreq(void) const;
72 void SetPageSize( int pageSize );
73 int GetPageSize(void) const;
74 void ClearSel(void);
75 void ClearTicks(void);
76 void SetLineSize( int lineSize );
77 int GetLineSize(void) const;
78 int GetSelEnd(void) const;
79 int GetSelStart(void) const;
80 void SetSelection( int minPos, int maxPos );
81 void SetThumbLength( int len );
82 int GetThumbLength(void) const;
83 void SetTick( int tickPos );
84
85 // implementation
86
87 bool IsOwnGtkWindow( GdkWindow *window );
88 void ApplyWidgetStyle();
89
90 GtkAdjustment *m_adjust;
91 float m_oldPos;
92
93 };
94
95 #endif
96
97 #endif // __GTKSLIDERH__