Trait gtk::prelude::AdjustmentExt  
source · [−]pub trait AdjustmentExt: 'static {
Show 23 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
Required Methods
sourcefn clamp_page(&self, lower: f64, upper: f64)
 
fn clamp_page(&self, lower: f64, upper: f64)
Updates the property::Adjustment::value property to ensure that the range
between lower and upper is in the current page (i.e. between
property::Adjustment::value and property::Adjustment::value + property::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 signal::Adjustment::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
signal::Adjustment::changed signal. See set_lower()
for an alternative way of compressing multiple emissions of
signal::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
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 signal::Adjustment::changed signals will be emitted.
However, since the emission of the signal::Adjustment::changed signal
is tied to the emission of the signal::glib::Object::notify signals of the changed
properties, it’s possible to compress the signal::Adjustment::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 signal::Adjustment::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 signal::Adjustment::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 signal::Adjustment::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 signal::Adjustment::changed signal when setting
multiple adjustment properties.
upper
the new maximum value
sourcefn set_value(&self, value: f64)
 
fn set_value(&self, value: f64)
Sets the Adjustment value. The value is clamped to lie between
property::Adjustment::lower and property::Adjustment::upper.
Note that for adjustments which are used in a Scrollbar, the
effective range of allowed values goes from property::Adjustment::lower to
property::Adjustment::upper - property::Adjustment::page-size.
value
the new 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 property::Adjustment::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 property::Adjustment::value property has been changed.