~ubuntu-branches/ubuntu/natty/pygtk/natty-proposed

« back to all changes in this revision

Viewing changes to docs/html/class-gtkcolorbutton.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-06-22 16:49:42 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090622164942-19zeltp4z0u5iw72
Tags: 2.15.2-0ubuntu1
* New upstream version:
  - Rename gtk.Statusbar.remove() to gtk.Statusbar.remove_message
  - Allow pango.Context creation 
  - Make gtk.gdk.Pixbuf.add_alpha accept integers, retaining backward
    compatibility accepting also chars 
  - Protect window obj from GC in gtk.window_get_toplevels 
  - Plug huge number of memory leaks in Pango wrappers 
  - Add gtk.gdk.WINDOWING constant 
  - Wrap gdk_pixbuf_apply_embedded_orientation 
  - Modernize constructors of seven more types 
  - Don't free a string we don't own 
  - Some docs tweaking 
* debian/control.in:
  - set vcs location
* debian/patches/02_fix_get_application_info_crash.patch:
  - the change is in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.ColorButton</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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-gtkclipboard.html" title="gtk.Clipboard"><link rel="next" href="class-gtkcolorselection.html" title="gtk.ColorSelection"></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.ColorButton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkclipboard.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkcolorselection.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkcolorbutton"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.ColorButton</h2><p>gtk.ColorButton — a button to launch a
2
 
    color selection dialog (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3427298"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ColorButton</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkbutton.html" title="gtk.Button">gtk.Button</a></span></span>):
3
 
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#constructor-gtkcolorbutton" title="Constructor">gtk.ColorButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span><span class="initializer">=gtk.gdk.Color(0,0,0)</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--set-color" title="gtk.ColorButton.set_color">set_color</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--get-color" title="gtk.ColorButton.get_color">get_color</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--set-alpha" title="gtk.ColorButton.set_alpha">set_alpha</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>alpha</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--get-alpha" title="gtk.ColorButton.get_alpha">get_alpha</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--set-use-alpha" title="gtk.ColorButton.set_use_alpha">set_use_alpha</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_alpha</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--get-use-alpha" title="gtk.ColorButton.get_use_alpha">get_use_alpha</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--set-title" title="gtk.ColorButton.set_title">set_title</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>title</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--get-title" title="gtk.ColorButton.get_title">get_title</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3427514"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
 
2
    color selection dialog (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3628132"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ColorButton</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkbutton.html" title="gtk.Button">gtk.Button</a></span></span>):
 
3
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#constructor-gtkcolorbutton" title="Constructor">gtk.ColorButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span><span class="initializer">=gtk.gdk.Color(0,0,0)</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--set-color" title="gtk.ColorButton.set_color">set_color</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--get-color" title="gtk.ColorButton.get_color">get_color</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--set-alpha" title="gtk.ColorButton.set_alpha">set_alpha</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>alpha</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--get-alpha" title="gtk.ColorButton.get_alpha">get_alpha</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--set-use-alpha" title="gtk.ColorButton.set_use_alpha">set_use_alpha</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_alpha</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--get-use-alpha" title="gtk.ColorButton.get_use_alpha">get_use_alpha</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--set-title" title="gtk.ColorButton.set_title">set_title</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>title</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorbutton.html#method-gtkcolorbutton--get-title" title="gtk.ColorButton.get_title">get_title</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3628348"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
4
4
  +-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
5
5
    +-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
6
6
      +-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
7
7
        +-- <a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
8
8
          +-- <a class="link" href="class-gtkbutton.html" title="gtk.Button">gtk.Button</a>
9
9
            +-- <a class="link" href="class-gtkcolorbutton.html" title="gtk.ColorButton">gtk.ColorButton</a>
10
 
</pre></div><div class="refsect1" lang="en"><a name="id3427562"></a><h2>Implemented Interfaces</h2><p>
 
10
</pre></div><div class="refsect1" lang="en"><a name="id3628396"></a><h2>Implemented Interfaces</h2><p>
11
11
                        <a class="link" href="class-gtkcolorbutton.html" title="gtk.ColorButton"><code class="classname">gtk.ColorButton</code></a>
12
12
                        implements 
13
13
                        <a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
16
16
              GTK+ 2.4 and above.</td></tr><tr valign="top"><td valign="top">"use-alpha"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the color swatch on the
17
17
              button is rendered against a checkerboard background to show
18
18
              its opacity and the opacity slider is displayed in the color
19
 
              selection dialog. Available in GTK+ 2.4 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtkcolorbutton"></a><h2>gtk.ColorButton Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p><p><a class="link" href="class-gtkbutton.html#style-properties-gtkbutton" title="gtk.Button Style Properties">gtk.Button Style Properties</a></p></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkcolorbutton"></a><h2>gtk.ColorButton Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><p><a class="link" href="class-gtkbutton.html#signal-prototypes-gtkbutton" title="gtk.Button Signal Prototypes">gtk.Button Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkcolorbutton.html#signal-gtkcolorbutton--color-set" title='The "color-set" gtk.ColorButton Signal'>color-set</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>colorbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3427846"></a><h2>Description</h2><p>The <a class="link" href="class-gtkcolorbutton.html" title="gtk.ColorButton"><code class="classname">gtk.ColorButton</code></a>
 
19
              selection dialog. Available in GTK+ 2.4 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtkcolorbutton"></a><h2>gtk.ColorButton Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p><p><a class="link" href="class-gtkbutton.html#style-properties-gtkbutton" title="gtk.Button Style Properties">gtk.Button Style Properties</a></p></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkcolorbutton"></a><h2>gtk.ColorButton Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><p><a class="link" href="class-gtkbutton.html#signal-prototypes-gtkbutton" title="gtk.Button Signal Prototypes">gtk.Button Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkcolorbutton.html#signal-gtkcolorbutton--color-set" title='The "color-set" gtk.ColorButton Signal'>color-set</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>colorbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3628681"></a><h2>Description</h2><p>The <a class="link" href="class-gtkcolorbutton.html" title="gtk.ColorButton"><code class="classname">gtk.ColorButton</code></a>
20
20
    is a button that displays the currently selected color and, when
21
21
    clicked, opens a <a class="link" href="class-gtkcolorselectiondialog.html" title="gtk.ColorSelectionDialog"><code class="classname">gtk.ColorSelectionDialog</code></a>
22
22
    to change the color. It's a suitable widget for selecting a color in a
27
27
swatch representing the current selected color. When the button is clicked,
28
28
a <a class="link" href="class-gtkcolorselectiondialog.html" title="gtk.ColorSelectionDialog"><code class="classname">gtk.ColorSelectionDialog</code></a>
29
29
will open, allowing the user to select a color. The swatch will be updated
30
 
to reflect the new color the user selects.</p></div><div class="refsect1" lang="en"><a name="id3427986"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkcolorbutton--set-color"></a><h3>gtk.ColorButton.set_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></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>color</code></strong> :</span></p></td><td>A <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> to set the current color with.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_color</code>() method sets the current
 
30
to reflect the new color the user selects.</p></div><div class="refsect1" lang="en"><a name="id3628820"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkcolorbutton--set-color"></a><h3>gtk.ColorButton.set_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_color</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>color</code></strong></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>color</code></strong> :</span></p></td><td>A <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> to set the current color with.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_color</code>() method sets the current
31
31
      color (and the "color" property) to the color specified by the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
32
32
      <em class="parameter"><code>color</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorbutton--get-color"></a><h3>gtk.ColorButton.get_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_color</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>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
33
33
          specifying the current color.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_color</code>() method returns the
52
52
      for the color selection dialog to the string contained in
53
53
      <em class="parameter"><code>title</code></em>. The "title" property is also set. </p></div><div class="refsect2" lang="en"><a name="method-gtkcolorbutton--get-title"></a><h3>gtk.ColorButton.get_title</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_title</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 title of the <a class="link" href="class-gtkcolorselectiondialog.html" title="gtk.ColorSelectionDialog"><code class="classname">gtk.ColorSelectionDialog</code></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_title</code>() method returns the
54
54
      value of the "title" property that contains the title of the color
55
 
      selection dialog.</p></div></div><div class="refsect1" lang="en"><a name="id3428587"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkcolorbutton--color-set"></a><h3>The "color-set" gtk.ColorButton Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>colorbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</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"><em class="parameter"><code>colorbutton</code></em> :</span></p></td><td>the colorbutton that received the
 
55
      selection dialog.</p></div></div><div class="refsect1" lang="en"><a name="id3629421"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkcolorbutton--color-set"></a><h3>The "color-set" gtk.ColorButton Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>colorbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</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"><em class="parameter"><code>colorbutton</code></em> :</span></p></td><td>the colorbutton that received the
56
56
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
57
57
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
58
58
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if