[−][src]Trait gtk::AdjustmentExt
Required methods
fn changed(&self)
Emits a Adjustment::changed
signal from the Adjustment
.
This is typically called by the owner of the Adjustment
after it has
changed any of the Adjustment
properties other than the value.
Deprecated since 3.18
GTK+ emits Adjustment::changed
itself whenever any
of the properties (other than value) change
fn clamp_page(&self, lower: f64, upper: f64)
Updates the Adjustment:value
property to ensure that the range
between lower
and upper
is in the current page (i.e. between
Adjustment:value
and Adjustment:value
+ 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 Adjustment::value-changed
signal will be emitted if the value is changed.
lower
the lower value
upper
the upper value
fn configure(
&self,
value: f64,
lower: f64,
upper: f64,
step_increment: f64,
page_increment: f64,
page_size: f64
)
&self,
value: f64,
lower: f64,
upper: f64,
step_increment: f64,
page_increment: f64,
page_size: f64
)
Sets all properties of the adjustment at once.
Use this function to avoid multiple emissions of the
Adjustment::changed
signal. See AdjustmentExt::set_lower
for an alternative way of compressing multiple emissions of
Adjustment::changed
into one.
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
fn get_lower(&self) -> f64
fn get_minimum_increment(&self) -> f64
fn get_page_increment(&self) -> f64
Retrieves the page increment of the adjustment.
Returns
The current page increment of the adjustment
fn get_page_size(&self) -> f64
fn get_step_increment(&self) -> f64
Retrieves the step increment of the adjustment.
Returns
The current step increment of the adjustment.
fn get_upper(&self) -> f64
fn get_value(&self) -> f64
Gets the current value of the adjustment.
See AdjustmentExt::set_value
.
Returns
The current value of the adjustment
fn set_lower(&self, lower: f64)
Sets the minimum value of the adjustment.
When setting multiple adjustment properties via their individual
setters, multiple Adjustment::changed
signals will be emitted.
However, since the emission of the Adjustment::changed
signal
is tied to the emission of the gobject::Object::notify
signals of the changed
properties, it’s possible to compress the Adjustment::changed
signals into one by calling gobject::ObjectExt::freeze_notify
and
gobject::ObjectExt::thaw_notify
around the calls to the individual setters.
Alternatively, using a single gobject::ObjectExt::set
for all the properties
to change, or using AdjustmentExt::configure
has the same effect
of compressing Adjustment::changed
emissions.
lower
the new minimum value
fn set_page_increment(&self, page_increment: f64)
Sets the page increment of the adjustment.
See AdjustmentExt::set_lower
about how to compress multiple
emissions of the Adjustment::changed
signal when setting
multiple adjustment properties.
page_increment
the new page increment
fn set_page_size(&self, page_size: f64)
Sets the page size of the adjustment.
See AdjustmentExt::set_lower
about how to compress multiple
emissions of the Adjustment
::changed signal when setting
multiple adjustment properties.
page_size
the new page size
fn set_step_increment(&self, step_increment: f64)
Sets the step increment of the adjustment.
See AdjustmentExt::set_lower
about how to compress multiple
emissions of the Adjustment::changed
signal when setting
multiple adjustment properties.
step_increment
the new step increment
fn set_upper(&self, upper: f64)
Sets the maximum value of the adjustment.
Note that values will be restricted by upper - page-size
if the page-size property is nonzero.
See AdjustmentExt::set_lower
about how to compress multiple
emissions of the Adjustment::changed
signal when setting
multiple adjustment properties.
upper
the new maximum value
fn set_value(&self, value: f64)
Sets the Adjustment
value. The value is clamped to lie between
Adjustment:lower
and Adjustment:upper
.
Note that for adjustments which are used in a Scrollbar
, the
effective range of allowed values goes from Adjustment:lower
to
Adjustment:upper
- Adjustment:page-size
.
value
the new value
fn value_changed(&self)
Emits a Adjustment::value-changed
signal from the Adjustment
.
This is typically called by the owner of the Adjustment
after it has
changed the Adjustment:value
property.
Deprecated since 3.18
GTK+ emits Adjustment::value-changed
itself whenever
the value changes
fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Emitted when one or more of the Adjustment
properties have been
changed, other than the Adjustment:value
property.
fn connect_value_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Emitted when the Adjustment:value
property has been changed.
fn connect_property_lower_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_page_increment_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_page_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_step_increment_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_upper_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_value_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Adjustment>> AdjustmentExt for O
[src]
fn changed(&self)
[src]
fn clamp_page(&self, lower: f64, upper: f64)
[src]
fn configure(
&self,
value: f64,
lower: f64,
upper: f64,
step_increment: f64,
page_increment: f64,
page_size: f64
)
[src]
&self,
value: f64,
lower: f64,
upper: f64,
step_increment: f64,
page_increment: f64,
page_size: f64
)
fn get_lower(&self) -> f64
[src]
fn get_minimum_increment(&self) -> f64
[src]
fn get_page_increment(&self) -> f64
[src]
fn get_page_size(&self) -> f64
[src]
fn get_step_increment(&self) -> f64
[src]
fn get_upper(&self) -> f64
[src]
fn get_value(&self) -> f64
[src]
fn set_lower(&self, lower: f64)
[src]
fn set_page_increment(&self, page_increment: f64)
[src]
fn set_page_size(&self, page_size: f64)
[src]
fn set_step_increment(&self, step_increment: f64)
[src]
fn set_upper(&self, upper: f64)
[src]
fn set_value(&self, value: f64)
[src]
fn value_changed(&self)
[src]
fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_value_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_property_lower_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_page_increment_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_page_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_step_increment_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_upper_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_value_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId