1998-05-20 14:25:30 +00:00
|
|
|
\section{\class{wxSlider}}\label{wxslider}
|
|
|
|
|
|
|
|
A slider is a control with a handle which can be pulled
|
|
|
|
back and forth to change the value.
|
|
|
|
|
2005-02-11 20:08:51 +00:00
|
|
|
On Windows, the track bar control is used.
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Slider events are handled in the same way as a scrollbar.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxControl}{wxcontrol}\\
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/slider.h>
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\wxheading{Window styles}
|
|
|
|
|
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
2005-04-10 18:09:24 +00:00
|
|
|
\twocolitem{\windowstyle{wxSL\_HORIZONTAL}}{Displays the slider horizontally (this is the default).}
|
1998-05-20 14:25:30 +00:00
|
|
|
\twocolitem{\windowstyle{wxSL\_VERTICAL}}{Displays the slider vertically.}
|
|
|
|
\twocolitem{\windowstyle{wxSL\_AUTOTICKS}}{Displays tick marks.}
|
2005-02-15 13:17:10 +00:00
|
|
|
\twocolitem{\windowstyle{wxSL\_LABELS}}{Displays minimum, maximum and value labels.}
|
2005-04-10 18:09:24 +00:00
|
|
|
\twocolitem{\windowstyle{wxSL\_LEFT}}{Displays ticks on the left and forces the slider to be vertical.}
|
|
|
|
\twocolitem{\windowstyle{wxSL\_RIGHT}}{Displays ticks on the right and forces the slider to be vertical.}
|
|
|
|
\twocolitem{\windowstyle{wxSL\_TOP}}{Displays ticks on the top.}
|
|
|
|
\twocolitem{\windowstyle{wxSL\_BOTTOM}}{Displays ticks on the bottom (this is the default).}
|
2005-02-15 13:17:10 +00:00
|
|
|
\twocolitem{\windowstyle{wxSL\_SELRANGE}}{Allows the user to select a range on the slider. Windows only.}
|
|
|
|
\twocolitem{\windowstyle{wxSL\_INVERSE}}{Inverses the mininum and maximum endpoints on the slider. Not compatible with wxSL\_SELRANGE.}
|
|
|
|
\end{twocollist}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
|
2002-07-09 23:34:31 +00:00
|
|
|
\input scrolevt.inc
|
1998-08-06 19:42:06 +00:00
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxScrollBar}{wxscrollbar}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-09-23 15:41:43 +00:00
|
|
|
\membersection{wxSlider::wxSlider}\label{wxsliderctor}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\func{}{wxSlider}{\void}
|
|
|
|
|
|
|
|
Default slider.
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{}{wxSlider}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{int }{value },\rtfsp
|
|
|
|
\param{int}{ minValue}, \param{int}{ maxValue},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
1998-06-14 12:11:50 +00:00
|
|
|
\param{long}{ style = wxSL\_HORIZONTAL},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
|
|
|
|
\param{const wxString\& }{name = ``slider"}}
|
|
|
|
|
|
|
|
Constructor, creating and showing a slider.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{Parent window. Must not be NULL.}
|
|
|
|
|
|
|
|
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
|
|
|
|
|
|
|
|
\docparam{value}{Initial position for the slider.}
|
|
|
|
|
|
|
|
\docparam{minValue}{Minimum slider position.}
|
|
|
|
|
|
|
|
\docparam{maxValue}{Maximum slider position.}
|
|
|
|
|
|
|
|
\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
|
|
|
|
|
|
|
|
\docparam{style}{Window style. See \helpref{wxSlider}{wxslider}.}
|
|
|
|
|
|
|
|
\docparam{validator}{Window validator.}
|
|
|
|
|
|
|
|
\docparam{name}{Window name.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::Create}{wxslidercreate}, \helpref{wxValidator}{wxvalidator}
|
|
|
|
|
2004-09-23 15:41:43 +00:00
|
|
|
\membersection{wxSlider::\destruct{wxSlider}}\label{wxsliderdtor}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\func{void}{\destruct{wxSlider}}{\void}
|
|
|
|
|
|
|
|
Destructor, destroying the slider.
|
|
|
|
|
|
|
|
\membersection{wxSlider::ClearSel}\label{wxsliderclearsel}
|
|
|
|
|
|
|
|
\func{void}{ClearSel}{\void}
|
|
|
|
|
|
|
|
Clears the selection, for a slider with the {\bf wxSL\_SELRANGE} style.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\membersection{wxSlider::ClearTicks}\label{wxsliderclearticks}
|
|
|
|
|
|
|
|
\func{void}{ClearTicks}{\void}
|
|
|
|
|
|
|
|
Clears the ticks.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\membersection{wxSlider::Create}\label{wxslidercreate}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{int }{value },\rtfsp
|
|
|
|
\param{int}{ minValue}, \param{int}{ maxValue},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
1998-06-14 12:11:50 +00:00
|
|
|
\param{long}{ style = wxSL\_HORIZONTAL},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
|
|
|
|
\param{const wxString\& }{name = ``slider"}}
|
|
|
|
|
2004-09-23 15:41:43 +00:00
|
|
|
Used for two-step slider construction. See \helpref{wxSlider::wxSlider}{wxsliderctor}\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
for further details.
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetLineSize}\label{wxslidergetlinesize}
|
|
|
|
|
|
|
|
\constfunc{int}{GetLineSize}{\void}
|
|
|
|
|
|
|
|
Returns the line size.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::SetLineSize}{wxslidersetlinesize}
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetMax}\label{wxslidergetmax}
|
|
|
|
|
|
|
|
\constfunc{int}{GetMax}{\void}
|
|
|
|
|
|
|
|
Gets the maximum slider value.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::SetRange}{wxslidersetrange}
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetMin}\label{wxslidergetmin}
|
|
|
|
|
|
|
|
\constfunc{int}{GetMin}{\void}
|
|
|
|
|
|
|
|
Gets the minimum slider value.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::SetRange}{wxslidersetrange}
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetPageSize}\label{wxslidergetpagesize}
|
|
|
|
|
|
|
|
\constfunc{int}{GetPageSize}{\void}
|
|
|
|
|
|
|
|
Returns the page size.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::SetPageSize}{wxslidersetpagesize}
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetSelEnd}\label{wxslidergetselend}
|
|
|
|
|
|
|
|
\constfunc{int}{GetSelEnd}{\void}
|
|
|
|
|
|
|
|
Returns the selection end point.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetSelStart}{wxslidergetselstart}, \helpref{wxSlider::SetSelection}{wxslidersetselection}
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetSelStart}\label{wxslidergetselstart}
|
|
|
|
|
|
|
|
\constfunc{int}{GetSelStart}{\void}
|
|
|
|
|
|
|
|
Returns the selection start point.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetSelEnd}{wxslidergetselend}, \helpref{wxSlider::SetSelection}{wxslidersetselection}
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetThumbLength}\label{wxslidergetthumblength}
|
|
|
|
|
|
|
|
\constfunc{int}{GetThumbLength}{\void}
|
|
|
|
|
|
|
|
Returns the thumb length.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::SetThumbLength}{wxslidersetthumblength}
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetTickFreq}\label{wxslidergettickfreq}
|
|
|
|
|
|
|
|
\constfunc{int}{GetTickFreq}{\void}
|
|
|
|
|
|
|
|
Returns the tick frequency.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::SetTickFreq}{wxslidersettickfreq}
|
|
|
|
|
|
|
|
\membersection{wxSlider::GetValue}\label{wxslidergetvalue}
|
|
|
|
|
|
|
|
\constfunc{int}{GetValue}{\void}
|
|
|
|
|
|
|
|
Gets the current slider value.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::GetMax}{wxslidergetmax},\rtfsp
|
|
|
|
\helpref{wxSlider::SetValue}{wxslidersetvalue}
|
|
|
|
|
|
|
|
\membersection{wxSlider::SetLineSize}\label{wxslidersetlinesize}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{void}{SetLineSize}{\param{int }{lineSize}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the line size for the slider.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{lineSize}{The number of steps the slider moves when the user moves it up or down a line.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetLineSize}{wxslidergetlinesize}
|
|
|
|
|
|
|
|
\membersection{wxSlider::SetPageSize}\label{wxslidersetpagesize}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{void}{SetPageSize}{\param{int }{pageSize}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the page size for the slider.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{pageSize}{The number of steps the slider moves when the user pages up or down.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetPageSize}{wxslidergetpagesize}
|
|
|
|
|
2005-04-08 14:34:30 +00:00
|
|
|
\membersection{wxSlider::SetRange}\label{wxslidersetrange}
|
|
|
|
|
|
|
|
\func{void}{SetRange}{\param{int}{ minValue}, \param{int}{ maxValue}}
|
|
|
|
|
|
|
|
Sets the minimum and maximum slider values.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::GetMax}{wxslidergetmax}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxSlider::SetSelection}\label{wxslidersetselection}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{void}{SetSelection}{\param{int }{startPos}, \param{int }{endPos}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the selection.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{startPos}{The selection start position.}
|
|
|
|
|
|
|
|
\docparam{endPos}{The selection end position.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetSelStart}{wxslidergetselstart}, \helpref{wxSlider::GetSelEnd}{wxslidergetselend}
|
|
|
|
|
|
|
|
\membersection{wxSlider::SetThumbLength}\label{wxslidersetthumblength}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{void}{SetThumbLength}{\param{int }{len}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the slider thumb length.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{len}{The thumb length.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetThumbLength}{wxslidergetthumblength}
|
|
|
|
|
|
|
|
\membersection{wxSlider::SetTick}\label{wxslidersettick}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{void}{SetTick}{\param{int}{ tickPos}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets a tick position.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{tickPos}{The tick position.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::SetTickFreq}{wxslidersettickfreq}
|
|
|
|
|
2005-04-08 14:34:30 +00:00
|
|
|
\membersection{wxSlider::SetTickFreq}\label{wxslidersettickfreq}
|
|
|
|
|
|
|
|
\func{void}{SetTickFreq}{\param{int }{n}, \param{int }{pos}}
|
|
|
|
|
|
|
|
Sets the tick mark frequency and position.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{n}{Frequency. For example, if the frequency is set to two, a tick mark is displayed for
|
|
|
|
every other increment in the slider's range.}
|
|
|
|
|
|
|
|
\docparam{pos}{Position. Must be greater than zero. TODO: what is this for?}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
Windows 95 only.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetTickFreq}{wxslidergettickfreq}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxSlider::SetValue}\label{wxslidersetvalue}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{void}{SetValue}{\param{int}{ value}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the slider position.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{value}{The slider position.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxSlider::GetValue}{wxslidergetvalue}
|
|
|
|
|