40
40
+----GtkSpinButton}}
41
41
\section{Interfaces}{GtkSpinButton implements
42
AtkImplementorIface, \verb{\link{GtkBuildable}}, \verb{\link{GtkCellEditable}} and \verb{\link{GtkEditable}}.}
43
\section{Detailed Description}{A \verb{\link{GtkSpinButton}} is an ideal way to allow the user to set the value of some
44
attribute. Rather than having to directly type a number into a \verb{\link{GtkEntry}},
45
\verb{\link{GtkSpinButton}} allows the user to click on one of two arrows to increment or
46
decrement the displayed value. A value can still be typed in, with the bonus
42
AtkImplementorIface, \code{\link{GtkBuildable}}, \code{\link{GtkEditable}} and \code{\link{GtkCellEditable}}.}
43
\section{Detailed Description}{A \code{\link{GtkSpinButton}} is an ideal way to allow the user to set the value of some
44
attribute. Rather than having to directly type a number into a \code{\link{GtkEntry}},
45
\code{\link{GtkSpinButton}} allows the user to click on one of two arrows to increment or
46
decrement the displayed value. A value can still be typed in, with the bonus
47
47
that it can be checked to ensure it is in a given range.
49
The main properties of a \verb{\link{GtkSpinButton}} are through a \verb{\link{GtkAdjustment}}. See the
50
\verb{\link{GtkAdjustment}} section for more details about an adjustment's properties.
49
The main properties of a \code{\link{GtkSpinButton}} are through a \code{\link{GtkAdjustment}}. See the
50
\code{\link{GtkAdjustment}} section for more details about an adjustment's properties.
52
52
\emph{Using a \code{GtkSpinButton} to get an integer.}
98
98
\section{Structures}{\describe{\item{\verb{GtkSpinButton}}{
99
\code{entry} is the \verb{\link{GtkEntry}} part of the \verb{\link{GtkSpinButton}}
100
widget, and can be used accordingly. All other fields contain private data
99
\code{entry} is the \code{\link{GtkEntry}} part of the \code{\link{GtkSpinButton}}
100
widget, and can be used accordingly. All other fields contain private data
101
101
and should only be modified using the functions below.
105
105
\section{Enums and Flags}{\describe{
106
106
\item{\verb{GtkSpinButtonUpdatePolicy}}{
108
GTK_UPDATE_ALWAYS \tab When refreshing your \verb{\link{GtkSpinButton}} , the value is always displayed. \cr
109
GTK_UPDATE_IF_VALID \tab When refreshing your \verb{\link{GtkSpinButton}} , the value is only displayed if it is valid within the bounds of the spin button's \verb{\link{GtkAdjustment}} . \cr
108
GTK_UPDATE_ALWAYS \tab When refreshing your \code{\link{GtkSpinButton}} , the value is always displayed. \cr
109
GTK_UPDATE_IF_VALID \tab When refreshing your \code{\link{GtkSpinButton}} , the value is only displayed if it is valid within the bounds of the spin button's \code{\link{GtkAdjustment}} . \cr
113
113
\item{\verb{GtkSpinType}}{
115
GTK_SPIN_STEP_FORWARD,
116
GTK_SPIN_STEP_BACKWARD,
117
GTK_SPIN_PAGE_FORWARD,
118
GTK_SPIN_PAGE_BACKWARD \tab These values spin a \verb{\link{GtkSpinButton}} by the relevant values of the spin button's \verb{\link{GtkAdjustment}} . \cr
120
GTK_SPIN_END \tab These set the spin button's value to the minimum or maxmimum possible values, (set by its \verb{\link{GtkAdjustment}} ), respectively. \cr
121
GTK_SPIN_USER_DEFINED \tab The programmer must specify the exact amount to spin the \verb{\link{GtkSpinButton}} . \cr
115
GTK_SPIN_STEP_FORWARD,
116
GTK_SPIN_STEP_BACKWARD,
117
GTK_SPIN_PAGE_FORWARD,
118
GTK_SPIN_PAGE_BACKWARD \tab These values spin a \code{\link{GtkSpinButton}} by the relevant values of the spin button's \code{\link{GtkAdjustment}} . \cr
120
GTK_SPIN_END \tab These set the spin button's value to the minimum or maxmimum possible values, (set by its \code{\link{GtkAdjustment}} ), respectively. \cr
121
GTK_SPIN_USER_DEFINED \tab The programmer must specify the exact amount to spin the \code{\link{GtkSpinButton}} . \cr
132
\item{\code{spinbutton}}{[\verb{\link{GtkSpinButton}}] the object which received the signal.}
133
\item{\code{arg1}}{[\code{\link{GtkScrollType}}] }
134
\item{\code{user.data}}{[R object] user data set when the signal handler was connected.}
132
\item{\code{spinbutton}}{the object which received the signal.}
133
\item{\code{arg1}}{\emph{undocumented
135
\item{\code{user.data}}{user data set when the signal handler was connected.}
144
\item{\code{spinbutton}}{[\verb{\link{GtkSpinButton}}] the object which received the signal.}
145
\item{\code{arg1}}{[R object] }
146
\item{\code{user.data}}{[R object] user data set when the signal handler was connected.}
151
\item{\code{output(spinbutton, user.data)}}{
145
\item{\code{spinbutton}}{the object which received the signal.}
146
\item{\code{arg1}}{\emph{undocumented
148
\item{\code{user.data}}{user data set when the signal handler was connected.}
153
\item{\code{output(spin.button, user.data)}}{
154
The ::output signal can be used to change to formatting
155
of the value that is displayed in the spin buttons entry.
156
\preformatted{/* show leading zeros */
158
on_output (GtkSpinButton *spin,
164
adj = gtk_spin_button_get_adjustment (spin);
165
value = (int)gtk_adjustment_get_value (adj);
166
text = g_strdup_printf ("\%02d", value);
167
gtk_entry_set_text (GTK_ENTRY (spin), text);
156
\item{\code{spinbutton}}{[\verb{\link{GtkSpinButton}}] the object which received the signal.}
157
\item{\code{user.data}}{[R object] user data set when the signal handler was connected.}
175
\item{\code{spin.button}}{the object which received the signal}
176
\item{\code{user.data}}{user data set when the signal handler was connected.}
179
\emph{Returns:} [logical] \code{TRUE} if the value has been displayed.
162
182
\item{\code{value-changed(spinbutton, user.data)}}{
167
\item{\code{spinbutton}}{[\verb{\link{GtkSpinButton}}] the object which received the signal.}
168
\item{\code{user.data}}{[R object] user data set when the signal handler was connected.}
187
\item{\code{spinbutton}}{the object which received the signal.}
188
\item{\code{user.data}}{user data set when the signal handler was connected.}
173
193
\item{\code{wrapped(spinbutton, user.data)}}{
174
194
The wrapped signal is emitted right after the spinbutton wraps
175
from its maximum to minimum value or vice-versa.
195
from its maximum to minimum value or vice-versa.
180
\item{\code{spinbutton}}{[\verb{\link{GtkSpinButton}}] the object which received the signal}
181
\item{\code{user.data}}{[R object] user data set when the signal handler was connected.}
199
\item{\code{spinbutton}}{the object which received the signal}
200
\item{\code{user.data}}{user data set when the signal handler was connected.}
187
206
\section{Properties}{\describe{
188
\item{\verb{adjustment} [\verb{\link{GtkAdjustment}} : * : Read / Write]}{
207
\item{\verb{adjustment} [\code{\link{GtkAdjustment}} : * : Read / Write]}{
190
209
The adjustment that holds the value of the spinbutton.
232
251
Default value: GTK_SHADOW_IN
235
\references{\url{http://developer.gnome.org/doc/API/2.0/gtk/GtkSpinButton.html}}
254
\references{\url{http://library.gnome.org/devel//gtk/GtkSpinButton.html}}
236
255
\author{Derived by RGtkGen from GTK+ documentation}
237
256
\keyword{internal}