Trait gtk4::prelude::FixedExt

source ·
pub trait FixedExt: IsA<Fixed> + Sealed + 'static {
    // Provided methods
    fn child_position(&self, widget: &impl IsA<Widget>) -> (f64, f64) { ... }
    fn child_transform(&self, widget: &impl IsA<Widget>) -> Option<Transform> { ... }
    fn move_(&self, widget: &impl IsA<Widget>, x: f64, y: f64) { ... }
    fn put(&self, widget: &impl IsA<Widget>, x: f64, y: f64) { ... }
    fn remove(&self, widget: &impl IsA<Widget>) { ... }
    fn set_child_transform(
        &self,
        widget: &impl IsA<Widget>,
        transform: Option<&Transform>
    ) { ... }
}
Expand description

Trait containing all Fixed methods.

Implementors

Fixed

Provided Methods§

source

fn child_position(&self, widget: &impl IsA<Widget>) -> (f64, f64)

Retrieves the translation transformation of the given child Widget in the Fixed.

See also: child_transform().

widget

a child of @self

Returns
x

the horizontal position of the @widget

y

the vertical position of the @widget

source

fn child_transform(&self, widget: &impl IsA<Widget>) -> Option<Transform>

Retrieves the transformation for @widget set using gtk_fixed_set_child_transform().

widget

a Widget, child of @self

Returns

a gsk::Transform

source

fn move_(&self, widget: &impl IsA<Widget>, x: f64, y: f64)

source

fn put(&self, widget: &impl IsA<Widget>, x: f64, y: f64)

Adds a widget to a Fixed at the given position.

widget

the widget to add

x

the horizontal position to place the widget at

y

the vertical position to place the widget at

source

fn remove(&self, widget: &impl IsA<Widget>)

Removes a child from @self.

widget

the child widget to remove

source

fn set_child_transform( &self, widget: &impl IsA<Widget>, transform: Option<&Transform> )

Sets the transformation for @widget.

This is a convenience function that retrieves the FixedLayoutChild instance associated to @widget and calls FixedLayoutChild::set_transform().

widget

a Widget, child of @self

transform

the transformation assigned to @widget to reset @widget’s transform

Implementors§

source§

impl<O: IsA<Fixed>> FixedExt for O