~ubuntu-branches/ubuntu/trusty/rgtk2/trusty

« back to all changes in this revision

Viewing changes to man/GtkSpinButton.Rd

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2010-11-03 11:35:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20101103113546-a7fi7jdxdebp0tw1
Tags: 2.20.1-1
* New upstream release

* debian/control: Set (Build-)Depends: to current R version
* debian/control: Set Standards-Version: to current version 

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
                     +----GtkEntry
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.
48
48
  
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.
51
51
  
52
52
 \emph{Using a   \code{GtkSpinButton}   to get an integer.}
53
53
\preformatted{
96
96
}
97
97
}}
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.
102
102
 
103
103
}}}
105
105
\section{Enums and Flags}{\describe{
106
106
\item{\verb{GtkSpinButtonUpdatePolicy}}{
107
107
\tabular{ll}{
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
110
110
}
111
111
 
112
112
}
113
113
\item{\verb{GtkSpinType}}{
114
114
\tabular{ll}{
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
119
 
GTK_SPIN_HOME, 
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
 
119
GTK_SPIN_HOME,
 
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
122
122
}
123
123
 
124
124
}
129
129
}
130
130
 
131
131
\describe{
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
 
134
}}
 
135
\item{\code{user.data}}{user data set when the signal handler was connected.}
135
136
}
136
137
 
137
138
 
141
142
}
142
143
 
143
144
\describe{
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.}
147
 
}
148
 
 
149
 
 
150
 
}
151
 
\item{\code{output(spinbutton, user.data)}}{
152
 
\emph{undocumented
 
145
\item{\code{spinbutton}}{the object which received the signal.}
 
146
\item{\code{arg1}}{\emph{undocumented
 
147
}}
 
148
\item{\code{user.data}}{user data set when the signal handler was connected.}
 
149
}
 
150
 
 
151
 
 
152
}
 
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 */
 
157
static gboolean
 
158
on_output (GtkSpinButton *spin,
 
159
           gpointer       data)
 
160
{
 
161
   GtkAdjustment *adj;
 
162
   gchar *text;
 
163
   int value;
 
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);
 
168
   g_free (text);
 
169
   
 
170
   return TRUE;
 
171
}
153
172
}
154
173
 
155
174
\describe{
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.}
158
177
}
159
178
 
 
179
\emph{Returns:} [logical] \code{TRUE} if the value has been displayed.
160
180
 
161
181
}
162
182
\item{\code{value-changed(spinbutton, user.data)}}{
164
184
}
165
185
 
166
186
\describe{
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.}
169
189
}
170
190
 
171
191
 
172
192
}
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.  
176
 
 
177
 
  Since  2.10
 
195
from its maximum to minimum value or vice-versa.
 
196
  Since 2.10
178
197
 
179
198
\describe{
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.}
182
201
}
183
202
 
184
203
 
185
204
}
186
205
}}
187
206
\section{Properties}{\describe{
188
 
\item{\verb{adjustment} [\verb{\link{GtkAdjustment}} : *        : Read / Write]}{
 
207
\item{\verb{adjustment} [\code{\link{GtkAdjustment}} : *        : Read / Write]}{
189
208
 
190
209
The adjustment that holds the value of the spinbutton.
191
210
 
232
251
  Default value: GTK_SHADOW_IN
233
252
 
234
253
}}}
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}