Skip to main content

AdjustmentExt

Trait AdjustmentExt 

Source
pub trait AdjustmentExt: IsA<Adjustment> + '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

Trait containing all Adjustment methods.

§Implementors

Adjustment

Provided Methods§

Source

fn clamp_page(&self, lower: f64, upper: f64)

Updates the value of the adjustment to ensure that the given range is contained 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 value-changed signal will be emitted if the value is changed.

§lower

the lower value

§upper

the upper value

Source

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

Source

fn lower(&self) -> f64

Retrieves the minimum value of the adjustment.

§Returns

the minimum value

Source

fn minimum_increment(&self) -> f64

Gets the smaller of step increment and page increment.

§Returns

the minimum increment

Source

fn page_increment(&self) -> f64

Retrieves the page increment of the adjustment.

§Returns

the page increment

Source

fn page_size(&self) -> f64

Retrieves the page size of the adjustment.

§Returns

the page size

Source

fn step_increment(&self) -> f64

Retrieves the step increment of the adjustment.

§Returns

the step increment

Source

fn upper(&self) -> f64

Retrieves the maximum value of the adjustment.

§Returns

the maximum value

Source

fn value(&self) -> f64

Gets the current value of the adjustment.

§Returns

the current value

Source

fn set_lower(&self, lower: f64)

s possible to compress the 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

Source

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

Source

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 changed signal when setting multiple adjustment properties.

§page_size

the new page size

Source

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

Source

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

Source

fn set_value(&self, value: f64)

Sets the Adjustment value.

The value is clamped to lie between lower and upper.

Note that for adjustments which are used in a Scrollbar, the effective range of allowed values goes from lower to upper - page-size.

§value

the new value

Source

fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

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

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

Source

fn connect_value_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Emitted when the value has been changed.

Source

fn connect_lower_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_page_increment_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_page_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_step_increment_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_upper_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

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".

Implementors§