]>
git.saurik.com Git - wxWidgets.git/blob - src/stubs/slider.cpp
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "slider.h"
16 #include "wx/slider.h"
18 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
20 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
35 bool wxSlider::Create(wxWindow
*parent
, wxWindowID id
,
36 int value
, int minValue
, int maxValue
,
38 const wxSize
& size
, long style
,
39 const wxValidator
& validator
,
43 SetValidator(validator
);
45 if (parent
) parent
->AddChild(this);
48 m_windowStyle
= style
;
52 m_windowId
= (int)NewControlId();
56 m_rangeMax
= maxValue
;
57 m_rangeMin
= minValue
;
59 m_pageSize
= (int)((maxValue
-minValue
)/10);
70 int wxSlider::GetValue() const
76 void wxSlider::SetValue(int value
)
81 void wxSlider::GetSize(int *width
, int *height
) const
86 void wxSlider::GetPosition(int *x
, int *y
) const
91 void wxSlider::SetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
96 void wxSlider::SetRange(int minValue
, int maxValue
)
98 m_rangeMin
= minValue
;
99 m_rangeMax
= maxValue
;
104 // For trackbars only
105 void wxSlider::SetTickFreq(int n
, int pos
)
111 void wxSlider::SetPageSize(int pageSize
)
114 m_pageSize
= pageSize
;
117 int wxSlider::GetPageSize() const
122 void wxSlider::ClearSel()
127 void wxSlider::ClearTicks()
132 void wxSlider::SetLineSize(int lineSize
)
134 m_lineSize
= lineSize
;
138 int wxSlider::GetLineSize() const
144 int wxSlider::GetSelEnd() const
150 int wxSlider::GetSelStart() const
156 void wxSlider::SetSelection(int minPos
, int maxPos
)
161 void wxSlider::SetThumbLength(int len
)
166 int wxSlider::GetThumbLength() const
172 void wxSlider::SetTick(int tickPos
)
177 void wxSlider::Command (wxCommandEvent
& event
)
179 SetValue (event
.GetInt());
180 ProcessCommand (event
);
183 bool wxSlider::Show(bool show
)