]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/slider.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / gtk / slider.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
1e6feb95 2// Name: wx/gtk/slider.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
371a5b4e 5// Copyright: (c) 1998 Robert Roebling
65571936 6// Licence: wxWindows licence
c801d85f
KB
7/////////////////////////////////////////////////////////////////////////////
8
1d591651
PC
9#ifndef _WX_GTK_SLIDER_H_
10#define _WX_GTK_SLIDER_H_
c801d85f 11
1e6feb95 12// ----------------------------------------------------------------------------
c801d85f 13// wxSlider
1e6feb95 14// ----------------------------------------------------------------------------
c801d85f 15
20123d49 16class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase
c801d85f 17{
a075e27b 18public:
12a480c1 19 wxSlider();
1e6feb95
VZ
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)
6de97a3b 28 {
1e6feb95
VZ
29 Create( parent, id, value, minValue, maxValue,
30 pos, size, style, validator, name );
6de97a3b 31 }
8ab75332 32 ~wxSlider();
1e6feb95
VZ
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
a075e27b 44 virtual int GetValue() const;
1e6feb95
VZ
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;
c801d85f 58
9d522606
RD
59 static wxVisualAttributes
60 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
3824e0db 61
aa9a4ae1 62 // implementation
c092ed38
RR
63 void GTKDisableEvents();
64 void GTKEnableEvents();
65 bool GTKEventsDisabled() const;
ce00f59b 66
12a480c1
PC
67 double m_pos;
68 int m_scrollEventType;
69 bool m_needThumbRelease;
c092ed38 70 GtkWidget *m_scale;
aa9a4ae1 71
ef5c70f9 72protected:
c092ed38
RR
73 GtkWidget *m_minLabel,*m_maxLabel;
74 bool m_blockScrollEvent;
75
ef5c70f9
VZ
76 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
77
3824e0db
VZ
78 // set the slider value unconditionally
79 void GTKSetValue(int value);
80
a075e27b 81 DECLARE_DYNAMIC_CLASS(wxSlider)
c801d85f
KB
82};
83
1d591651 84#endif // _WX_GTK_SLIDER_H_