1 2@c %start of fragment 3 4@deftp Class <gtk-range> 5Derives from @code{<gtk-widget>}. 6 7This class defines the following slots: 8 9@table @code 10@item update-policy 11How the range should be updated on the screen 12 13@item adjustment 14The GtkAdjustment that contains the current value of this range object 15 16@item inverted 17Invert direction slider moves to increase range value 18 19@item lower-stepper-sensitivity 20The sensitivity policy for the stepper that points to the adjustment's lower 21side 22 23@item upper-stepper-sensitivity 24The sensitivity policy for the stepper that points to the adjustment's upper 25side 26 27@item show-fill-level 28Whether to display a fill level indicator graphics on trough. 29 30@item restrict-to-fill-level 31Whether to restrict the upper boundary to the fill level. 32 33@item fill-level 34The fill level. 35 36@end table 37 38@end deftp 39 40@defop Signal <gtk-range> value-changed 41Emitted when the range value changes. 42 43@end defop 44 45@defop Signal <gtk-range> adjust-bounds (arg0@tie{}@code{<gdouble>}) 46@end defop 47 48@defop Signal <gtk-range> move-slider (arg0@tie{}@code{<gtk-scroll-type>}) 49Virtual function that moves the slider. Used for keybindings. 50 51@end defop 52 53@defop Signal <gtk-range> change-value (arg0@tie{}@code{<gtk-scroll-type>}) (arg1@tie{}@code{<gdouble>}) @result{}@tie{}@code{<gboolean>} 54The ::change-value signal is emitted when a scroll action is performed on a 55range. It allows an application to determine the type of scroll event that 56occurred and the resultant new value. The application can handle the event 57itself and return @samp{@code{#t}} to prevent further processing. Or, by 58returning @samp{@code{#f}}, it can pass the event to other handlers until the 59default GTK+ handler is reached. 60 61The value parameter is unrounded. An application that overrides the 62::change-value signal is responsible for clamping the value to the desired 63number of decimal digits; the default GTK+ handler clamps the value based on 64@var{range->round-digits}. 65 66It is not possible to use delayed update policies in an overridden 67::change-value handler. 68 69Since 2.6 70 71@end defop 72 73@deffn Function gtk-range-get-adjustment (self@tie{}@code{<gtk-range>}) @result{}@tie{} (ret@tie{}@code{<gtk-adjustment>}) 74@deffnx Method get-adjustment 75Get the @code{<gtk-adjustment>} which is the "model" object for 76@code{<gtk-range>}. See @code{gtk-range-set-adjustment} for details. The return 77value does not have a reference added, so should not be unreferenced. 78 79@table @var 80@item range 81a @code{<gtk-range>} 82 83@item ret 84a @code{<gtk-adjustment>} 85 86@end table 87 88@end deffn 89 90@deffn Function gtk-range-set-update-policy (self@tie{}@code{<gtk-range>}) (policy@tie{}@code{<gtk-update-type>}) 91@deffnx Method set-update-policy 92Sets the update policy for the range. @code{<gtk-update-continuous>} means that 93anytime the range slider is moved, the range value will change and the 94value_changed signal will be emitted. @code{<gtk-update-delayed>} means that the 95value will be updated after a brief timeout where no slider motion occurs, so 96updates are spaced by a short time rather than continuous. 97@code{<gtk-update-discontinuous>} means that the value will only be updated when 98the user releases the button and ends the slider drag operation. 99 100@table @var 101@item range 102a @code{<gtk-range>} 103 104@item policy 105update policy 106 107@end table 108 109@end deffn 110 111@deffn Function gtk-range-set-adjustment (self@tie{}@code{<gtk-range>}) (adjustment@tie{}@code{<gtk-adjustment>}) 112@deffnx Method set-adjustment 113Sets the adjustment to be used as the "model" object for this range widget. The 114adjustment indicates the current range value, the minimum and maximum range 115values, the step/page increments used for keybindings and scrolling, and the 116page size. The page size is normally 0 for @code{<gtk-scale>} and nonzero for 117@code{<gtk-scrollbar>}, and indicates the size of the visible area of the widget 118being scrolled. The page size affects the size of the scrollbar slider. 119 120@table @var 121@item range 122a @code{<gtk-range>} 123 124@item adjustment 125a @code{<gtk-adjustment>} 126 127@end table 128 129@end deffn 130 131@deffn Function gtk-range-get-inverted (self@tie{}@code{<gtk-range>}) @result{}@tie{} (ret@tie{}@code{bool}) 132@deffnx Method get-inverted 133Gets the value set by @code{gtk-range-set-inverted}. 134 135@table @var 136@item range 137a @code{<gtk-range>} 138 139@item ret 140@samp{@code{#t}} if the range is inverted 141 142@end table 143 144@end deffn 145 146@deffn Function gtk-range-set-inverted (self@tie{}@code{<gtk-range>}) (setting@tie{}@code{bool}) 147@deffnx Method set-inverted 148Ranges normally move from lower to higher values as the slider moves from top to 149bottom or left to right. Inverted ranges have higher values at the top or on the 150right rather than on the bottom or left. 151 152@table @var 153@item range 154a @code{<gtk-range>} 155 156@item setting 157@samp{@code{#t}} to invert the range 158 159@end table 160 161@end deffn 162 163@deffn Function gtk-range-get-update-policy (self@tie{}@code{<gtk-range>}) @result{}@tie{} (ret@tie{}@code{<gtk-update-type>}) 164@deffnx Method get-update-policy 165Gets the update policy of @var{range}. See @code{gtk-range-set-update-policy}. 166 167@table @var 168@item range 169a @code{<gtk-range>} 170 171@item ret 172the current update policy 173 174@end table 175 176@end deffn 177 178@deffn Function gtk-range-get-value (self@tie{}@code{<gtk-range>}) @result{}@tie{} (ret@tie{}@code{double}) 179@deffnx Method get-value 180Gets the current value of the range. 181 182@table @var 183@item range 184a @code{<gtk-range>} 185 186@item ret 187current value of the range. 188 189@end table 190 191@end deffn 192 193@deffn Function gtk-range-set-increments (self@tie{}@code{<gtk-range>}) (step@tie{}@code{double}) (page@tie{}@code{double}) 194@deffnx Method set-increments 195Sets the step and page sizes for the range. The step size is used when the user 196clicks the @code{<gtk-scrollbar>} arrows or moves @code{<gtk-scale>} via arrow 197keys. The page size is used for example when moving via Page Up or Page Down 198keys. 199 200@table @var 201@item range 202a @code{<gtk-range>} 203 204@item step 205step size 206 207@item page 208page size 209 210@end table 211 212@end deffn 213 214@deffn Function gtk-range-set-range (self@tie{}@code{<gtk-range>}) (min@tie{}@code{double}) (max@tie{}@code{double}) 215@deffnx Method set-range 216Sets the allowable values in the @code{<gtk-range>}, and clamps the range value 217to be between @var{min} and @var{max}. (If the range has a non-zero page size, 218it is clamped between @var{min} and @var{max} - page-size.) 219 220@table @var 221@item range 222a @code{<gtk-range>} 223 224@item min 225minimum range value 226 227@item max 228maximum range value 229 230@end table 231 232@end deffn 233 234@deffn Function gtk-range-set-value (self@tie{}@code{<gtk-range>}) (value@tie{}@code{double}) 235@deffnx Method set-value 236Sets the current value of the range; if the value is outside the minimum or 237maximum range values, it will be clamped to fit inside them. The range emits the 238"value_changed" signal if the value changes. 239 240@table @var 241@item range 242a @code{<gtk-range>} 243 244@item value 245new value of the range 246 247@end table 248 249@end deffn 250 251 252@c %end of fragment 253