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 { ... }
}
Provided Methods§
sourcefn add(&self, child: &impl IsA<TimelineElement>) -> Result<(), BoolError>
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
.
sourcefn edit(
&self,
layers: &[Layer],
new_layer_priority: i32,
mode: EditMode,
edge: Edge,
position: u64,
) -> Result<(), BoolError>
👎Deprecated: Since 1.18
fn edit( &self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64, ) -> Result<(), BoolError>
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
sourcefn children(&self, recursive: bool) -> Vec<TimelineElement>
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
.
sourcefn ungroup(self, recursive: bool) -> Vec<Container>
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
.
sourcefn height(&self) -> u32
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).
sourcefn connect_child_added<F: Fn(&Self, &TimelineElement) + 'static>(
&self,
f: F,
) -> SignalHandlerId
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