Trait ux::ContainerExt [−][src]
pub trait ContainerExt: 'static { pub fn child_get_property<P>(
&self,
child: &P,
property: &str,
value: &mut Value
)
where
P: IsA<Actor>; pub fn child_set_property<P>(
&self,
child: &P,
property: &str,
value: &Value
)
where
P: IsA<Actor>; pub fn create_child_meta<P>(&self, actor: &P)
where
P: IsA<Actor>; pub fn destroy_child_meta<P>(&self, actor: &P)
where
P: IsA<Actor>; pub fn find_child_by_name(&self, child_name: &str) -> Option<Actor>; pub fn get_child_meta<P>(&self, actor: &P) -> Option<ChildMeta>
where
P: IsA<Actor>; pub fn connect_actor_added<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor); pub fn connect_actor_removed<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor); pub fn connect_child_notify<F>(&self, f: F) -> SignalHandlerId
where
F: 'static + Fn(&Self, &Actor, &ParamSpec); }
Trait containing all Container
methods.
Implementors
Actor
, Box
, Clone
, Container
, Group
, Rectangle
, ScrollActor
, Stage
, Text
, Texture
Required methods
pub fn child_get_property<P>(
&self,
child: &P,
property: &str,
value: &mut Value
) where
P: IsA<Actor>,
[src]
&self,
child: &P,
property: &str,
value: &mut Value
) where
P: IsA<Actor>,
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.
pub fn child_set_property<P>(&self, child: &P, property: &str, value: &Value) where
P: IsA<Actor>,
[src]
P: IsA<Actor>,
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.
pub fn create_child_meta<P>(&self, actor: &P) where
P: IsA<Actor>,
[src]
P: IsA<Actor>,
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
pub fn destroy_child_meta<P>(&self, actor: &P) where
P: IsA<Actor>,
[src]
P: IsA<Actor>,
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
pub 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.
pub fn get_child_meta<P>(&self, actor: &P) -> Option<ChildMeta> where
P: IsA<Actor>,
[src]
P: IsA<Actor>,
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
pub fn connect_actor_added<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor),
[src]
F: 'static + Fn(&Self, &Actor),
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
pub fn connect_actor_removed<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor),
[src]
F: 'static + Fn(&Self, &Actor),
The ::actor-removed signal is emitted each time an actor
is removed from container
.
actor
the child that has been removed from container
pub fn connect_child_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&Self, &Actor, &ParamSpec),
[src]
F: 'static + Fn(&Self, &Actor, &ParamSpec),
Implementors
impl<O> ContainerExt for O where
O: IsA<Container>,
[src]
impl<O> ContainerExt for O where
O: IsA<Container>,
[src]pub fn child_get_property<P>(
&self,
child: &P,
property: &str,
value: &mut Value
) where
P: IsA<Actor>,
[src]
&self,
child: &P,
property: &str,
value: &mut Value
) where
P: IsA<Actor>,
pub fn child_set_property<P>(&self, child: &P, property: &str, value: &Value) where
P: IsA<Actor>,
[src]
P: IsA<Actor>,
pub fn create_child_meta<P>(&self, actor: &P) where
P: IsA<Actor>,
[src]
P: IsA<Actor>,
pub fn destroy_child_meta<P>(&self, actor: &P) where
P: IsA<Actor>,
[src]
P: IsA<Actor>,
pub fn find_child_by_name(&self, child_name: &str) -> Option<Actor>
[src]
pub fn get_child_meta<P>(&self, actor: &P) -> Option<ChildMeta> where
P: IsA<Actor>,
[src]
P: IsA<Actor>,
pub fn connect_actor_added<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor),
[src]
F: 'static + Fn(&O, &Actor),
pub fn connect_actor_removed<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor),
[src]
F: 'static + Fn(&O, &Actor),
pub fn connect_child_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, &Actor, &ParamSpec),
[src]
F: 'static + Fn(&O, &Actor, &ParamSpec),