blob: f319fa6319a2729c9844e9e89b114934f3042a1b (
plain)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="class-gtkcellrendererspin">
<refnamediv>
<refname>gtk.CellRendererSpin</refname>
<refpurpose>an object that renders a spin button in a cell (new in
PyGTK 2.10)</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>gtk.CellRendererSpin</classname></ooclass>
<ooclass><classname><link linkend="class-gtkcellrenderertext">gtk.CellRendererText</link></classname></ooclass>
<constructorsynopsis language="python">
<methodname><link linkend="constructor-gtkcellrendererspin">gtk.CellRendererSpin</link></methodname>
<methodparam></methodparam>
</constructorsynopsis>
</classsynopsis>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+-- <link linkend="class-gtkobject">gtk.Object</link>
+-- <link linkend="class-gtkcellrenderer">gtk.CellRenderer</link>
+-- <link linkend="class-gtkcellrenderertext">gtk.CellRendererText</link>
+-- <link linkend="class-gtkcellrendererspin">gtk.CellRendererSpin</link>
</synopsis>
</refsect1>
<refsect1 id="properties-gtkcellrendererspin">
<title>gtk.CellRendererSpin Properties</title>
<para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
<para><link linkend="properties-gtkcellrenderer">gtk.CellRenderer Properties</link></para>
<para><link linkend="properties-gtkcellrenderertext">gtk.CellRendererText Properties</link></para>
<blockquote role="properties">
<informaltable pgwide="1" frame="none">
<tgroup cols="3">
<colspec column="1" colwidth="1in"/>
<colspec column="2" colwidth="1in"/>
<colspec column="3" colwidth="4in"/>
<tbody>
<row valign="top">
<entry>"adjustment"</entry>
<entry>Read-Write</entry>
<entry>The <link
linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
that holds the value of the spinbutton. This must be non-None
for the cell renderer to be editable. Default value:
None. Available in GTK+ 2.10 and above.</entry>
</row>
<row valign="top">
<entry>"climb-rate"</entry>
<entry>Read-Write</entry>
<entry>The acceleration rate when you hold down a
button. Range: [0.0,MAXDOUBLE]. Default value: 0.0. Available
in GTK+ 2.10 and above.</entry>
</row>
<row valign="top">
<entry>"digits"</entry>
<entry>Read-Write</entry>
<entry>The number of decimal places to display. Range:
[0,20]. Default value: 0. Available in GTK+ 2.10 and
above.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</blockquote>
</refsect1>
<refsect1 id="signal-prototypes-gtkcellrendererspin">
<title>gtk.CellRendererSpin Signal Prototypes</title>
<para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
<para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
<para><link linkend="signal-prototypes-gtkcellrenderer">gtk.CellRenderer Signal Prototypes</link></para>
<para><link linkend="signal-prototypes-gtkcellrenderertext">gtk.CellRendererText Signal Prototypes</link></para>
</refsect1>
<refsect1>
<title>Description</title>
<para><link
linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link>
renders text in a cell like <link
linkend="class-gtkcellrenderertext"><classname>gtk.CellRendererText</classname></link>
from which it is derived. But while <link
linkend="class-gtkcellrenderertext"><classname>gtk.CellRendererText</classname></link>
offers a simple entry to edit the text, <link
linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link>
offers a <link
linkend="class-gtkspinbutton"><classname>gtk.SpinButton</classname></link>
widget. Of course, that means that the text has to be parseable as a
floating point number.</para>
<para>The range of the spinbutton is taken from the "adjustment"
property of the cell renderer, which can be set explicitly or mapped to
a column in the tree model. Like all properties of cellrenderers. <link
linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link>
also has properties for the "climb-rate" and the number of "digits" to
display. Other <link
linkend="class-gtkspinbutton"><classname>gtk.SpinButton</classname></link>
properties can be set in a handler for the "<link
linkend="signal-gtkcellrenderer--editing-started">gtk.CellRenderer.editing-started</link>"
signal. </para>
</refsect1>
<refsect1>
<title>Constructor</title>
<refsect2 id="constructor-gtkcellrendererspin">
<title>gtk.CellRendererSpin</title>
<programlisting><constructorsynopsis language="python">
<methodname>gtk.CellRendererSpin</methodname>
<methodparam></methodparam>
</constructorsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a new <link
linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This constructor is available in PyGTK 2.10 and above.</para>
</note>
<para>Creates a new <link
linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link>.</para>
</refsect2>
</refsect1>
</refentry>
|