summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-gtkcheckbutton.xml
blob: d72b8db5d4fcfb6fd18d301154625ad2ab62e68d (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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?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-gtkcheckbutton">
  <refnamediv>
    <refname>gtk.CheckButton</refname>
    <refpurpose>a toggle button widget styled as a checkbox and label
</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.CheckButton</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtktogglebutton">gtk.ToggleButton</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkcheckbutton">gtk.CheckButton</link></methodname>
	<methodparam><parameter
		       role="keyword">label</parameter><initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">use_underline</parameter>
	  <initializer>True</initializer></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-gtkwidget">gtk.Widget</link>
         +-- <link linkend="class-gtkcontainer">gtk.Container</link>
            +-- <link linkend="class-gtkbin">gtk.Bin</link>
               +-- <link linkend="class-gtkbutton">gtk.Button</link>
                  +-- <link linkend="class-gtktogglebutton">gtk.ToggleButton</link>
                     +-- <link linkend="class-gtkcheckbutton">gtk.CheckButton</link>
</synopsis>

  </refsect1>
  
  <refsect1>
		<title>Implemented Interfaces</title>
		<para>
			<link linkend="class-gtkcheckbutton"><classname>gtk.CheckButton</classname></link>
			implements 
			<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
		</para>
	</refsect1>

  <refsect1 id="properties-gtkcheckbutton">
    <title>gtk.CheckButton Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
    <para><link linkend="properties-gtkcontainer">gtk.Container Properties</link></para>
    <para><link linkend="properties-gtkbutton">gtk.Button Properties</link></para>
    <para><link linkend="properties-gtktogglebutton">gtk.ToggleButton Properties</link></para>

  </refsect1>

  <refsect1 id="style-properties-gtkcheckbutton">
    <title>gtk.CheckButton Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>
    <para><link linkend="style-properties-gtkbutton">gtk.Button Style 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="3.5in"/>
	  <tbody>

            <row valign="top">
              <entry>"indicator-size"</entry>
              <entry>Read/Write</entry>
              <entry>The size of the check or radio indicator</entry>
            </row>

            <row valign="top">
              <entry>"indicator-spacing"</entry>
              <entry>Read/Write</entry>
              <entry>The spacing around the check or radio indicator</entry>
            </row>

          </tbody>
        </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkcheckbutton">
    <title>gtk.CheckButton 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-gtkwidget">gtk.Widget Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkbutton">gtk.Button Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtktogglebutton">gtk.ToggleButton Signal Prototypes</link></para>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-gtkcheckbutton"><classname>gtk.CheckButton</classname></link>
places a discrete <link
linkend="class-gtktogglebutton"><classname>gtk.ToggleButton</classname></link> 
next to a widget, (usually a <link
linkend="class-gtklabel"><classname>gtk.Label</classname></link>). See the
section on <link
linkend="class-gtktogglebutton"><classname>gtk.ToggleButton</classname></link> 
widgets for more information about toggle and check buttons. The signal
('toggled') is also inherited from <link
linkend="class-gtktogglebutton"><classname>gtk.ToggleButton</classname></link>.</para>

  </refsect1>

  <refsect1 id="constructor-gtkcheckbutton">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.CheckButton</methodname>
	<methodparam><parameter
		       role="keyword">label</parameter><initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">use_underline</parameter>
	  <initializer>True</initializer></methodparam>
      </constructorsynopsis>
</programlisting>

    <variablelist>
      <varlistentry>
	<term><parameter role="keyword">label</parameter>&nbsp;:</term>
	<listitem><simpara>a string to be used as the label text or
None</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter
	role="keyword">use_underline</parameter>&nbsp;:</term>
	<listitem><simpara>if <literal>True</literal>, an underscore in the
	label text indicates the next character should be underlined and
	used for the mnemonic accelerator key if it is the first character
	so marked. Available in PyGTK 2.4 and above.</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new checkbutton object</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new checkbutton with a text label specified by
<parameter>label</parameter>. If <parameter>label</parameter> is
<literal>None</literal> or not specified then no label is created. If
<parameter>label</parameter> contains underscore characters then the
character following the underscore will be underlined and the character
following the first underscore will be used as the mnemonic keyboard
accelerator.</para>

    <para>In PyGTK 2.4 and above the <parameter>use_underline</parameter>
parameter is available and defaults to <literal>True</literal>. If
<parameter>use_underline</parameter> is set to <literal>False</literal> the
label text will not be parsed for mnemonic characters.</para>

  </refsect1>

</refentry>