Trait clutter::prelude::ContainerExt [−][src]
pub trait ContainerExt: 'static { fn child_get_property<P: IsA<Actor>>(
&self,
child: &P,
property: &str,
value: &mut Value
); fn child_set_property<P: IsA<Actor>>(
&self,
child: &P,
property: &str,
value: &Value
); fn create_child_meta<P: IsA<Actor>>(&self, actor: &P); fn destroy_child_meta<P: IsA<Actor>>(&self, actor: &P); fn find_child_by_name(&self, child_name: &str) -> Option<Actor>; fn get_child_meta<P: IsA<Actor>>(&self, actor: &P) -> Option<ChildMeta>; fn connect_actor_added<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_actor_removed<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_child_notify<F: Fn(&Self, &Actor, &ParamSpec) + 'static>(
&self,
f: F
) -> SignalHandlerId; }
Trait containing all Container
methods.
Implementors
Actor
, Box
, Clone
, Container
, Group
, Rectangle
, ScrollActor
, Stage
, Text
, Texture
Required methods
fn child_get_property<P: IsA<Actor>>(
&self,
child: &P,
property: &str,
value: &mut Value
)
[src]
&self,
child: &P,
property: &str,
value: &mut Value
)
Gets a container specific property of a child of self
, In general,
a copy is made of the property contents and the caller is responsible for
freeing the memory by calling gobject::Value::unset
.
Note that Container::child_set_property
is really intended for
language bindings, Container::child_set
is much more convenient
for C programming.
child
a Actor
that is a child of self
.
property
the name of the property to set.
value
the value.
fn child_set_property<P: IsA<Actor>>(
&self,
child: &P,
property: &str,
value: &Value
)
[src]
&self,
child: &P,
property: &str,
value: &Value
)
Calls the ContainerIface.child_notify
() virtual function
of Container
. The default implementation will emit the
Container::child-notify
signal.
child
a Actor
pspec
a gobject::ParamSpec
Sets a container-specific property on a child of self
.
child
a Actor
that is a child of self
.
property
the name of the property to set.
value
the value.
fn create_child_meta<P: IsA<Actor>>(&self, actor: &P)
[src]
Creates the ChildMeta
wrapping actor
inside the
self
, if the ContainerIface::child_meta_type
class member is not set to G_TYPE_INVALID
.
This function is only useful when adding a Actor
to
a Container
implementation outside of the
Container::add
() virtual function implementation.
Applications should not call this function.
actor
a Actor
fn destroy_child_meta<P: IsA<Actor>>(&self, actor: &P)
[src]
Destroys the ChildMeta
wrapping actor
inside the
self
, if any.
This function is only useful when removing a Actor
to
a Container
implementation outside of the
Container::add
() virtual function implementation.
Applications should not call this function.
actor
a Actor
fn find_child_by_name(&self, child_name: &str) -> Option<Actor>
[src]
Finds a child actor of a container by its name. Search recurses into any child container.
child_name
the name of the requested child.
Returns
The child actor with the requested name,
or None
if no actor with that name was found.
fn get_child_meta<P: IsA<Actor>>(&self, actor: &P) -> Option<ChildMeta>
[src]
Retrieves the ChildMeta
which contains the data about the
self
specific state for actor
.
actor
a Actor
that is a child of self
.
Returns
the ChildMeta
for the actor
child
of self
or None
if the specifiec actor does not exist or the
container is not configured to provide ChildMeta
s
fn connect_actor_added<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
The ::actor-added signal is emitted each time an actor
has been added to container
.
actor
the new child that has been added to container
fn connect_actor_removed<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
The ::actor-removed signal is emitted each time an actor
is removed from container
.
actor
the child that has been removed from container
fn connect_child_notify<F: Fn(&Self, &Actor, &ParamSpec) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Container>> ContainerExt for O
[src]
fn child_get_property<P: IsA<Actor>>(
&self,
child: &P,
property: &str,
value: &mut Value
)
[src]
&self,
child: &P,
property: &str,
value: &mut Value
)
fn child_set_property<P: IsA<Actor>>(
&self,
child: &P,
property: &str,
value: &Value
)
[src]
&self,
child: &P,
property: &str,
value: &Value
)
fn create_child_meta<P: IsA<Actor>>(&self, actor: &P)
[src]
fn destroy_child_meta<P: IsA<Actor>>(&self, actor: &P)
[src]
fn find_child_by_name(&self, child_name: &str) -> Option<Actor>
[src]
fn get_child_meta<P: IsA<Actor>>(&self, actor: &P) -> Option<ChildMeta>
[src]
fn connect_actor_added<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_actor_removed<F: Fn(&Self, &Actor) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_child_notify<F: Fn(&Self, &Actor, &ParamSpec) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId