| GtkScale {RGtk2} | R Documentation |
Base class for GtkHScale and GtkVScale
gtkScaleSetDigits(object, digits)
gtkScaleSetDrawValue(object, draw.value)
gtkScaleSetValuePos(object, pos)
gtkScaleGetDigits(object)
gtkScaleGetDrawValue(object)
gtkScaleGetValuePos(object)
gtkScaleGetLayout(object)
gtkScaleGetLayoutOffsets(object)
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkRange
+----GtkScale
+----GtkHScale
+----GtkVScale
GtkScale implements
AtkImplementorIface and GtkBuildable.
A GtkScale is a slider control used to select a numeric value.
To use it, you'll probably want to investigate the methods on
its base class, GtkRange, in addition to the methods for GtkScale itself.
To set the value of a scale, you would normally use gtkRangeSetValue.
To detect changes to the value, you would normally use the "value_changed"
signal.
The GtkScale widget is an abstract class, used only for deriving the
subclasses GtkHScale and GtkVScale. To create a scale widget,
call gtkHScaleNewWithRange or gtkVScaleNewWithRange.
GtkScaleGtkScale struct contains the following fields.
(These fields should be considered read-only. They should never be set by
an application.)
numeric draw_value ; | non-zero if the scale's current value is displayed next to the slider. |
numeric value_pos ; | the position in which the textual value is displayed, selected from GtkPositionType . |
format-value(scale, arg1, user.data)value.
That string will then be used to display the scale's value.
Here's an example signal handler which displays a value 1.0 as
with "–>1.0<–".
format_value_callback <- function(scale, value)
{
return(paste("-->", format(value, nsmall=scale$getDigits()), "<--"), sep="")
}
scaleGtkScale] the object which received the signal.arg1user.data
Returns: [character] allocated string representing value
digits [integer : Read / Write]The number of decimal places that are displayed in the value. Allowed values: [-1,64] Default value: 1
draw-value [logical : Read / Write]Whether the current value is displayed as a string next to the slider. Default value: TRUE
value-pos [GtkPositionType : Read / Write]The position in which the current value is displayed. Default value: GTK_POS_TOP
slider-length [integer : Read]Length of scale's slider. Allowed values: >= 0 Default value: 31
value-spacing [integer : Read]Space between value text and the slider/trough area. Allowed values: >= 0 Default value: 2
Derived by RGtkGen from GTK+ documentation
http://developer.gnome.org/doc/API/2.0/gtk/GtkScale.html