/usr/share/gtk-doc/html/pygtk/class-gtkactivatable.html is in python-gtk2-doc 2.24.0-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Activatable</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkactiongroup.html" title="gtk.ActionGroup"><link rel="next" href="class-gtkadjustment.html" title="gtk.Adjustment"></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">gtk.Activatable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkactiongroup.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkadjustment.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Activatable"><a name="class-gtkactivatable"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Activatable</h2><p>gtk.Activatable — An interface for activatable widgets.</p></div><div class="refsect1" title="Synopsis"><a name="id3241222"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Activatable</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-ginterface">gobject.GInterface</PYGTKDOCLINK></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--do-set-related-action" title="gtk.Activatable.do_set_related_action">do_set_related_action</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>action</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--get-related-action" title="gtk.Activatable.get_related_action">get_related_action</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--get-use-action-appearence" title="gtk.Activatable.get_use_action_appearence">get_use_action_appearence</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--set-related-action" title="gtk.Activatable.set_related_action">set_related_action</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>action</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--set-use-action-appearence" title="gtk.Activatable.set_use_action_appearence">set_use_action_appearence</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_appearence</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--sync-action-properties" title="gtk.Activatable.sync_action_properties">sync_action_properties</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>action</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3016527"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-ginterface">gobject.GInterface</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkactivatable.html" title="gtk.Activatable">gtk.Activatable</a>
</pre></div><div class="refsect1" title="gtk.Activatable Properties"><a name="properties-gtkactivatable"></a><h2>gtk.Activatable Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"related-action"</td><td valign="top">Read/Write</td><td valign="top">
The action that this activatable will activate and receive updates from for various states and possibly appearance.
Note: <a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
implementors need to handle the "related-action" property and call
<code class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--do-set-related-action" title="gtk.Activatable.do_set_related_action">gtk.Activatable.do_set_related_action</a></code>()
when it changes. This property is available in GTK+ 2.16 and above.
</td></tr><tr valign="top"><td valign="top">"use-action-appearance"</td><td valign="top">Read/Write</td><td valign="top">
Whether this activatable should reset its layout and appearance when setting the related
action or when the action changes appearance.
See the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> documentation
directly to find which properties should be ignored by the
<a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
when this property is <code class="literal">False</code>.
Note: <a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
implementors need to handle the "related-action" property and call
<code class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--do-set-related-action" title="gtk.Activatable.do_set_related_action">gtk.Activatable.do_set_related_action</a></code>()
when it changes. Default value: <code class="literal">True</code>. This property is available in GTK+ 2.16 and above.
</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Known Implementation"><a name="id3146262"></a><h2>Known Implementation</h2><p>
<a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
is implementated by
<a class="link" href="class-gtktearoffmenuitem.html" title="gtk.TearoffMenuItem"><code class="classname">gtk.TearoffMenuItem</code></a>,
<a class="link" href="class-gtkoptionmenu.html" title="gtk.OptionMenu"><code class="classname">gtk.OptionMenu</code></a>,
<a class="link" href="class-gtklinkbutton.html" title="gtk.LinkButton"><code class="classname">gtk.LinkButton</code></a>,
<a class="link" href="class-gtkradiobutton.html" title="gtk.RadioButton"><code class="classname">gtk.RadioButton</code></a>,
<a class="link" href="class-gtkradiotoolbutton.html" title="gtk.RadioToolButton"><code class="classname">gtk.RadioToolButton</code></a>,
<a class="link" href="class-gtktogglebutton.html" title="gtk.ToggleButton"><code class="classname">gtk.ToggleButton</code></a>,
<a class="link" href="class-gtkseparatormenuitem.html" title="gtk.SeparatorMenuItem"><code class="classname">gtk.SeparatorMenuItem</code></a>,
<a class="link" href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><code class="classname">gtk.ImageMenuItem</code></a>,
<a class="link" href="class-gtkcheckbutton.html" title="gtk.CheckButton"><code class="classname">gtk.CheckButton</code></a>,
<a class="link" href="class-gtkradiomenuitem.html" title="gtk.RadioMenuItem"><code class="classname">gtk.RadioMenuItem</code></a>,
<a class="link" href="class-gtkbutton.html" title="gtk.Button"><code class="classname">gtk.Button</code></a>,
<a class="link" href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton"><code class="classname">gtk.MenuToolButton</code></a>,
<a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>,
<a class="link" href="class-gtkrecentchoosermenu.html" title="gtk.RecentChooserMenu"><code class="classname">gtk.RecentChooserMenu</code></a>,
<a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>,
<a class="link" href="class-gtkseparatortoolitem.html" title="gtk.SeparatorToolItem"><code class="classname">gtk.SeparatorToolItem</code></a>,
<a class="link" href="class-gtkcheckmenuitem.html" title="gtk.CheckMenuItem"><code class="classname">gtk.CheckMenuItem</code></a>,
<a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>,
<a class="link" href="class-gtkfontbutton.html" title="gtk.FontButton"><code class="classname">gtkFontButton.</code></a>,
<a class="link" href="class-gtkscalebutton.html" title="gtk.ScaleButton"><code class="classname">gtk.ScaleButton</code></a>,
<a class="link" href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"><code class="classname">gtk.ToggleToolButton</code></a>,
<a class="link" href="class-gtkvolumebutton.html" title="gtk.VolumeButton"><code class="classname">gtk.VolumeButton</code></a>,
<a class="link" href="class-gtkcolorbutton.html" title="gtk.ColorButton"><code class="classname">gtk.ColorButton</code></a>.
</p></div><div class="refsect1" title="Description"><a name="id3043699"></a><h2>Description</h2><p>
Activatable widgets can be connected to a
<a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
and reflects the state of its action. A GtkActivatable can also provide
feedback through its action, as they are responsible for activating their related actions.
</p><p>
When extending a class that is already <a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
it is only necessary to implement the
<code class="methodname"><PYGTKDOCLINK HREF="method-gtkactivatable--do-sync-action-properties">gtk.Activatable.do_sync_action_properties</PYGTKDOCLINK></code> and
<code class="methodname"><PYGTKDOCLINK HREF="method-gtkactivatable--do-update">gtk.Activatable.do_update</PYGTKDOCLINK></code>()
class methods and chain up to the parent implementation, however when introducing a new
<a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
class the "related-action" and "use-action-appearance" properties need to be handled by the implementor.
Handling these properties is mostly a matter of installing the action pointer and boolean flag on your instance,
and calling
<code class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--do-set-related-action" title="gtk.Activatable.do_set_related_action">gtk.Activatable.do_set_related_action</a></code>() and
<code class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--sync-action-properties" title="gtk.Activatable.sync_action_properties">gtk.Activatable.sync_action_properties</a></code>()
at the appropriate times.
</p></div><div class="refsect1" title="Methods"><a name="id3339025"></a><h2>Methods</h2><div class="refsect2" title="gtk.Activatable.do_set_related_action"><a name="method-gtkactivatable--do-set-related-action"></a><h3>gtk.Activatable.do_set_related_action</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">do_set_related_action</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>action</code></strong> :</span></p></td><td>
the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> to set.
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
The <code class="methodname">do_set_related_action</code>() method is an
utility function for
<a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
implementors.
</p><p>
When implementing <a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
you must call this when handling changes of the "related-action", and you must also
use this to break references in GObject->dispose().
</p><p>
This function adds a reference to the currently set related action for you,
it also makes sure the GtkActivatable->update() method is called when the related
<a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
properties change and registers to the action's proxy list.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
Be careful to call this before setting the local copy of the
<a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
property, since this function uses
<code class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--get-related-action" title="gtk.Activatable.get_related_action">gtk.Activatable.get_related_action</a></code>()
to retrieve the previous action
</div></div><div class="refsect2" title="gtk.Activatable.get_related_action"><a name="method-gtkactivatable--get-related-action"></a><h3>gtk.Activatable.get_related_action</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_related_action</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the related <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
if one is set. </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
The <code class="methodname">get_related_action</code>() method gets the related
<a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> for activatable.
</p></div><div class="refsect2" title="gtk.Activatable.get_use_action_appearence"><a name="method-gtkactivatable--get-use-action-appearence"></a><h3>gtk.Activatable.get_use_action_appearence</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_use_action_appearence</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>whether activatable uses its actions appearance.
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
The <code class="methodname">get_use_action_appearence</code>() method gets whether
this activatable should reset its layout and appearance when setting the
related action or when the action changes appearance.
</p></div><div class="refsect2" title="gtk.Activatable.set_related_action"><a name="method-gtkactivatable--set-related-action"></a><h3>gtk.Activatable.set_related_action</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_related_action</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>action</code></strong> :</span></p></td><td>the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> to set.
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
implementors need to handle the "related-action" property and call
<code class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--do-set-related-action" title="gtk.Activatable.do_set_related_action">gtk.Activatable.do_set_related_action</a></code>()
when it changes.
</div><p>
The <code class="methodname">set_related_action</code>() method sets the related action on the activatable object.
</p></div><div class="refsect2" title="gtk.Activatable.set_use_action_appearence"><a name="method-gtkactivatable--set-use-action-appearence"></a><h3>gtk.Activatable.set_use_action_appearence</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_use_action_appearence</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>use_appearence</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>use_appearence</code></strong> :</span></p></td><td>whether to use the actions appearance.
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><a class="link" href="class-gtkactivatable.html" title="gtk.Activatable"><code class="classname">gtk.Activatable</code></a>
implementors need to handle the "related-action" property and call
<code class="methodname"><a class="link" href="class-gtkactivatable.html#method-gtkactivatable--do-set-related-action" title="gtk.Activatable.do_set_related_action">gtk.Activatable.do_set_related_action</a></code>()
when it changes.
</div><p>
The <code class="methodname">set_use_action_appearence</code>() method sets whether
this activatable should reset its layout and appearance when setting the
related action or when the action changes appearance
</p></div><div class="refsect2" title="gtk.Activatable.sync_action_properties"><a name="method-gtkactivatable--sync-action-properties"></a><h3>gtk.Activatable.sync_action_properties</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">sync_action_properties</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>action</code></strong> :</span></p></td><td>the related <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
or <code class="literal">None</code>
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
The <code class="methodname">set_use_action_appearence</code>() method is called to
update the activatable completely, this is called internally when the "related-action"
property is set or unset and by the implementing class when "use-action-appearance" changes.
</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-gtkactiongroup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkadjustment.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.ActionGroup </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Adjustment</td></tr></table></div></body></html>
|