pub trait AdjustmentExt:
IsA<Adjustment>
+ Sealed
+ 'static {
Show 23 methods
// Provided methods
fn clamp_page(&self, lower: f64, upper: f64) { ... }
fn configure(
&self,
value: f64,
lower: f64,
upper: f64,
step_increment: f64,
page_increment: f64,
page_size: f64,
) { ... }
fn lower(&self) -> f64 { ... }
fn minimum_increment(&self) -> f64 { ... }
fn page_increment(&self) -> f64 { ... }
fn page_size(&self) -> f64 { ... }
fn step_increment(&self) -> f64 { ... }
fn upper(&self) -> f64 { ... }
fn value(&self) -> f64 { ... }
fn set_lower(&self, lower: f64) { ... }
fn set_page_increment(&self, page_increment: f64) { ... }
fn set_page_size(&self, page_size: f64) { ... }
fn set_step_increment(&self, step_increment: f64) { ... }
fn set_upper(&self, upper: f64) { ... }
fn set_value(&self, value: f64) { ... }
fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_value_changed<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_lower_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_page_increment_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_page_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_step_increment_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_upper_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_value_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Expand description
Provided Methods§
Sourcefn clamp_page(&self, lower: f64, upper: f64)
fn clamp_page(&self, lower: f64, upper: f64)
Updates the value property to ensure that the range
between lower and upper is in the current page (i.e. between
value and value + 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-changed signal will be emitted if the value is changed.
§lower
the lower value
§upper
the upper value
Sourcefn configure(
&self,
value: f64,
lower: f64,
upper: f64,
step_increment: f64,
page_increment: f64,
page_size: f64,
)
fn configure( &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
changed signal. See set_lower()
for an alternative way of compressing multiple emissions of
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
Sourcefn minimum_increment(&self) -> f64
fn minimum_increment(&self) -> f64
Sourcefn page_increment(&self) -> f64
fn page_increment(&self) -> f64
Retrieves the page increment of the adjustment.
§Returns
The current page increment of the adjustment
Sourcefn step_increment(&self) -> f64
fn step_increment(&self) -> f64
Retrieves the step increment of the adjustment.
§Returns
The current step increment of the adjustment.
Sourcefn value(&self) -> f64
fn value(&self) -> f64
Gets the current value of the adjustment.
See set_value().
§Returns
The current value of the adjustment
Sourcefn set_lower(&self, lower: f64)
fn set_lower(&self, lower: f64)
Sets the minimum value of the adjustment.
When setting multiple adjustment properties via their individual
setters, multiple changed signals will be emitted.
However, since the emission of the changed signal
is tied to the emission of the notify signals of the changed
properties, it’s possible to compress the changed
signals into one by calling ObjectExt::freeze_notify() and
[ObjectExt::thaw_notify()][crate::glib::prelude::ObjectExt::thaw_notify()] around the calls to the individual setters.
Alternatively, using a single [ObjectExt::set()][crate::glib::prelude::ObjectExt::set()] for all the properties
to change, or using configure() has the same effect
of compressing changed emissions.
§lower
the new minimum value
Sourcefn set_page_increment(&self, page_increment: f64)
fn set_page_increment(&self, page_increment: f64)
Sets the page increment of the adjustment.
See set_lower() about how to compress multiple
emissions of the changed signal when setting
multiple adjustment properties.
§page_increment
the new page increment
Sourcefn set_page_size(&self, page_size: f64)
fn set_page_size(&self, page_size: f64)
Sets the page size of the adjustment.
See set_lower() about how to compress multiple
emissions of the GtkAdjustment::changed signal when setting
multiple adjustment properties.
§page_size
the new page size
Sourcefn set_step_increment(&self, step_increment: f64)
fn set_step_increment(&self, step_increment: f64)
Sets the step increment of the adjustment.
See set_lower() about how to compress multiple
emissions of the changed signal when setting
multiple adjustment properties.
§step_increment
the new step increment
Sourcefn set_upper(&self, upper: f64)
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 set_lower() about how to compress multiple
emissions of the changed signal when setting
multiple adjustment properties.
§upper
the new maximum value
Sourcefn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
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 value property.
Sourcefn connect_value_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_value_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Emitted when the value property has been changed.
fn connect_lower_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_page_increment_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_page_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_step_increment_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_upper_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_value_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".