X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ca6a5f04692678cd2d9f3ea0843fc3f5a0b254f..4fcbc84d657413b157ac3ef89bf8fbccbcf899ba:/docs/latex/wx/spinbutt.tex diff --git a/docs/latex/wx/spinbutt.tex b/docs/latex/wx/spinbutt.tex index 623d20c8d2..046b7f3ca0 100644 --- a/docs/latex/wx/spinbutt.tex +++ b/docs/latex/wx/spinbutt.tex @@ -3,11 +3,13 @@ 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 (Win32 and GTK only -currently). +as wxSpinButton is not implemented for all platforms but wxSpinCtrl is as it +degenerates to a simple \helpref{wxTextCtrl}{wxtextctrl} on such platforms. {\bf NB:} the range supported by this control (and wxSpinCtrl) depends on the -platform but is at least {\tt SHRT\_MIN} to {\tt SHRT\_MAX}. +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} @@ -24,30 +26,23 @@ platform but is at least {\tt SHRT\_MIN} to {\tt SHRT\_MAX}. +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{Window styles} \twocolwidtha{5cm} \begin{twocollist}\itemsep=0pt \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{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{wxSpinEvent}{wxspinevent} argument: - -\twocolwidtha{7cm} -\begin{twocollist} -\twocolitem{{\bf EVT\_SPIN(id, func)}}{Generated whenever an arros is pressed.} -\twocolitem{{\bf EVT\_SPIN\_UP(id, func)}}{Generated when left/up arrow is pressed.} -\twocolitem{{\bf EVT\_SPIN\_DOWN(id, func)}}{Generated when right/down arrow is pressed.} -\end{twocollist}% +\input spinevt.inc \wxheading{See also} @@ -55,7 +50,7 @@ direct input to member functions that take a \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonconstr} +\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonctor} \func{}{wxSpinButton}{\void} @@ -63,7 +58,7 @@ Default constructor. \func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp +\param{long}{ style = wxSP\_HORIZONTAL},\rtfsp \param{const wxString\& }{name = ``spinButton"}} Constructor, creating and showing a spin button. @@ -80,29 +75,27 @@ Constructor, creating and showing a spin button. \docparam{style}{Window style. See \helpref{wxSpinButton}{wxspinbutton}.} -\docparam{validator}{Window validator.} - \docparam{name}{Window name.} \wxheading{See also} -\helpref{wxSpinButton::Create}{wxspinbuttoncreate}, \helpref{wxValidator}{wxvalidator} +\helpref{wxSpinButton::Create}{wxspinbuttoncreate} -\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{wxWindowID }{id},\rtfsp \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp +\param{long}{ style = wxSP\_HORIZONTAL},\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}