X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..42e88ddb611d43fe79e1d0c17a764b0848322f1d:/docs/latex/wx/spinbutt.tex?ds=inline diff --git a/docs/latex/wx/spinbutt.tex b/docs/latex/wx/spinbutt.tex index b318cdb5cd..d10be46118 100644 --- a/docs/latex/wx/spinbutt.tex +++ b/docs/latex/wx/spinbutt.tex @@ -1,7 +1,14 @@ \section{\class{wxSpinButton}}\label{wxspinbutton} -A wxSpinButton has two small up and down (or left and right) arrow buttons. It is often -used next to a text control for increment and decrementing a value. +A wxSpinButton has two small up and down (or left and right) arrow buttons. It +is often used next to a text control for increment and decrementing a value. +Portable programs should try to use \helpref{wxSpinCtrl}{wxspinctrl} instead +as wxSpinButton is not implemented for all platforms. + +{\bf NB:} the range supported by this control (and wxSpinCtrl) depends on the +platform but is at least {\tt -0x8000} to {\tt 0x7fff}. Under GTK and +Win32 with sufficiently new version of {\tt comctrl32.dll} (at least 4.71 is +required, 5.80 is recommended) the full 32 bit range is supported. \wxheading{Derived from} @@ -10,42 +17,27 @@ used next to a text control for increment and decrementing a value. \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} +\wxheading{See also} + +\helpref{wxSpinCtrl}{wxspinctrl} + +\wxheading{Include files} + + + \wxheading{Window styles} \twocolwidtha{5cm} \begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button.} +\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button (note that this style is not supported in wxGTK).} \twocolitem{\windowstyle{wxSP\_VERTICAL}}{Specifies a vertical spin button.} -\twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys.} +\twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys to change the value.} \twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.} \end{twocollist} See also \helpref{window styles overview}{windowstyles}. -\wxheading{Remarks} - -TODO - -\wxheading{Event handling} - -To process input from a spin button, use one of these event handler macros to direct input to member -functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument: - -\twocolwidtha{7cm} -\begin{twocollist} -\twocolitem{{\bf EVT\_SPIN(id, func)}}{Catch all scroll commands.} -\twocolitem{{\bf EVT\_SPIN\_UP(id, func)}}{Catch up (or left) commands.} -\twocolitem{{\bf EVT\_SPIN\_DOWN(id, func)}}{Catch down (or right) commands.} -\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Catch all scroll commands.} -\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_BOTTOM(id, func)}}{Catch a command to put the scroll thumb at the maximum position.} -\twocolitem{{\bf EVT\_COMMAND\_LINEUP(id, func)}}{Catch a line up command.} -\twocolitem{{\bf EVT\_COMMAND\_LINEDOWN(id, func)}}{Catch a line down command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEUP(id, func)}}{Catch a page up command.} -\twocolitem{{\bf EVT\_COMMAND\_PAGEDOWN(id, func)}}{Catch a page down command.} -\twocolitem{{\bf EVT\_COMMAND\_THUMBTRACK(id, func)}}{Catch a thumbtrack command (continuous movement of the scroll thumb).} -\end{twocollist}% +\input spinevt.inc \wxheading{See also} @@ -53,15 +45,16 @@ functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument: \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonconstr} +\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonctor} \func{}{wxSpinButton}{\void} Default constructor. -\func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{const wxWindowID }{id},\rtfsp +\func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{const long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp +\param{long}{ style = wxSP\_HORIZONTAL}, +%\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp \param{const wxString\& }{name = ``spinButton"}} Constructor, creating and showing a spin button. @@ -86,27 +79,28 @@ Constructor, creating and showing a spin button. \helpref{wxSpinButton::Create}{wxspinbuttoncreate}, \helpref{wxValidator}{wxvalidator} -\membersection{wxSpinButton::\destruct{wxSpinButton}} +\membersection{wxSpinButton::\destruct{wxSpinButton}}\label{wxspinbuttondtor} \func{void}{\destruct{wxSpinButton}}{\void} -Destructor, destroying the spin button. +Destructor, destroys the spin button control. \membersection{wxSpinButton::Create}\label{wxspinbuttoncreate} -\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{const wxWindowID }{id},\rtfsp +\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{const long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp +\param{long}{ style = wxSP\_HORIZONTAL}, +%\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp \param{const wxString\& }{name = ``spinButton"}} Scrollbar creation function called by the spin button constructor. -See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonconstr} for details. +See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonctor} for details. \membersection{wxSpinButton::GetMax}\label{wxspinbuttongetmax} \constfunc{int}{GetMax}{\void} -Returns the maximum permissable value. +Returns the maximum permissible value. \wxheading{See also} @@ -116,7 +110,7 @@ Returns the maximum permissable value. \constfunc{int}{GetMin}{\void} -Returns the minimum permissable value. +Returns the minimum permissible value. \wxheading{See also} @@ -134,7 +128,7 @@ Returns the current spin button value. \membersection{wxSpinButton::SetRange}\label{wxspinbuttonsetrange} -\func{void}{SetRange}{\param{const int}{ min}, \param{const int}{ max}} +\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}} Sets the range of the spin button. @@ -150,7 +144,7 @@ Sets the range of the spin button. \membersection{wxSpinButton::SetValue}\label{wxspinbuttonsetvalue} -\func{void}{SetValue}{\param{const int}{ value}} +\func{void}{SetValue}{\param{int}{ value}} Sets the value of the spin button.