Slider widget == Description == The //slider// widget enables graphical integer selection. ++++ can be generally used instead of ++++ when the horizontal space of the GUI permits. ~~ Note: ,( :style { font-weight: bold; color: red } [ The markups presented in this page are not yet supported on client side programming. They are only supported on server side.]) == Synopsis == === Server === ( args ...) === Client === (slider-value slider) (slider-value-set! slider value) (slider-onchange slider) (slider-onchange-set! slider proc) === Requirements === Client codes using //Sliders// need to load the script ++hop-slider.js++. They also need to load the ++hop-slider.css++ style sheet. Hence, documents using //sliders// must include in their header, the following statement: ( :include "hop-slider") == Examples == == Server Definitions == === ++++ === ^ attributes ^ type ^ default ^ short description ^ | :id | string | //random// | element identifier. | | :value | integer | ++0++ | the default value. | | :min | integer | ++0++ | the minimum value. | | :max | integer | ++100++ | the maximum value. | | :step | integer | ++1++ | the increment. | | :caption | obj | ++top++ | the caption location. | | :onchange | script | | the action to executed. | ~~ The argument :onchange is a script that is invoked each time the slider is changed via the GUI. That is calling the function ++slider-value-set!++ **does not** invoke automatically :onchange. In the scope of that script, the variable ++this++ is bound to the //slider// whose value can be fetch using ++slider-value++. ~~ If the argument :caption is ++#f++ not caption is associated. == Client Definitions == === ++(slider-value slider)++ === slider-value ^ arguments ^ type ^ short description ^ | slider | slider | the slider. | This function returns the current value of the slider. === ++(slider-value-set! slider value)++ === slider-value-set! ^ arguments ^ type ^ short description ^ | slider | slider | the slider. | | value | integer | the new value. | This function sets a new value to a slider. === ++(slider-onchange slider)++ === slider-onchange ^ arguments ^ type ^ short description ^ | slider | slider | the slider. | This function returns the current function that is invoked each time the slider changes its value. === ++(slider-onchange-set! slider proc)++ === slider-onchange-set! ^ arguments ^ type ^ short description ^ | slider | slider | the slider. | | proc | procedure | the new //onchange// procedure. | This function sets a new ++onchange++ procedure to a slider. This procedure is invoked each time user action changes the value of the slider. When the procedure is invoked, the special variable ++this++ is bound to the current slider. The expression ++this.value++ returns the current value of the slider. == Style == == See also == , slider-