File: class-gtkcolorselection.html

package info (click to toggle)
pygtk 2.12.1-6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 25,776 kB
  • ctags: 8,213
  • sloc: xml: 168,600; python: 14,328; sh: 9,131; ansic: 2,724; makefile: 1,141
file content (96 lines) | stat: -rw-r--r-- 31,380 bytes parent folder | download
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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.ColorSelection</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-gtkcolorbutton.html" title="gtk.ColorButton"><link rel="next" href="class-gtkcolorselectiondialog.html" title="gtk.ColorSelectionDialog"></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.ColorSelection</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkcolorbutton.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkcolorselectiondialog.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkcolorselection"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.ColorSelection</h2><p>gtk.ColorSelection — a widget used to select a color.</p></div><div class="refsect1" lang="en"><a name="id3266256"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ColorSelection</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkvbox.html" title="gtk.VBox">gtk.VBox</a></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtkcolorselection.html#constructor-gtkcolorselection" title="Constructor">gtk.ColorSelection</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--get-has-opacity-control" title="gtk.ColorSelection.get_has_opacity_control">get_has_opacity_control</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--set-has-opacity-control" title="gtk.ColorSelection.set_has_opacity_control">set_has_opacity_control</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>has_opacity</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--get-has-palette" title="gtk.ColorSelection.get_has_palette">get_has_palette</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--set-has-palette" title="gtk.ColorSelection.set_has_palette">set_has_palette</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>has_palette</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--set-current-color" title="gtk.ColorSelection.set_current_color">set_current_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-gtkcolorselection.html#method-gtkcolorselection--set-current-alpha" title="gtk.ColorSelection.set_current_alpha">set_current_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-gtkcolorselection.html#method-gtkcolorselection--get-current-color" title="gtk.ColorSelection.get_current_color">get_current_color</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--get-current-alpha" title="gtk.ColorSelection.get_current_alpha">get_current_alpha</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--set-previous-color" title="gtk.ColorSelection.set_previous_color">set_previous_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-gtkcolorselection.html#method-gtkcolorselection--set-previous-alpha" title="gtk.ColorSelection.set_previous_alpha">set_previous_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-gtkcolorselection.html#method-gtkcolorselection--get-previous-color" title="gtk.ColorSelection.get_previous_color">get_previous_color</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--get-previous-alpha" title="gtk.ColorSelection.get_previous_alpha">get_previous_alpha</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--is-adjusting" title="gtk.ColorSelection.is_adjusting">is_adjusting</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>

<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#function-gtk--color-selection-palette-from-string" title="gtk.color_selection_palette_from_string">gtk.color_selection_palette_from_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkcolorselection.html#function-gtk--color-selection-palette-to-string" title="gtk.color_selection_palette_to_string">gtk.color_selection_palette_to_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>colors</code></strong></span></span>)</code></pre></div><div class="refsect1" lang="en"><a name="id3266627"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
  +--<a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
    +-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
      +-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
        +-- <a class="link" href="class-gtkbox.html" title="gtk.Box">gtk.Box</a>
          +-- <a class="link" href="class-gtkvbox.html" title="gtk.VBox">gtk.VBox</a>
            +-- <a class="link" href="class-gtkcolorselection.html" title="gtk.ColorSelection">gtk.ColorSelection</a>
</pre></div><div class="refsect1" lang="en"><a name="id3266675"></a><h2>Implemented Interfaces</h2><p>
			<a class="link" href="class-gtkcolorselection.html" title="gtk.ColorSelection"><code class="classname">gtk.ColorSelection</code></a>
			implements 
			<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
		</p></div><div class="refsect1" lang="en"><a name="properties-gtkcolorselection"></a><h2>gtk.ColorSelection Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><p><a class="link" href="class-gtkbox.html#properties-gtkbox" title="gtk.Box Properties">gtk.Box Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"current-alpha"</td><td valign="top">Read/Write</td><td valign="top">The current opacity value (0 fully transparent, 65535 fully
              opaque)</td></tr><tr valign="top"><td valign="top">"current-color"</td><td valign="top">Read/Write</td><td valign="top">The current color as a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr><tr valign="top"><td valign="top">"has-opacity-control"</td><td valign="top">Read/Write</td><td valign="top">If <code class="literal">True</code>, the color selector should allow
              setting opacity</td></tr><tr valign="top"><td valign="top">"has-palette"</td><td valign="top">Read/Write</td><td valign="top">If <code class="literal">True</code>, a palette should be used</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtkcolorselection"></a><h2>gtk.ColorSelection 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></div><div class="refsect1" lang="en"><a name="child-properties-gtkcolorselection"></a><h2>gtk.ColorSelection Child Properties</h2><p><a class="link" href="class-gtkbox.html#child-properties-gtkbox" title="gtk.Box Child Properties">gtk.Box Child Properties</a></p></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkcolorselection"></a><h2>gtk.ColorSelection 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><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-gtkcolorselection.html#signal-gtkcolorselection--color-changed" title='The "color-changed" gtk.ColorSelection Signal'>color-changed</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>colorselection</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="id3266970"></a><h2>Description</h2><p>The <a class="link" href="class-gtkcolorselection.html" title="gtk.ColorSelection"><code class="classname">gtk.ColorSelection</code></a> 
is a widget that is used to select a color. It consists of a color wheel and
entry boxes for color parameters such as hue, saturation, value, red, green,
blue, and color name and optionally an opacity control and/or a color
palette. It is found on the standard color selection dialog box <a class="link" href="class-gtkcolorselectiondialog.html" title="gtk.ColorSelectionDialog"><code class="classname">gtk.ColorSelectionDialog</code></a>. 
The color wheel can be manipulated to set a new color or new entries can be
made in the entry boxes. The new color is displayed next to the previous
color. An eyedropper button is available to allow the selection of a color
from a pixel location on the display.</p></div><div class="refsect1" lang="en"><a name="constructor-gtkcolorselection"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.ColorSelection</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 new <a class="link" href="class-gtkcolorselection.html" title="gtk.ColorSelection"><code class="classname">gtk.ColorSelection</code></a></td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtkcolorselection.html" title="gtk.ColorSelection"><code class="classname">gtk.ColorSelection</code></a> 
widget.</p></div><div class="refsect1" lang="en"><a name="id3267058"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkcolorselection--get-has-opacity-control"></a><h3>gtk.ColorSelection.get_has_opacity_control</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_has_opacity_control</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><code class="literal">True</code> if the
<em class="parameter"><code>colorsel</code></em> has an opacity control;
<code class="literal">False</code> if it doesn't.</td></tr></tbody></table><p>The <code class="methodname">get_opacity</code>() method determines
whether the colorselection is displaying an opacity control.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--set-has-opacity-control"></a><h3>gtk.ColorSelection.set_has_opacity_control</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_has_opacity_control</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>has_opacity</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>has_opacity</code></strong> :</span></p></td><td>If <code class="literal">True</code> the colorselection
will display the opacity control.</td></tr></tbody></table><p>The <code class="methodname">set_has_opacity_control</code>() method
sets the "has-opacity-control" property to the value of
<em class="parameter"><code>has_opacity</code></em>. If <em class="parameter"><code>has_opacity</code></em> is
<code class="literal">True</code> the colorselection will display the opacity control
slider and entry box; otherwise the opacity control is not displayed.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--get-has-palette"></a><h3>gtk.ColorSelection.get_has_palette</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_has_palette</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><code class="literal">True</code> if the selector has a
palette; <code class="literal">False</code> if it hasn't.</td></tr></tbody></table><p>The <code class="methodname">get_has_palette</code>() method returns
the value of the "has-palette" property that determines whether the color
selector displays a color palette.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--set-has-palette"></a><h3>gtk.ColorSelection.set_has_palette</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_has_palette</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>has_palette</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>has_palette</code></strong> :</span></p></td><td>If <code class="literal">True</code> the color palette is
displayed.</td></tr></tbody></table><p>The <code class="methodname">set_has_palette</code>() method sets the
"has-palette" property to the value of <em class="parameter"><code>has_palette</code></em>.
If <em class="parameter"><code>has_palette</code></em> is True the palette will be displayed;
otherwise the palette will be hidden.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--set-current-color"></a><h3>gtk.ColorSelection.set_current_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_current_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><p>The <code class="methodname">set_current_color</code>() method sets the
current color to the value of <em class="parameter"><code>color</code></em>.  The first time
this is called, it will also set the previous color to the value of
<em class="parameter"><code>color</code></em> too.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--set-current-alpha"></a><h3>gtk.ColorSelection.set_current_alpha</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_current_alpha</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>alpha</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>alpha</code></strong> :</span></p></td><td>an integer between 0 and
65535.</td></tr></tbody></table><p>The <code class="methodname">set_current_alpha</code>() method sets the
"current-alpha" property (the opacity) to the value of alpha. The alpha
(opacity) is displayed in the range of 0 to 255 in the colorselection.  The
first time this is called, it will also set the previous opacity to the
value of <em class="parameter"><code>alpha</code></em> too.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--get-current-color"></a><h3>gtk.ColorSelection.get_current_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_current_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>
representing the current color.</td></tr></tbody></table><p>The <code class="methodname">get_current_color</code>() method
retrieves the current color in the colorselection.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--get-current-alpha"></a><h3>gtk.ColorSelection.get_current_alpha</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_current_alpha</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 current alpha value in the range 0 to
65535.</td></tr></tbody></table><p>The <code class="methodname">get_current_alpha</code>() method returns
the value of the "current_alpha" property that controls the opacity
value.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--set-previous-color"></a><h3>gtk.ColorSelection.set_previous_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_previous_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 previous color with.</td></tr></tbody></table><p>The <code class="methodname">set_previous_color</code>() method sets
the 'previous' color to the value of <em class="parameter"><code>color</code></em>.
Applications usually do not call this method. The first time <a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--set-current-color" title="gtk.ColorSelection.set_current_color"><code class="methodname">set_current_color</code>()</a> 
the 'previous' color will be set.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--set-previous-alpha"></a><h3>gtk.ColorSelection.set_previous_alpha</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_previous_alpha</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>alpha</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>alpha</code></strong> :</span></p></td><td>an integer between 0 and
65535.</td></tr></tbody></table><p>The set_previous_alpha() method sets the 'previous' alpha to the
value of <em class="parameter"><code>alpha</code></em>. Applications usually do not call this
method. The first time <a class="link" href="class-gtkcolorselection.html#method-gtkcolorselection--set-current-alpha" title="gtk.ColorSelection.set_current_alpha"><code class="methodname">set_current_alpha</code>()</a> 
the 'previous' alpha will be set.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--get-previous-color"></a><h3>gtk.ColorSelection.get_previous_color</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_previous_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> with
the previous color value.</td></tr></tbody></table><p>The <code class="methodname">get_previous_color</code>() method
retrieves the previous color value.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--get-previous-alpha"></a><h3>gtk.ColorSelection.get_previous_alpha</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_previous_alpha</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>an integer between 0 and
65535.</td></tr></tbody></table><p>The get_previous_alpha() method returns the previous alpha
value.</p></div><div class="refsect2" lang="en"><a name="method-gtkcolorselection--is-adjusting"></a><h3>gtk.ColorSelection.is_adjusting</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">is_adjusting</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><code class="literal">True</code> if the user is
currently dragging a color around, and <code class="literal">False</code> if the
selection has stopped.</td></tr></tbody></table><p>The <code class="methodname">is_adjusting</code>() method retrieves the
current state of the colorselection. If True the user is in the process of
changing the current color.</p></div></div><div class="refsect1" lang="en"><a name="id3267926"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--color-selection-palette-from-string"></a><h3>gtk.color_selection_palette_from_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.color_selection_palette_from_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>str</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>str</code></strong> :</span></p></td><td>the string containing the list of
colors</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> objects
or <code class="literal">None</code> if the conversion fails</td></tr></tbody></table><p>The
<code class="function">gtk.color_selection_palette_from_string</code>() function
returns a list of <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> objects
corresponding to the color specifications in the string specified by
<em class="parameter"><code>str</code></em>. str is a colon-separated list of color names
readable by <a class="link" href="class-gdkcolor.html#function-gdk--color-parse" title="gtk.gdk.color_parse"><code class="function">gtk.gtk.color_parse</code>()</a>. 
If <em class="parameter"><code>str</code></em> cannot be converted to a list of color this
function returns <code class="literal">None</code>.</p></div><div class="refsect2" lang="en"><a name="function-gtk--color-selection-palette-to-string"></a><h3>gtk.color_selection_palette_to_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.color_selection_palette_to_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>colors</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>colors</code></strong> :</span></p></td><td>a list or tuple of <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
objects</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a string containing a colon-separated list of
<em class="parameter"><code>colors</code></em></td></tr></tbody></table><p>The <code class="function">gtk.color_selection_palette_to_string</code>()
function returns a string containing a colon-separated list of the
representation of the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> objects
in <em class="parameter"><code>colors</code></em>.</p><p>This function is useful to save a special palette of colors for
a <a class="link" href="class-gtkcolorselection.html" title="gtk.ColorSelection"><code class="classname">gtk.ColorSelection</code></a> 
as a string that can later be used by calling the <PYGTKDOCLINK HREF="method-gobject--set-property"><code class="methodname">gobject.set_property</code>()</PYGTKDOCLINK> 
method to set the "gtk-color-palette" property on the default <a class="link" href="class-gtksettings.html" title="gtk.Settings"><code class="classname">gtk.Settings</code></a>
returned from the <a class="link" href="class-gtksettings.html#function-gtk--settings-get-default" title="gtk.settings_get_default"><code class="function">gtk.settings_get_default</code>()</a>) 
function.</p></div></div><div class="refsect1" lang="en"><a name="id3268190"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkcolorselection--color-changed"></a><h3>The "color-changed" gtk.ColorSelection Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>colorselection</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>colorselection</code></em> :</span></p></td><td>the colorselection that received the
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
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "color-changed" signal is emitted when the current color in
the colorselection 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-gtkcolorbutton.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-gtkcolorselectiondialog.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.ColorButton </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.ColorSelectionDialog</td></tr></table></div></body></html>