GES.Container¶
Methods¶
- Inherited:
GES.TimelineElement (38), GObject.Object (37), GES.Extractable (3), GES.MetaContainer (40)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
The span of priorities this container occupies |
Signals¶
Name |
Short Description |
---|---|
Will be emitted after a child is added to the container. |
|
Will be emitted after a child is removed from the container. |
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
children |
r |
The list of |
|
children_control_mode |
r |
||
height |
r |
The |
|
initiated_move |
r |
||
parent |
r |
Class Details¶
- class GES.Container(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
A
GES.Container
is a timeline element that controls otherGES.TimelineElement
-s, which are its children. In particular, it is responsible for maintaining the relativeGES.TimelineElement
:start
andGES.TimelineElement
:duration
times of its children. Therefore, if a container is temporally adjusted or moved to a new layer, it may accordingly adjust and move its children. Similarly, a change in one of its children may prompt the parent to correspondingly change its siblings.- classmethod group(containers)[source]¶
- Parameters:
containers ([
GES.Container
] orNone
) – TheGES.Container
-s to group- Returns:
The container created by merging containers, or
None
if they could not be merged into a single container.- Return type:
Groups the containers into a single container by merging them. The containers must all belong to the same
GES.TimelineElement
:timeline
.If the elements are all
GES.Clip
-s then this method will attempt to combine them all into a singleGES.Clip
. This should succeed if they: share the sameGES.TimelineElement
:start
,GES.TimelineElement
:duration
andGES.TimelineElement
:in-point
; exist in the same layer; and all of the sources share the sameGES.Asset
. If this fails, or one of the elements is not aGES.Clip
, this method will try to create aGES.Group
instead.
- add(child)[source]¶
- Parameters:
child (
GES.TimelineElement
) – The element to add as a child- Returns:
True
if child was successfully added to self.- Return type:
Adds a timeline element to the container. The element will now be a child of the container (and the container will be the
GES.TimelineElement
: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
GES.TimelineElement.get_child_property
() andGES.TimelineElement.set_child_property
() on the container.
- edit(layers, new_layer_priority, mode, edge, position)[source]¶
- Parameters:
layers ([
GES.Layer
] orNone
) – A whitelist of layers where the edit can be performed,None
allows all layers in the timelinenew_layer_priority (
int
) – The priority/index of the layer self should be moved to. -1 means no movemode (
GES.EditMode
) – The edit modeedge (
GES.Edge
) – The edge of self where the edit should occurposition (
int
) – The edit position: a new location for the edge of self (in nanoseconds)
- Returns:
- Return type:
Edits the container within its timeline.
Deprecated since version 1.18: use
GES.TimelineElement.edit
instead.
- get_children(recursive)[source]¶
- Parameters:
recursive (
bool
) – Whether to recursively get children in self- Returns:
The list of
GES.TimelineElement
-s contained in self.- Return type:
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.
- remove(child)[source]¶
- Parameters:
child (
GES.TimelineElement
) – The child to remove- Returns:
True
if child was successfully removed from self.- Return type:
Removes a timeline element from the container. The element will no longer be controlled by the container.
- ungroup(recursive)[source]¶
- Parameters:
recursive (
bool
) – Whether to recursively ungroup self- Returns:
The list of new
GES.Container
-s created from the splitting of self.- Return type:
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
GES.Group
will simply split into its children. AGES.Clip
will split into oneGES.Clip
perGES.TrackType
it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all theGES.TrackElement
-s from the original clip with a matchingGES.TrackElement
:track-type
.If recursive is
True
, and the container contains other containers as children, then they will also be ungrouped, and so on.
- do_add_child(element) virtual¶
- Parameters:
element (
GES.TimelineElement
) –- Return type:
Virtual method to add a child
- do_child_added(element) virtual¶
- Parameters:
element (
GES.TimelineElement
) –
Virtual method that is called right after a
GES.TimelineElement
is added
- do_child_removed(element) virtual¶
- Parameters:
element (
GES.TimelineElement
) –
Virtual method that is called right after a
GES.TimelineElement
is removed
- do_edit(layers, new_layer_priority, mode, edge, position) virtual¶
- Parameters:
layers ([
GES.Layer
] orNone
) – A whitelist of layers where the edit can be performed,None
allows all layers in the timelinenew_layer_priority (
int
) – The priority/index of the layer container should be moved to. -1 means no movemode (
GES.EditMode
) – The edit modeedge (
GES.Edge
) – The edge of container where the edit should occurposition (
int
) – The edit position: a new location for the edge of container (in nanoseconds)
- Returns:
- Return type:
Edits the container within its timeline.
Deprecated since version 1.18: use
GES.TimelineElement.edit
instead.
- do_remove_child(element) virtual¶
- Parameters:
element (
GES.TimelineElement
) –- Return type:
Virtual method to remove a child
- do_ungroup(recursive) virtual¶
- Parameters:
recursive (
bool
) – Whether to recursively ungroup container- Returns:
The list of new
GES.Container
-s created from the splitting of container.- Return type:
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
GES.Group
will simply split into its children. AGES.Clip
will split into oneGES.Clip
perGES.TrackType
it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all theGES.TrackElement
-s from the original clip with a matchingGES.TrackElement
:track-type
.If recursive is
True
, and the container contains other containers as children, then they will also be ungrouped, and so on.
Signal Details¶
- GES.Container.signals.child_added(container, element)¶
- Signal Name:
child-added
- Flags:
- Parameters:
container (
GES.Container
) – The object which received the signalelement (
GES.TimelineElement
) – The child that was added
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.
- GES.Container.signals.child_removed(container, element)¶
- Signal Name:
child-removed
- Flags:
- Parameters:
container (
GES.Container
) – The object which received the signalelement (
GES.TimelineElement
) – The child that was removed
Will be emitted after a child is removed from the container.
Property Details¶
- GES.Container.props.height¶
-
The span of the container’s children’s
GES.TimelineElement
: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).