mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 16:34:10 +00:00
docs: Add an example to the Actor description
This commit is contained in:
parent
341faaa089
commit
5974cfc97b
@ -71,6 +71,27 @@
|
|||||||
* will hold a reference on each child actor, which will be released when
|
* will hold a reference on each child actor, which will be released when
|
||||||
* the child is removed from its parent, or destroyed using
|
* the child is removed from its parent, or destroyed using
|
||||||
* clutter_actor_destroy().</para>
|
* clutter_actor_destroy().</para>
|
||||||
|
* <informalexample><programlisting>
|
||||||
|
* ClutterActor *actor = clutter_actor_new ();
|
||||||
|
*
|
||||||
|
* /* set the bounding box of the actor */
|
||||||
|
* clutter_actor_set_position (actor, 0, 0);
|
||||||
|
* clutter_actor_set_size (actor, 480, 640);
|
||||||
|
*
|
||||||
|
* /* set the background color of the actor */
|
||||||
|
* clutter_actor_set_background_color (actor, CLUTTER_COLOR_Orange);
|
||||||
|
*
|
||||||
|
* /* set the bounding box of the child, relative to the parent */
|
||||||
|
* ClutterActor *child = clutter_actor_new ();
|
||||||
|
* clutter_actor_set_position (child, 20, 20);
|
||||||
|
* clutter_actor_set_size (child, 80, 240);
|
||||||
|
*
|
||||||
|
* /* set the background color of the child */
|
||||||
|
* clutter_actor_set_background_color (child, CLUTTER_COLOR_Blue);
|
||||||
|
*
|
||||||
|
* /* add the child to the actor */
|
||||||
|
* clutter_actor_add_child (actor, child);
|
||||||
|
* </programlisting></informalexample>
|
||||||
* <para>Children can be inserted at a given index, or above and below
|
* <para>Children can be inserted at a given index, or above and below
|
||||||
* another child actor. The order of insertion determines the order of the
|
* another child actor. The order of insertion determines the order of the
|
||||||
* children when iterating over them. Iterating over children is performed
|
* children when iterating over them. Iterating over children is performed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user