Blob Blame History Raw
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Chapter 2. Actors</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="The Clutter Cookbook"><link rel="up" href="index.html" title="The Clutter Cookbook"><link rel="prev" href="ch01s04.html" title="4. Where to get Clutter"><link rel="next" href="actors-composite.html" title="2. Implementing a simple custom actor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Actors</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s04.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="actors-composite.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="actors"></a>Chapter 2. Actors</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="actors.html#actors-introduction">1. Introduction</a></span></dt><dt><span class="section"><a href="actors-composite.html">2. Implementing a simple custom actor</a></span></dt><dd><dl><dt><span class="section"><a href="actors-composite.html#actors-composite-problem">2.1. Problem</a></span></dt><dt><span class="section"><a href="actors-composite.html#actors-composite-solution">2.2. Solution</a></span></dt><dt><span class="section"><a href="actors-composite.html#actors-composite-discussion">2.3. Discussion</a></span></dt></dl></dd><dt><span class="section"><a href="actors-allocation-notify.html">3. Knowing when an actor's position or size changes</a></span></dt><dd><dl><dt><span class="section"><a href="actors-allocation-notify.html#idm140200513279152">3.1. Problem</a></span></dt><dt><span class="section"><a href="actors-allocation-notify.html#idm140200513277664">3.2. Solution</a></span></dt><dt><span class="section"><a href="actors-allocation-notify.html#idm140200513268416">3.3. Discussion</a></span></dt></dl></dd><dt><span class="section"><a href="actors-paint-wrappers.html">4. Overriding the paint sequence</a></span></dt><dd><dl><dt><span class="section"><a href="actors-paint-wrappers.html#idm140200513255776">4.1. Problem</a></span></dt><dt><span class="section"><a href="actors-paint-wrappers.html#idm140200513254464">4.2. Solution</a></span></dt><dt><span class="section"><a href="actors-paint-wrappers.html#idm140200513246800">4.3. Discussion</a></span></dt></dl></dd><dt><span class="section"><a href="actors-opacity.html">5. Making an actor transparent by changing its opacity</a></span></dt><dd><dl><dt><span class="section"><a href="actors-opacity.html#idm140200513238560">5.1. Problem</a></span></dt><dt><span class="section"><a href="actors-opacity.html#idm140200513237248">5.2. Solution</a></span></dt><dt><span class="section"><a href="actors-opacity.html#idm140200513233392">5.3. Discussion</a></span></dt></dl></dd><dt><span class="section"><a href="actors-non-rectangular.html">6. Creating an actor with a non-rectangular shape</a></span></dt><dd><dl><dt><span class="section"><a href="actors-non-rectangular.html#idm140200513185968">6.1. Problem</a></span></dt><dt><span class="section"><a href="actors-non-rectangular.html#idm140200513184096">6.2. Solution</a></span></dt><dt><span class="section"><a href="actors-non-rectangular.html#idm140200513175280">6.3. Discussion</a></span></dt></dl></dd></dl></div><div class="epigraph"><p>An actor's a guy who if you ain't talkin' about him, ain't
    listening.</p><div class="attribution"><span>—<span class="attribution">Edmon Gween, actor, on his deathbed</span></span></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="actors-introduction"></a>1. Introduction</h2></div></div></div><p>When building a User Interface with Clutter, the visible part
    of the UI — that is, what is displayed on the screen — is
    commonly referred to as "the scene graph". Like every graph, a scene
    graph is composed by nodes.</p><p>Every node on the Clutter scene graph is an
    <span class="emphasis"><em>actor</em></span>. Every actor has a single relationship
    with the others: it can be the parent of another actor, or a child of
    another actor.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>The stage is an actor that can have children but cannot have
    any parent.</p></div><p>Actors have different attributes: a position, a size, a
    scale factor, a rotation angle on each axis (relative to a specific
    center on the normal plane for that axis), an opacity factor.</p><p>The scene graph is not fixed: it can be changed, not only
    by adding or removing actors, but also by changing the parent-child
    relationship: it is possible, for instance, to move an entire
    section of the scene graph from one parent actor to another.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s04.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="actors-composite.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4. Where to get Clutter </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2. Implementing a simple custom actor</td></tr></table></div></body></html>