Gtk.Adjustment¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(value, lower, upper, step_increment, page_increment, page_size) | 
| changed() | |
| clamp_page(lower, upper) | |
| configure(value, lower, upper, step_increment, page_increment, page_size) | |
| get_lower() | |
| get_minimum_increment() | |
| get_page_increment() | |
| get_page_size() | |
| get_step_increment() | |
| get_upper() | |
| get_value() | |
| set_lower(lower) | |
| set_page_increment(page_increment) | |
| set_page_size(page_size) | |
| set_step_increment(step_increment) | |
| set_upper(upper) | |
| set_value(value) | |
| value_changed() | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| lower | float | r/w | The minimum value of the adjustment | 
| page-increment | float | r/w | The page increment of the adjustment | 
| page-size | float | r/w | The page size of the adjustment | 
| step-increment | float | r/w | The step increment of the adjustment | 
| upper | float | r/w | The maximum value of the adjustment | 
| value | float | r/w | The value of the adjustment | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| changed | Emitted when one or more of the Gtk.Adjustmentproperties have been changed, other than theGtk.Adjustment:valueproperty. | 
| value-changed | Emitted when the Gtk.Adjustment:valueproperty has been changed. | 
Fields¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent_instance | GObject.InitiallyUnowned | r | 
Class Details¶
- 
class Gtk.Adjustment(*args, **kwargs)¶
- Bases: - GObject.InitiallyUnowned- Abstract: - No - Structure: - Gtk.AdjustmentClass- The - Gtk.Adjustmentobject represents a value which has an associated lower and upper bound, together with step and page increments, and a page size. It is used within several GTK+ widgets, including- Gtk.SpinButton,- Gtk.Viewport, and- Gtk.Range(which is a base class for- Gtk.Scrollbarand- Gtk.Scale).- The - Gtk.Adjustmentobject does not update the value itself. Instead it is left up to the owner of the- Gtk.Adjustmentto control the value.- 
classmethod new(value, lower, upper, step_increment, page_increment, page_size)[source]¶
- Parameters: - Returns: - a new - Gtk.Adjustment- Return type: - Creates a new - Gtk.Adjustment.
 - 
changed()[source]¶
- Emits a - Gtk.Adjustment- ::changedsignal from the- Gtk.Adjustment. This is typically called by the owner of the- Gtk.Adjustmentafter it has changed any of the- Gtk.Adjustmentproperties other than the value.- Deprecated since version 3.18: GTK+ emits - Gtk.Adjustment- ::changeditself whenever any of the properties (other than value) change
 - 
clamp_page(lower, upper)[source]¶
- Parameters: - Updates the - Gtk.Adjustment- :valueproperty to ensure that the range between lower and upper is in the current page (i.e. between- Gtk.Adjustment- :valueand- Gtk.Adjustment- :value+- Gtk.Adjustment- :page-size). If the range is larger than the page size, then only the start of it will be in the current page.- A - Gtk.Adjustment- ::value-changedsignal will be emitted if the value is changed.
 - 
configure(value, lower, upper, step_increment, page_increment, page_size)[source]¶
- Parameters: - Sets all properties of the adjustment at once. - Use this function to avoid multiple emissions of the - Gtk.Adjustment- ::changedsignal. See- Gtk.Adjustment.set_lower() for an alternative way of compressing multiple emissions of- Gtk.Adjustment- ::changedinto one.- New in version 2.14. 
 - 
get_lower()[source]¶
- Returns: - The current minimum value of the adjustment - Return type: - float- Retrieves the minimum value of the adjustment. - New in version 2.14. 
 - 
get_minimum_increment()[source]¶
- Returns: - the minimum increment of self - Return type: - float- Gets the smaller of step increment and page increment. - New in version 3.2. 
 - 
get_page_increment()[source]¶
- Returns: - The current page increment of the adjustment - Return type: - float- Retrieves the page increment of the adjustment. - New in version 2.14. 
 - 
get_page_size()[source]¶
- Returns: - The current page size of the adjustment - Return type: - float- Retrieves the page size of the adjustment. - New in version 2.14. 
 - 
get_step_increment()[source]¶
- Returns: - The current step increment of the adjustment. - Return type: - float- Retrieves the step increment of the adjustment. - New in version 2.14. 
 - 
get_upper()[source]¶
- Returns: - The current maximum value of the adjustment - Return type: - float- Retrieves the maximum value of the adjustment. - New in version 2.14. 
 - 
get_value()[source]¶
- Returns: - The current value of the adjustment - Return type: - float- Gets the current value of the adjustment. See - Gtk.Adjustment.set_value().
 - 
set_lower(lower)[source]¶
- Parameters: - lower ( - float) – the new minimum value- Sets the minimum value of the adjustment. - When setting multiple adjustment properties via their individual setters, multiple - Gtk.Adjustment- ::changedsignals will be emitted. However, since the emission of the- Gtk.Adjustment- ::changedsignal is tied to the emission of the- GObject.Object- ::notifysignals of the changed properties, it’s possible to compress the- Gtk.Adjustment- ::changedsignals into one by calling- GObject.Object.freeze_notify() and- GObject.Object.thaw_notify() around the calls to the individual setters.- Alternatively, using a single g_object_set() for all the properties to change, or using - Gtk.Adjustment.configure() has the same effect of compressing- Gtk.Adjustment- ::changedemissions.- New in version 2.14. 
 - 
set_page_increment(page_increment)[source]¶
- Parameters: - page_increment ( - float) – the new page increment- Sets the page increment of the adjustment. - See - Gtk.Adjustment.set_lower() about how to compress multiple emissions of the- Gtk.Adjustment- ::changedsignal when setting multiple adjustment properties.- New in version 2.14. 
 - 
set_page_size(page_size)[source]¶
- Parameters: - page_size ( - float) – the new page size- Sets the page size of the adjustment. - See - Gtk.Adjustment.set_lower() about how to compress multiple emissions of the- Gtk.Adjustment- ::changedsignal when setting multiple adjustment properties.- New in version 2.14. 
 - 
set_step_increment(step_increment)[source]¶
- Parameters: - step_increment ( - float) – the new step increment- Sets the step increment of the adjustment. - See - Gtk.Adjustment.set_lower() about how to compress multiple emissions of the- Gtk.Adjustment- ::changedsignal when setting multiple adjustment properties.- New in version 2.14. 
 - 
set_upper(upper)[source]¶
- Parameters: - upper ( - float) – the new maximum value- Sets the maximum value of the adjustment. - Note that values will be restricted by - upper - page-sizeif the page-size property is nonzero.- See - Gtk.Adjustment.set_lower() about how to compress multiple emissions of the- Gtk.Adjustment- ::changedsignal when setting multiple adjustment properties.- New in version 2.14. 
 - 
set_value(value)[source]¶
- Parameters: - value ( - float) – the new value- Sets the - Gtk.Adjustmentvalue. The value is clamped to lie between- Gtk.Adjustment- :lowerand- Gtk.Adjustment- :upper.- Note that for adjustments which are used in a - Gtk.Scrollbar, the effective range of allowed values goes from- Gtk.Adjustment- :lowerto- Gtk.Adjustment- :upper-- Gtk.Adjustment- :page-size.
 - 
value_changed()[source]¶
- Emits a - Gtk.Adjustment- ::value-changedsignal from the- Gtk.Adjustment. This is typically called by the owner of the- Gtk.Adjustmentafter it has changed the- Gtk.Adjustment- :valueproperty.- Deprecated since version 3.18: GTK+ emits - Gtk.Adjustment- ::value-changeditself whenever the value changes
 - 
do_changed() virtual¶
- Emits a - Gtk.Adjustment- ::changedsignal from the- Gtk.Adjustment. This is typically called by the owner of the- Gtk.Adjustmentafter it has changed any of the- Gtk.Adjustmentproperties other than the value.- Deprecated since version 3.18: GTK+ emits - Gtk.Adjustment- ::changeditself whenever any of the properties (other than value) change
 - 
do_value_changed() virtual¶
- Emits a - Gtk.Adjustment- ::value-changedsignal from the- Gtk.Adjustment. This is typically called by the owner of the- Gtk.Adjustmentafter it has changed the- Gtk.Adjustment- :valueproperty.- Deprecated since version 3.18: GTK+ emits - Gtk.Adjustment- ::value-changeditself whenever the value changes
 
- 
classmethod 
Signal Details¶
- 
Gtk.Adjustment.signals.changed(adjustment)¶
- Signal Name: - changed- Flags: - RUN_FIRST,- NO_RECURSE- Parameters: - adjustment ( - Gtk.Adjustment) – The object which received the signal- Emitted when one or more of the - Gtk.Adjustmentproperties have been changed, other than the- Gtk.Adjustment- :valueproperty.
- 
Gtk.Adjustment.signals.value_changed(adjustment)¶
- Signal Name: - value-changed- Flags: - RUN_FIRST,- NO_RECURSE- Parameters: - adjustment ( - Gtk.Adjustment) – The object which received the signal- Emitted when the - Gtk.Adjustment- :valueproperty has been changed.
Property Details¶
- 
Gtk.Adjustment.props.lower¶
- Name: - lower- Type: - float- Default Value: - 0.0- Flags: - READABLE,- WRITABLE- The minimum value of the adjustment. - New in version 2.4. 
- 
Gtk.Adjustment.props.page_increment¶
- Name: - page-increment- Type: - float- Default Value: - 0.0- Flags: - READABLE,- WRITABLE- The page increment of the adjustment. - New in version 2.4. 
- 
Gtk.Adjustment.props.page_size¶
- Name: - page-size- Type: - float- Default Value: - 0.0- Flags: - READABLE,- WRITABLE- The page size of the adjustment. Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a - Gtk.SpinButton.- New in version 2.4. 
- 
Gtk.Adjustment.props.step_increment¶
- Name: - step-increment- Type: - float- Default Value: - 0.0- Flags: - READABLE,- WRITABLE- The step increment of the adjustment. - New in version 2.4.