gtk4::prelude

Trait ScrollableExt

Source
pub trait ScrollableExt:
    IsA<Scrollable>
    + Sealed
    + 'static {
Show 13 methods // Provided methods fn border(&self) -> Option<Border> { ... } fn hadjustment(&self) -> Option<Adjustment> { ... } fn hscroll_policy(&self) -> ScrollablePolicy { ... } fn vadjustment(&self) -> Option<Adjustment> { ... } fn vscroll_policy(&self) -> ScrollablePolicy { ... } fn set_hadjustment(&self, hadjustment: Option<&impl IsA<Adjustment>>) { ... } fn set_hscroll_policy(&self, policy: ScrollablePolicy) { ... } fn set_vadjustment(&self, vadjustment: Option<&impl IsA<Adjustment>>) { ... } fn set_vscroll_policy(&self, policy: ScrollablePolicy) { ... } fn connect_hadjustment_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_hscroll_policy_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_vadjustment_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_vscroll_policy_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Scrollable methods.

§Implementors

ColumnView, GridView, IconView, ListBase, ListView, Scrollable, TextView, TreeView, Viewport

Provided Methods§

Source

fn border(&self) -> Option<Border>

Returns the size of a non-scrolling border around the outside of the scrollable.

An example for this would be treeview headers. GTK can use this information to display overlaid graphics, like the overshoot indication, at the right position.

§Returns

true if @border has been set

§border

return location for the results

Source

fn hadjustment(&self) -> Option<Adjustment>

Retrieves the Adjustment used for horizontal scrolling.

§Returns

horizontal Adjustment.

Source

fn hscroll_policy(&self) -> ScrollablePolicy

Gets the horizontal ScrollablePolicy.

§Returns

The horizontal ScrollablePolicy.

Source

fn vadjustment(&self) -> Option<Adjustment>

Retrieves the Adjustment used for vertical scrolling.

§Returns

vertical Adjustment.

Source

fn vscroll_policy(&self) -> ScrollablePolicy

Gets the vertical ScrollablePolicy.

§Returns

The vertical ScrollablePolicy.

Source

fn set_hadjustment(&self, hadjustment: Option<&impl IsA<Adjustment>>)

Sets the horizontal adjustment of the Scrollable.

§hadjustment

a Adjustment

Source

fn set_hscroll_policy(&self, policy: ScrollablePolicy)

Sets the ScrollablePolicy.

The policy determines whether horizontal scrolling should start below the minimum width or below the natural width.

§policy

the horizontal ScrollablePolicy

Source

fn set_vadjustment(&self, vadjustment: Option<&impl IsA<Adjustment>>)

Sets the vertical adjustment of the Scrollable.

§vadjustment

a Adjustment

Source

fn set_vscroll_policy(&self, policy: ScrollablePolicy)

Sets the ScrollablePolicy.

The policy determines whether vertical scrolling should start below the minimum height or below the natural height.

§policy

the vertical ScrollablePolicy

Source

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

Source

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

Source

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

Source

fn connect_vscroll_policy_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", so this trait is not object safe.

Implementors§