| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>atk.StateSet</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="atk-class-reference.html" title="The atk Class Reference"><link rel="prev" href="class-atkselection.html" title="atk.Selection"><link rel="next" href="class-atkstreamablecontent.html" title="atk.StreamableContent"></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">atk.StateSet</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-atkselection.html">Prev</a>Â </td><th width="60%" align="center">The atk Class Reference</th><td width="20%" align="right">Â <a accesskey="n" href="class-atkstreamablecontent.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-atkstateset"></a><div class="titlepage"></div><div class="refnamediv"><h2>atk.StateSet</h2><p>atk.StateSet â an <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a> |
|---|
| 2 | determines a component's state set.</p></div><div class="refsect1" lang="en"><a name="id2601082"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">atk.StateSet</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>): |
|---|
| 3 | <code class="constructorsynopsis"> <span class="methodname"><a href="class-atkstateset.html#constructor-atkstateset" title="atk.StateSet">atk.StateSet</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--is-empty" title="atk.StateSet.is_empty">is_empty</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--add-state" title="atk.StateSet.add_state">add_state</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--add-states" title="atk.StateSet.add_states">add_states</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--clear-states" title="atk.StateSet.clear_states">clear_states</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--contains-state" title="atk.StateSet.contains_state">contains_state</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--contains-states" title="atk.StateSet.contains_states">contains_states</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--remove-state" title="atk.StateSet.remove_state">remove_state</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--and-sets" title="atk.StateSet.and_sets">and_sets</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>compare_set</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--or-sets" title="atk.StateSet.or_sets">or_sets</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>compare_set</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#method-atkstateset--xor-sets" title="atk.StateSet.xor_sets">xor_sets</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>compare_set</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting"> |
|---|
| 4 | <span class="bold"><strong>Functions</strong></span> |
|---|
| 5 | |
|---|
| 6 | <code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#function-atk--state-type-register" title="atk.state_type_register">atk.state_type_register</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#function-atk--state-type-get-name" title="atk.state_type_get_name">atk.state_type_get_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-atkstateset.html#function-atk--state-type-for-name" title="atk.state_type_for_name">atk.state_type_for_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre></div><div class="refsect1" lang="en"><a name="id2585615"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK> |
|---|
| 7 | +-- <a href="class-atkstateset.html" title="atk.StateSet">atk.StateSet</a> |
|---|
| 8 | </pre></div><div class="refsect1" lang="en"><a name="signal-prototypes-atkstateset"></a><h2>atk.StateSet Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p></div><div class="refsect1" lang="en"><a name="id2600609"></a><h2>Description</h2><p>An <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a> |
|---|
| 9 | determines a component's state set. It is composed of a set of ATK |
|---|
| 10 | states specified using the <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a>.</p></div><div class="refsect1" lang="en"><a name="id2589131"></a><h2>Constructor</h2><div class="refsect2" lang="en"><a name="constructor-atkstateset"></a><h3>atk.StateSet</h3><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">atk.StateSet</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a></td></tr></tbody></table><p>Creates a new empty state set.</p></div></div><div class="refsect1" lang="en"><a name="id2592809"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-atkstateset--is-empty"></a><h3>atk.StateSet.is_empty</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_empty</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td><code class="literal">True</code> if the set has no |
|---|
| 11 | states set, otherwise |
|---|
| 12 | <code class="literal">False</code></td></tr></tbody></table><p>Checks whether the state set is empty, i.e. has no states |
|---|
| 13 | set.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--add-state"></a><h3>atk.StateSet.add_state</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_state</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>type</code></strong>Â :</span></td><td>one of the <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td><code class="literal">True</code> if the state for |
|---|
| 14 | <em class="parameter"><code>type</code></em> is not already in the |
|---|
| 15 | set.</td></tr></tbody></table><p>Add a new state for the specified type to the current state set |
|---|
| 16 | if it is not already present.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--add-states"></a><h3>atk.StateSet.add_states</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_states</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>types</code></strong>Â :</span></td><td>a sequence of <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a>.</td></tr></tbody></table><p>Add the states for the specified types to the current state |
|---|
| 17 | set.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--clear-states"></a><h3>atk.StateSet.clear_states</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear_states</span>(<span class="methodparam"></span>)</code></pre><p>Removes all states from the state set.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--contains-state"></a><h3>atk.StateSet.contains_state</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">contains_state</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>type</code></strong>Â :</span></td><td>one of the <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td><code class="literal">True</code> if |
|---|
| 18 | <em class="parameter"><code>type</code></em> is the state type is in the |
|---|
| 19 | set.</td></tr></tbody></table><p>Checks whether the state for the specified type is in the |
|---|
| 20 | specified set.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--contains-states"></a><h3>atk.StateSet.contains_states</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">contains_states</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>types</code></strong>Â :</span></td><td>a sequence of <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td><code class="literal">True</code> if all the states in |
|---|
| 21 | <em class="parameter"><code>types</code></em> are in the set.</td></tr></tbody></table><p>Checks whether the states for all the specified types are in the |
|---|
| 22 | specified set.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--remove-state"></a><h3>atk.StateSet.remove_state</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_state</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>type</code></strong>Â :</span></td><td>one of the <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td><code class="literal">True</code> if |
|---|
| 23 | <em class="parameter"><code>type</code></em> was in the set.</td></tr></tbody></table><p>Removes the state for the specified type from the state |
|---|
| 24 | set.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--and-sets"></a><h3>atk.StateSet.and_sets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">and_sets</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>compare_set</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>compare_set</code></strong>Â :</span></td><td>another <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a> |
|---|
| 25 | which is the intersection of the two sets.</td></tr></tbody></table><p>Constructs the intersection of the two sets, returning |
|---|
| 26 | <code class="literal">None</code> if the intersection is empty.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--or-sets"></a><h3>atk.StateSet.or_sets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">or_sets</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>compare_set</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>compare_set</code></strong>Â :</span></td><td>another <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a> |
|---|
| 27 | which is the union of the two sets, returning |
|---|
| 28 | <code class="literal">None</code> is empty.</td></tr></tbody></table><p>Constructs the union of the two sets.</p></div><div class="refsect2" lang="en"><a name="method-atkstateset--xor-sets"></a><h3>atk.StateSet.xor_sets</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">xor_sets</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>compare_set</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>compare_set</code></strong>Â :</span></td><td>another <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new <a href="class-atkstateset.html" title="atk.StateSet"><code class="classname">atk.StateSet</code></a> |
|---|
| 29 | which contains the states which are in exactly one of the two |
|---|
| 30 | sets.</td></tr></tbody></table><p>Constructs the exclusive-or of the two sets, returning |
|---|
| 31 | <code class="literal">None</code> is empty. The set returned by this operation |
|---|
| 32 | contains the states in exactly one of the two sets.</p></div></div><div class="refsect1" lang="en"><a name="id2589107"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-atk--state-type-register"></a><h3>atk.state_type_register</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">atk.state_type_register</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>name</code></strong>Â :</span></td><td>a character string describing the new |
|---|
| 33 | state.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new state type value for the new |
|---|
| 34 | state.</td></tr></tbody></table><p>Registers a new object state and adds it to the <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a>.</p></div><div class="refsect2" lang="en"><a name="function-atk--state-type-get-name"></a><h3>atk.state_type_get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">atk.state_type_get_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>type</code></strong>Â :</span></td><td>one of the <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the string describing the state |
|---|
| 35 | type</td></tr></tbody></table><p>Gets the description string describing the state type specified |
|---|
| 36 | by<em class="parameter"><code>type</code></em>.</p></div><div class="refsect2" lang="en"><a name="function-atk--state-type-for-name"></a><h3>atk.state_type_for_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">atk.state_type_for_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>name</code></strong>Â :</span></td><td>a character string state |
|---|
| 37 | name</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>one of the <a href="atk-constants.html#atk-state-type-constants">Atk State Type Constants</a>.</td></tr></tbody></table><p>Gets the state type corresponding to the description string |
|---|
| 38 | <em class="parameter"><code>name</code></em>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-atkselection.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="atk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-atkstreamablecontent.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">atk.Selection </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> atk.StreamableContent</td></tr></table></div></body></html> |
|---|