Trait gtk4::prelude::AdjustmentExt

source ·
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

Trait containing all Adjustment methods.

§Implementors

Adjustment

Provided Methods§

source

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.

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 current minimum value of the adjustment

source

fn minimum_increment(&self) -> f64

Gets the smaller of step increment and page increment.

§Returns

the minimum increment of @self

source

fn page_increment(&self) -> f64

Retrieves the page increment of the adjustment.

§Returns

The current page increment of the adjustment

source

fn page_size(&self) -> f64

Retrieves the page size of the adjustment.

§Returns

The current page size of the adjustment

source

fn step_increment(&self) -> f64

Retrieves the step increment of the adjustment.

§Returns

The current step increment of the adjustment.

source

fn upper(&self) -> f64

Retrieves the maximum value of the adjustment.

§Returns

The current maximum value of the adjustment

source

fn value(&self) -> f64

Gets the current value of the adjustment.

§Returns

The current value of the adjustment

source

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

Object Safety§

This trait is not object safe.

Implementors§