Adjustment#
- class Adjustment(*args, **kwargs)#
 
Superclasses: InitiallyUnowned, Object
GtkAdjustment is a model for a numeric value.
The GtkAdjustment has an associated lower and upper bound.
It also contains step and page increments, and a page size.
Adjustments are used within several GTK widgets, including
SpinButton, Viewport, Scrollbar
and Scale.
The GtkAdjustment object does not update the value itself. Instead
it is left up to the owner of the GtkAdjustment to control the value.
Constructors#
- class Adjustment
 - classmethod new(value: float, lower: float, upper: float, step_increment: float, page_increment: float, page_size: float) Adjustment#
 Creates a new
GtkAdjustment.- Parameters:
 value – the initial value
lower – the minimum value
upper – the maximum value
step_increment – the step increment
page_increment – the page increment
page_size – the page size
Methods#
- class Adjustment
 - clamp_page(lower: float, upper: float) None#
 Updates the value property to ensure that the range between
lowerandupperis in the current page.The current page goes from
valuetovalue+page-size. If the range is larger than the page size, then only the start of it will be in the current page.A
value_changedsignal will be emitted if the value is changed.- Parameters:
 lower – the lower value
upper – the upper value
- configure(value: float, lower: float, upper: float, step_increment: float, page_increment: float, page_size: float) None#
 Sets all properties of the adjustment at once.
Use this function to avoid multiple emissions of the
changedsignal. Seeset_lowerfor an alternative way of compressing multiple emissions ofchangedinto one.- Parameters:
 value – the new value
lower – the new minimum value
upper – the new maximum value
step_increment – the new step increment
page_increment – the new page increment
page_size – the new page size
- set_lower(lower: float) None#
 Sets the minimum value of the adjustment.
When setting multiple adjustment properties via their individual setters, multiple
changedsignals will be emitted. However, since the emission of thechangedsignal is tied to the emission of the ::notify signals of the changed properties, it’s possible to compress thechangedsignals into one by callingfreeze_notify()andthaw_notify()around the calls to the individual setters.Alternatively, using a single
set()for all the properties to change, or usingconfigurehas the same effect.- Parameters:
 lower – the new minimum value
- set_page_increment(page_increment: float) None#
 Sets the page increment of the adjustment.
See
set_lowerabout how to compress multiple emissions of thechangedsignal when setting multiple adjustment properties.- Parameters:
 page_increment – the new page increment
- set_page_size(page_size: float) None#
 Sets the page size of the adjustment.
See
set_lowerabout how to compress multiple emissions of thechangedsignal when setting multiple adjustment properties.- Parameters:
 page_size – the new page size
- set_step_increment(step_increment: float) None#
 Sets the step increment of the adjustment.
See
set_lowerabout how to compress multiple emissions of thechangedsignal when setting multiple adjustment properties.- Parameters:
 step_increment – the new step increment
- set_upper(upper: float) None#
 Sets the maximum value of the adjustment.
Note that values will be restricted by
upper - page-sizeif the page-size property is nonzero.See
set_lowerabout how to compress multiple emissions of thechangedsignal when setting multiple adjustment properties.- Parameters:
 upper – the new maximum value
Properties#
- class Adjustment
 
Signals#
Virtual Methods#
Fields#
- class Adjustment
 - parent_instance#