summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-gtkinfobar.xml
blob: 63eb216af4153a06b7189dc5f04476f6f2e619bb (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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<?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-gtkinfobar">
  <refnamediv>
    <refname>gtk.InfoBar</refname>
    <refpurpose></refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.InfoBar</classname></ooclass>
      <ooclass><classname><link linkend="class-gtkhbox">gtk.HBox</link></classname></ooclass>
      <constructorsynopsis language="python">
        <methodname><link linkend="constructor-gtkinfobar">gtk.InfoBar</link></methodname>
        <methodparam></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--get-action-area">get_action_area</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--get-content-area">get_content_area</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--add-action-widget">add_action_widget</link></methodname>
        <methodparam><parameter role="keyword">child</parameter></methodparam>
        <methodparam><parameter role="keyword">response_id</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--add-button">add_button</link></methodname>
        <methodparam><parameter role="keyword">button_text</parameter></methodparam>
        <methodparam><parameter role="keyword">response_id</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--add-buttons">add_buttons</link></methodname>
        <methodparam><parameter role="keyword">first_button_text</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--set-response-sensitive">set_response_sensitive</link></methodname>
        <methodparam><parameter role="keyword">response_id</parameter></methodparam>
        <methodparam><parameter role="keyword">setting</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--set-default-response">set_default_response</link></methodname>
        <methodparam><parameter role="keyword">response_id</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--response">response</link></methodname>
        <methodparam><parameter role="keyword">response_id</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--set-message-type">set_message_type</link></methodname>
        <methodparam><parameter role="keyword">message_type</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtkinfobar--get-message-type">get_message_type</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-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-gtkbox">gtk.Box</link>
          +-- <link linkend="class-gtkhbox">gtk.HBox</link>
            +-- <link linkend="class-gtkinfobar">gtk.InfoBar</link>
</synopsis>

  </refsect1>

  <refsect1>
    <title>Constructor</title>

    <programlisting>
      <constructorsynopsis language="python">
        <methodname><link linkend="constructor-gtkinfobar">gtk.InfoBar</link></methodname>
        <methodparam></methodparam>
      </constructorsynopsis>
    </programlisting>
    <variablelist>
      <varlistentry>
        <term><emphasis>Returns</emphasis>&nbsp;:</term>
        <listitem><simpara>a new <link linkend="class-gtkinfobar"><classname>gtk.InfoBar</classname></link> object</simpara></listitem>
      </varlistentry>
    </variablelist>
    <note>
      <para>This constructor is available in PyGTK 2.22 and above.</para>
    </note>

    <para>Creates a new <link linkend="class-gtkinfobar"><classname>gtk.InfoBar</classname></link> object.</para>


  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkinfobar--get-action-area">
      <title>gtk.InfoBar.get_action_area</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>get_action_area</methodname>
          <methodparam></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the action area</simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>get_action_area</methodname>() method returns the action area of <parameter>info_bar</parameter>.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--get-content-area">
      <title>gtk.InfoBar.get_content_area</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>get_content_area</methodname>
          <methodparam></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the content area</simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>get_content_area</methodname>() method returns the content area of <parameter>info_bar</parameter>.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--add-action-widget">
      <title>gtk.InfoBar.add_action_widget</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>add_action_widget</methodname>
          <methodparam><parameter role="keyword">child</parameter></methodparam>
          <methodparam><parameter role="keyword">response_id</parameter></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">child</parameter>&nbsp;:</term>
          <listitem><simpara>an activatable widget</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">response_id</parameter>&nbsp;:</term>
          <listitem><simpara>response ID for <parameter>child</parameter></simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Add an activatable widget to the action area of a <link linkend="class-gtkinfobar"><classname>gtk.InfoBar</classname></link>,
connecting a signal handler that will emit the <link linkend="class-gtkinfobar"><classname>gtk.InfoBar</classname></link>::response
signal on the message area when the widget is activated. The widget
is appended to the end of the message areas action area.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--add-button">
      <title>gtk.InfoBar.add_button</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>add_button</methodname>
          <methodparam><parameter role="keyword">button_text</parameter></methodparam>
          <methodparam><parameter role="keyword">response_id</parameter></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">button_text</parameter>&nbsp;:</term>
          <listitem><simpara>text of button, or stock ID</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">response_id</parameter>&nbsp;:</term>
          <listitem><simpara>response ID for the button</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the button widget that was added</simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Adds a button with the given text (or a stock button, if button_text
is a stock ID) and sets things up so that clicking the button will emit
the "response" signal with the given response_id. The button is appended
to the end of the info bars's action area. The button widget is
returned, but usually you don't need it.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--add-buttons">
      <title>gtk.InfoBar.add_buttons</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>add_buttons</methodname>
          <methodparam><parameter role="keyword">first_button_text</parameter></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">first_button_text</parameter>&nbsp;:</term>
          <listitem><simpara>button text or stock ID</simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Adds more buttons, same as calling <link linkend="method-gtkinfobar--add-button"><methodname>gtk.InfoBar.add_button</methodname></link>
repeatedly. The variable argument list should be <literal>NULL</literal>-terminated
as with         <function>gtk_info_bar_new_with_buttons()</function>. Each button must have both
text and response ID.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--set-response-sensitive">
      <title>gtk.InfoBar.set_response_sensitive</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>set_response_sensitive</methodname>
          <methodparam><parameter role="keyword">response_id</parameter></methodparam>
          <methodparam><parameter role="keyword">setting</parameter></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">response_id</parameter>&nbsp;:</term>
          <listitem><simpara>a response ID</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">setting</parameter>&nbsp;:</term>
          <listitem><simpara>TRUE for sensitive</simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Calls gtk_widget_set_sensitive (widget, setting) for each
widget in the info bars's action area with the given response_id.
A convenient way to sensitize/desensitize dialog buttons.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--set-default-response">
      <title>gtk.InfoBar.set_default_response</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>set_default_response</methodname>
          <methodparam><parameter role="keyword">response_id</parameter></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">response_id</parameter>&nbsp;:</term>
          <listitem><simpara>a response ID</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>set_default_response</methodname>() method sets the last widget in the info bar's action area with
the given response_id as the default widget for the dialog.
Pressing "Enter" normally activates the default widget.
      </para>
      <para>
Note that this function currently requires <parameter>info_bar</parameter> to
be added to a widget hierarchy.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--response">
      <title>gtk.InfoBar.response</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>response</methodname>
          <methodparam><parameter role="keyword">response_id</parameter></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">response_id</parameter>&nbsp;:</term>
          <listitem><simpara>a response ID</simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Emits the 'response' signal with the given <parameter>response_id</parameter>.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--set-message-type">
      <title>gtk.InfoBar.set_message_type</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>set_message_type</methodname>
          <methodparam><parameter role="keyword">message_type</parameter></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">message_type</parameter>&nbsp;:</term>
          <listitem><simpara>a <literal>GtkMessageType</literal></simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>set_message_type</methodname>() method sets the message type of the message area.
GTK+ uses this type to determine what color to use
when drawing the message area.</para>
    </refsect2>

    <refsect2 id="method-gtkinfobar--get-message-type">
      <title>gtk.InfoBar.get_message_type</title>

      <programlisting>
        <methodsynopsis language="python">
          <methodname>get_message_type</methodname>
          <methodparam></methodparam>
        </methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the message type of the message area.</simpara></listitem>
        </varlistentry>
      </variablelist>
      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>get_message_type</methodname>() method returns the message type of the message area.</para>
    </refsect2>

  </refsect1>

</refentry>