pub trait GESContainerExt:
    IsA<Container>
    + Sealed
    + 'static {
    // Provided methods
    fn add(&self, child: &impl IsA<TimelineElement>) -> Result<(), BoolError> { ... }
    fn edit(
        &self,
        layers: &[Layer],
        new_layer_priority: i32,
        mode: EditMode,
        edge: Edge,
        position: u64,
    ) -> Result<(), BoolError> { ... }
    fn children(&self, recursive: bool) -> Vec<TimelineElement> { ... }
    fn remove(&self, child: &impl IsA<TimelineElement>) -> Result<(), BoolError> { ... }
    fn ungroup(self, recursive: bool) -> Vec<Container> { ... }
    fn height(&self) -> u32 { ... }
    fn connect_child_added<F: Fn(&Self, &TimelineElement) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_child_removed<F: Fn(&Self, &TimelineElement) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Container methods.

§Implementors

Clip, Container, Group

Provided Methods§

source

fn add(&self, child: &impl IsA<TimelineElement>) -> Result<(), BoolError>

Adds a timeline element to the container. The element will now be a child of the container (and the container will be the parent of the added element), which means that it is now controlled by the container. This may change the properties of the child or the container, depending on the subclass.

Additionally, the children properties of the newly added element will be shared with the container, meaning they can also be read and set using TimelineElementExt::child_property() and TimelineElementExt::set_child_property() on the container.

§child

The element to add as a child

§Returns

true if child was successfully added to self.

source

fn edit( &self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64, ) -> Result<(), BoolError>

👎Deprecated: Since 1.18

Edits the container within its timeline.

§Deprecated since 1.18

use ges_timeline_element_edit instead.

§layers

A whitelist of layers where the edit can be performed, None allows all layers in the timeline

§new_layer_priority

The priority/index of the layer self should be moved to. -1 means no move

§mode

The edit mode

§edge

The edge of self where the edit should occur

§position

The edit position: a new location for the edge of self (in nanoseconds)

§Returns

true if the edit of self completed, false on failure.

source

fn children(&self, recursive: bool) -> Vec<TimelineElement>

Get the list of timeline elements contained in the container. If recursive is true, and the container contains other containers as children, then their children will be added to the list, in addition to themselves, and so on.

§recursive

Whether to recursively get children in self

§Returns

The list of TimelineElement-s contained in self.

source

fn remove(&self, child: &impl IsA<TimelineElement>) -> Result<(), BoolError>

Removes a timeline element from the container. The element will no longer be controlled by the container.

§child

The child to remove

§Returns

true if child was successfully removed from self.

source

fn ungroup(self, recursive: bool) -> Vec<Container>

Ungroups the container by splitting it into several containers containing various children of the original. The rules for how the container splits depends on the subclass. A Group will simply split into its children. A Clip will split into one Clip per TrackType it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all the TrackElement-s from the original clip with a matching track-type.

If recursive is true, and the container contains other containers as children, then they will also be ungrouped, and so on.

§recursive

Whether to recursively ungroup self

§Returns

The list of new Container-s created from the splitting of self.

source

fn height(&self) -> u32

The span of the container’s children’s priority values, which is the number of integers that lie between (inclusive) the minimum and maximum priorities found amongst the container’s children (maximum - minimum + 1).

source

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

Will be emitted after a child is added to the container. Usually, you should connect with g_signal_connect_after() since the signal may be stopped internally.

§element

The child that was added

source

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

Will be emitted after a child is removed from the container.

§element

The child that was removed

source

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

Object Safety§

This trait is not object safe.

Implementors§