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

Trait containing all Adjustment methods.

Implementors

Adjustment

Required Methods§

Updates the value property to ensure that the range between @lower and @upper is in the current page.

The current page goes from value to 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 signal::Adjustment::value-changed signal will be emitted if the value is changed.

lower

the lower value

upper

the upper value

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

Retrieves the minimum value of the adjustment.

Returns

The current minimum value of the adjustment

Gets the smaller of step increment and page increment.

Returns

the minimum increment of @self

Retrieves the page increment of the adjustment.

Returns

The current page increment of the adjustment

Retrieves the page size of the adjustment.

Returns

The current page size of the adjustment

Retrieves the step increment of the adjustment.

Returns

The current step increment of the adjustment.

Retrieves the maximum value of the adjustment.

Returns

The current maximum value of the adjustment

Gets the current value of the adjustment.

Returns

The current value of the adjustment

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 ::notify signals of the changed properties, it’s possible to compress the signal::Adjustment::changed signals into one by calling g_object_freeze_notify() and g_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 configure() has the same effect.

lower

the new minimum value

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

Sets the page size of the adjustment.

See set_lower() about how to compress multiple emissions of the signal::Adjustment::changed signal when setting multiple adjustment properties.

page_size

the new page size

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

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

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

Emitted when one or more of the Adjustment properties have been changed.

Note that the property::Adjustment::value property is covered by the signal::Adjustment::value-changed signal.

Emitted when the value has been changed.

Implementors§