Method
GimpUiScaleEntryset_bounds
Declaration [src]
void
gimp_scale_entry_set_bounds (
GimpScaleEntry* entry,
gdouble lower,
gdouble upper,
gboolean limit_scale
)
Description [src]
By default the GtkSpinButton and GtkScale will have the same range.
In some case, you want to set a different range. In particular when
the finale range is huge, the GtkScale might become nearly useless
as every tiny slider move would dramatically update the value. In
this case, it is common to set the GtkScale to a smaller common
range, while the GtkSpinButton would allow for the full allowed
range.
This function allows this. Obviously the GtkAdjustment of both
widgets would be synced but if the set value is out of the GtkScale
range, the slider would simply show at one extreme.
If limit_scale is FALSE though, it would sync back both widgets
range to the new values.
Note that the step and page increments are updated when the range is updated according to some common usage algorithm which should work if you don’t have very specific needs. If you want to customize the step increments yourself, you may call gimp_label_spin_set_increments().
Parameters
lower-
Type:
gdoubleThe lower value for the whole widget if
limit_scaleisFALSE, or only for theGtkScaleifTRUE. upper-
Type:
gdoubleThe upper value for the whole widget if
limit_scaleisFALSE, or only for theGtkSpinButtonifTRUE. limit_scale-
Type:
gbooleanWhether the range should only apply to the
GtkScaleor if it should share itsGtkAdjustementwith theGtkSpinButton. IfTRUE, bothloweranduppermust be included in currentGtkSpinButtonrange.