1Gtk2::SpinButton(3)   User Contributed Perl Documentation  Gtk2::SpinButton(3)
2
3
4

NAME

6       Gtk2::SpinButton - wrapper for GtkSpinButton
7

HIERARCHY

9         Glib::Object
10         +----Glib::InitiallyUnowned
11              +----Gtk2::Object
12                   +----Gtk2::Widget
13                        +----Gtk2::Entry
14                             +----Gtk2::SpinButton
15

INTERFACES

17         Glib::Object::_Unregistered::AtkImplementorIface
18         Gtk2::Buildable
19         Gtk2::Editable
20         Gtk2::CellEditable
21

METHODS

23   widget = Gtk2::SpinButton->new ($adjustment, $climb_rate, $digits)
24       •   $adjustment (Gtk2::Adjustment)
25
26       •   $climb_rate (double)
27
28       •   $digits (integer)
29
30   widget = Gtk2::SpinButton->new_with_range ($min, $max, $step)
31       •   $min (double)
32
33       •   $max (double)
34
35       •   $step (double)
36
37   adjustment = $spin_button->get_adjustment
38   $spin_button->set_adjustment ($adjustment)
39       •   $adjustment (Gtk2::Adjustment)
40
41   $spin_button->configure ($adjustment, $climb_rate, $digits)
42       •   $adjustment (Gtk2::Adjustment)
43
44       •   $climb_rate (double)
45
46       •   $digits (integer)
47
48   integer = $spin_button->get_digits
49   $spin_button->set_digits ($digits)
50       •   $digits (integer)
51
52   (step, page) = $spin_button->get_increments
53   $spin_button->set_increments ($step, $page)
54       •   $step (double)
55
56       •   $page (double)
57
58   boolean = $spin_button->get_numeric
59   $spin_button->set_numeric ($numeric)
60       •   $numeric (boolean)
61
62   (min, max) = $spin_button->get_range
63   $spin_button->set_range ($min, $max)
64       •   $min (double)
65
66       •   $max (double)
67
68   boolean = $spin_button->get_snap_to_ticks
69   $spin_button->set_snap_to_ticks ($snap_to_ticks)
70       •   $snap_to_ticks (boolean)
71
72   $spin_button->spin ($direction, $increment)
73       •   $direction (Gtk2::SpinType)
74
75       •   $increment (double)
76
77   $spin_button->update
78   spinbuttonupdatepolicy = $spin_button->get_update_policy
79   $spin_button->set_update_policy ($policy)
80       •   $policy (Gtk2::SpinButtonUpdatePolicy)
81
82   integer = $spin_button->get_value_as_int
83   double = $spin_button->get_value
84   $spin_button->set_value ($value)
85       •   $value (double)
86
87   boolean = $spin_button->get_wrap
88   $spin_button->set_wrap ($wrap)
89       •   $wrap (boolean)
90

PROPERTIES

92       'adjustment' (Gtk2::Adjustment : default undef : readable / writable /
93       private / static-nick / static-blurb)
94           The adjustment that holds the value of the spinbutton
95
96       'climb-rate' (double : default 0 : readable / writable / private /
97       static-nick / static-blurb)
98           The acceleration rate when you hold down a button
99
100       'digits' (Glib::UInt : default 0 : readable / writable / private /
101       static-nick / static-blurb)
102           The number of decimal places to display
103
104       'numeric' (boolean : default false : readable / writable / private /
105       static-nick / static-blurb)
106           Whether non-numeric characters should be ignored
107
108       'snap-to-ticks' (boolean : default false : readable / writable /
109       private / static-nick / static-blurb)
110           Whether erroneous values are automatically changed to a spin
111           button's nearest step increment
112
113       'update-policy' (Gtk2::SpinButtonUpdatePolicy : default "always" :
114       readable / writable / private / static-nick / static-blurb)
115           Whether the spin button should update always, or only when the
116           value is legal
117
118       'value' (double : default 0 : readable / writable / private / static-
119       nick / static-blurb)
120           Reads the current value, or sets a new value
121
122       'wrap' (boolean : default false : readable / writable / private /
123       static-nick / static-blurb)
124           Whether a spin button should wrap upon reaching its limits
125

STYLE PROPERTIES

127       'shadow-type' (Gtk2::ShadowType : default "in" : readable / private /
128       static-nick / static-blurb)
129           Style of bevel around the spin button
130

SIGNALS

132       change-value (Gtk2::SpinButton, Gtk2::ScrollType)
133       integer = input (Gtk2::SpinButton, gpointer)
134       boolean = output (Gtk2::SpinButton)
135       value-changed (Gtk2::SpinButton)
136       wrapped (Gtk2::SpinButton)
137

ENUMS AND FLAGS

139   enum Gtk2::ScrollType
140       •   'none' / 'GTK_SCROLL_NONE'
141
142       •   'jump' / 'GTK_SCROLL_JUMP'
143
144       •   'step-backward' / 'GTK_SCROLL_STEP_BACKWARD'
145
146       •   'step-forward' / 'GTK_SCROLL_STEP_FORWARD'
147
148       •   'page-backward' / 'GTK_SCROLL_PAGE_BACKWARD'
149
150       •   'page-forward' / 'GTK_SCROLL_PAGE_FORWARD'
151
152       •   'step-up' / 'GTK_SCROLL_STEP_UP'
153
154       •   'step-down' / 'GTK_SCROLL_STEP_DOWN'
155
156       •   'page-up' / 'GTK_SCROLL_PAGE_UP'
157
158       •   'page-down' / 'GTK_SCROLL_PAGE_DOWN'
159
160       •   'step-left' / 'GTK_SCROLL_STEP_LEFT'
161
162       •   'step-right' / 'GTK_SCROLL_STEP_RIGHT'
163
164       •   'page-left' / 'GTK_SCROLL_PAGE_LEFT'
165
166       •   'page-right' / 'GTK_SCROLL_PAGE_RIGHT'
167
168       •   'start' / 'GTK_SCROLL_START'
169
170       •   'end' / 'GTK_SCROLL_END'
171
172   enum Gtk2::SpinButtonUpdatePolicy
173       •   'always' / 'GTK_UPDATE_ALWAYS'
174
175       •   'if-valid' / 'GTK_UPDATE_IF_VALID'
176
177   enum Gtk2::SpinType
178       •   'step-forward' / 'GTK_SPIN_STEP_FORWARD'
179
180       •   'step-backward' / 'GTK_SPIN_STEP_BACKWARD'
181
182       •   'page-forward' / 'GTK_SPIN_PAGE_FORWARD'
183
184       •   'page-backward' / 'GTK_SPIN_PAGE_BACKWARD'
185
186       •   'home' / 'GTK_SPIN_HOME'
187
188       •   'end' / 'GTK_SPIN_END'
189
190       •   'user-defined' / 'GTK_SPIN_USER_DEFINED'
191

SEE ALSO

193       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
194       Gtk2::Entry
195
197       Copyright (C) 2003-2011 by the gtk2-perl team.
198
199       This software is licensed under the LGPL.  See Gtk2 for a full notice.
200
201
202
203perl v5.34.0                      2022-01-21               Gtk2::SpinButton(3)
Impressum