Skip to main content

AspectFrameExt

Trait AspectFrameExt 

Source
pub trait AspectFrameExt: IsA<AspectFrame> + 'static {
Show 13 methods // Provided methods fn set(&self, xalign: f32, yalign: f32, ratio: f32, obey_child: bool) { ... } fn is_obey_child(&self) -> bool { ... } fn set_obey_child(&self, obey_child: bool) { ... } fn ratio(&self) -> f32 { ... } fn set_ratio(&self, ratio: f32) { ... } fn xalign(&self) -> f32 { ... } fn set_xalign(&self, xalign: f32) { ... } fn yalign(&self) -> f32 { ... } fn set_yalign(&self, yalign: f32) { ... } fn connect_obey_child_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_ratio_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_xalign_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_yalign_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all AspectFrame methods.

§Implementors

AspectFrame

Provided Methods§

Source

fn set(&self, xalign: f32, yalign: f32, ratio: f32, obey_child: bool)

Set parameters for an existing AspectFrame.

§xalign

Horizontal alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)

§yalign

Vertical alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned)

§ratio

The desired aspect ratio.

§obey_child

If true, ratio is ignored, and the aspect ratio is taken from the requistion of the child.

Source

fn is_obey_child(&self) -> bool

Source

fn set_obey_child(&self, obey_child: bool)

Source

fn ratio(&self) -> f32

Source

fn set_ratio(&self, ratio: f32)

Source

fn xalign(&self) -> f32

Source

fn set_xalign(&self, xalign: f32)

Source

fn yalign(&self) -> f32

Source

fn set_yalign(&self, yalign: f32)

Source

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

Source

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

Source

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

Source

fn connect_yalign_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§