Trait gtk4::prelude::FixedExt

source ·
pub trait FixedExt: 'static {
    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

Required Methods§

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

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

widget

a Widget, child of @self

Returns

a gsk::Transform

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

Removes a child from @self.

widget

the child widget to remove

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§