]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/slider.h
The rounded corners look really dumb at this size.
[wxWidgets.git] / include / wx / gtk / slider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/slider.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef _WX_GTK_SLIDER_H_
10 #define _WX_GTK_SLIDER_H_
11
12 // ----------------------------------------------------------------------------
13 // wxSlider
14 // ----------------------------------------------------------------------------
15
16 class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase
17 {
18 public:
19 wxSlider();
20 wxSlider(wxWindow *parent,
21 wxWindowID id,
22 int value, int minValue, int maxValue,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize,
25 long style = wxSL_HORIZONTAL,
26 const wxValidator& validator = wxDefaultValidator,
27 const wxString& name = wxSliderNameStr)
28 {
29 Create( parent, id, value, minValue, maxValue,
30 pos, size, style, validator, name );
31 }
32 ~wxSlider();
33
34 bool Create(wxWindow *parent,
35 wxWindowID id,
36 int value, int minValue, int maxValue,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = wxSL_HORIZONTAL,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxSliderNameStr);
42
43 // implement the base class pure virtuals
44 virtual int GetValue() const;
45 virtual void SetValue(int value);
46
47 virtual void SetRange(int minValue, int maxValue);
48 virtual int GetMin() const;
49 virtual int GetMax() const;
50
51 virtual void SetLineSize(int lineSize);
52 virtual void SetPageSize(int pageSize);
53 virtual int GetLineSize() const;
54 virtual int GetPageSize() const;
55
56 virtual void SetThumbLength(int lenPixels);
57 virtual int GetThumbLength() const;
58
59 static wxVisualAttributes
60 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
61
62 // implementation
63 void GTKDisableEvents();
64 void GTKEnableEvents();
65 bool GTKEventsDisabled() const;
66
67 double m_pos;
68 int m_scrollEventType;
69 bool m_needThumbRelease;
70 GtkWidget *m_scale;
71
72 protected:
73 GtkWidget *m_minLabel,*m_maxLabel;
74 bool m_blockScrollEvent;
75
76 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
77
78 // set the slider value unconditionally
79 void GTKSetValue(int value);
80
81 DECLARE_DYNAMIC_CLASS(wxSlider)
82 };
83
84 #endif // _WX_GTK_SLIDER_H_