]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/slider.cpp
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "slider.h"
16 #include "wx/msw/slider.h"
18 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
30 bool wxSlider::Create(wxWindow
*parent
, wxWindowID id
,
31 int value
, int minValue
, int maxValue
,
33 const wxSize
& size
, long style
,
34 const wxValidator
& validator
,
38 SetValidator(validator
);
40 if (parent
) parent
->AddChild(this);
43 m_windowStyle
= style
;
47 m_windowId
= (int)NewControlId();
51 m_rangeMax
= maxValue
;
52 m_rangeMin
= minValue
;
54 m_pageSize
= (int)((maxValue
-minValue
)/10);
65 int wxSlider::GetValue() const
71 void wxSlider::SetValue(int value
)
76 void wxSlider::GetSize(int *width
, int *height
) const
81 void wxSlider::GetPosition(int *x
, int *y
) const
86 void wxSlider::SetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
91 void wxSlider::SetRange(int minValue
, int maxValue
)
93 m_rangeMin
= minValue
;
94 m_rangeMax
= maxValue
;
100 void wxSlider::SetTickFreq(int n
, int pos
)
106 void wxSlider::SetPageSize(int pageSize
)
109 m_pageSize
= pageSize
;
112 int wxSlider::GetPageSize() const
117 void wxSlider::ClearSel()
122 void wxSlider::ClearTicks()
127 void wxSlider::SetLineSize(int lineSize
)
129 m_lineSize
= lineSize
;
133 int wxSlider::GetLineSize() const
139 int wxSlider::GetSelEnd() const
145 int wxSlider::GetSelStart() const
151 void wxSlider::SetSelection(int minPos
, int maxPos
)
156 void wxSlider::SetThumbLength(int len
)
161 int wxSlider::GetThumbLength() const
167 void wxSlider::SetTick(int tickPos
)
172 void wxSlider::Command (wxCommandEvent
& event
)
174 SetValue (event
.GetInt());
175 ProcessCommand (event
);
178 bool wxSlider::Show(bool show
)