[pygtk] reference: pygtk-gtkwidget.xml: add missing methods and properties
- From: Dieter Verfaillie <dieterv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygtk] reference: pygtk-gtkwidget.xml: add missing methods and properties
- Date: Thu, 10 Mar 2011 21:19:26 +0000 (UTC)
commit 6a4fa002a2d53de62cb38fdb9f7ed67849a632f2
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Wed Mar 9 23:10:40 2011 +0100
reference: pygtk-gtkwidget.xml: add missing methods and properties
docs/reference/pygtk-gtkwidget.xml | 879 +++++++++++++++++++++++++++++++++++-
1 files changed, 869 insertions(+), 10 deletions(-)
---
diff --git a/docs/reference/pygtk-gtkwidget.xml b/docs/reference/pygtk-gtkwidget.xml
index 5510903..3150c11 100644
--- a/docs/reference/pygtk-gtkwidget.xml
+++ b/docs/reference/pygtk-gtkwidget.xml
@@ -15,7 +15,11 @@ widgets</refpurpose>
<classsynopsis language="python">
<ooclass><classname>gtk.Widget</classname></ooclass>
<ooclass><classname><link linkend="class-gtkobject">gtk.Object</link></classname></ooclass>
- <methodsynopsis language="python">
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-allocation">set_allocation</link></methodname>
+ <methodparam><parameter role="keyword">allocation</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
<methodname><link linkend="method-gtkwidget--get-allocation">get_allocation</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
@@ -713,6 +717,122 @@ widgets</refpurpose>
<methodname><link linkend="method-gtkwidget--get-window">get_window</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--send-focus-change">send_focus_change</link></methodname>
+ <methodparam><parameter role="keyword">event</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-realized">set_realized</link></methodname>
+ <methodparam><parameter role="keyword">realized</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-realized">get_realized</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-mapped">set_mapped</link></methodname>
+ <methodparam><parameter role="keyword">mapped</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-mapped">get_mapped</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-requisition">get_requisition</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--style-attach">style_attach</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--has-rc-style">has_rc_style</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-app-paintable">get_app_paintable</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-can-default">set_can_default</link></methodname>
+ <methodparam><parameter role="keyword">can_default</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-can-default">get_can_default</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-can-focus">set_can_focus</link></methodname>
+ <methodparam><parameter role="keyword">can_focus</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-can-focus">get_can_focus</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-double-buffered">get_double_buffered</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-has-window">set_has_window</link></methodname>
+ <methodparam><parameter role="keyword">has_window</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-has-window">get_has_window</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-receives-default">set_receives_default</link></methodname>
+ <methodparam><parameter role="keyword">receives_default</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-receives-default">get_receives_default</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-sensitive">get_sensitive</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-state">get_state</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-visible">set_visible</link></methodname>
+ <methodparam><parameter role="keyword">visible</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--get-visible">get_visible</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--set-window">set_window</link></methodname>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--has-default">has_default</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--has-focus">has_focus</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--has-grab">has_grab</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--is-sensitive">is_sensitive</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--is-toplevel">is_toplevel</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-gtkwidget--is-drawable">is_drawable</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
</classsynopsis>
<programlisting>
@@ -825,6 +945,12 @@ composite widget</entry>
</row>
<row valign="top">
+ <entry>"double-buffered"</entry>
+ <entry>Read-Write</entry>
+ <entry>If <literal>True</literal>, the widget is double buffered</entry>
+ </row>
+
+ <row valign="top">
<entry>"events"</entry>
<entry>Read-Write</entry>
<entry>The event mask that decides what kind of <link
@@ -966,6 +1092,14 @@ visible</entry>
request should be used.</entry>
</row>
+ <row valign="top">
+ <entry>"window"</entry>
+ <entry>Read</entry>
+ <entry>The widget's window if realized,
+ <literal>None</literal> otherwise.
+ This property is available in GTK+ 2.14 and above.</entry>
+ </row>
+
</tbody>
</tgroup>
</informaltable>
@@ -1103,14 +1237,6 @@ right-to-left and left-to-right text.</entry>
2.10 and above.</entry>
</row>
- <row valign="top">
- <entry>"window"</entry>
- <entry>Read</entry>
- <entry>The "window" property is the widget's window if it is
- realized, <literal>None</literal> otherwise.
- This property is available in GTK+ 2.14 and above.</entry>
- </row>
-
</tbody>
</tgroup>
</informaltable>
@@ -2010,6 +2136,30 @@ without the need to write a theme engine in C.</para>
<refsect1>
<title>Methods</title>
+ <refsect2 id="method-gtkwidget--set-allocation">
+ <title>gtk.Widget.set_allocation</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_allocation</methodname>
+ <methodparam><parameter role="keyword">allocation</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">allocation</parameter> :</term>
+ <listitem><simpara>a <link linkend="class-gdkrectangle"><classname>gtk.gdk.Rectangle</classname></link>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_allocation</methodname>() method sets the widget's allocation.
+ This should not be used directly, but from within a widget's
+ "size_allocate" implementation.</para>
+
+ </refsect2>
+
<refsect2 id="method-gtkwidget--get-allocation">
<title>gtk.Widget.get_allocation</title>
@@ -4125,7 +4275,9 @@ widget to become the default widget. The widget must have the
<literal>gtk.CAN_DEFAULT</literal> flag set by calling the <link
linkend="method-gtkobject--set-flags"><methodname>gtk.Object.set_flags</methodname>()</link>
method. The default widget is activated when the user presses
-<keycap>Enter</keycap> in a window.</para>
+<keycap>Enter</keycap> in a window. Default widgets must be activatable, that is,
+<link linkend="method-gtkwidget--activate"><methodname>gtk.Widget.activate</methodname>()</link>
+should affect them.</para>
</refsect2>
@@ -6836,6 +6988,713 @@ method.</para>
</refsect2>
+ <refsect2 id="method-gtkwidget--send-focus-change">
+ <title>gtk.Widget.send_focus_change</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>send_focus_change</methodname>
+ <methodparam><parameter role="keyword">event</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">event</parameter> :</term>
+ <listitem><simpara>a FOCUS_CHANGE <link linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link>.</simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>the return value from the event signal emission: <literal>True</literal> if the event was handled, and <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.22 and above.</para>
+ </note>
+
+ <para>The <methodname>send_focus_change</methodname>() method ends the focus change
+ <parameter>event</parameter> to the widget.</para>
+
+ <para>This method is not meant to be used by applications. The only time it should be used is when it is necessary for a
+ <link linkend="class-gtkwidget"><classname>gtk.Widget</classname></link> to assign focus to a widget that is semantically
+ owned by the first widget even though it's not a direct child - for instance, a search entry in a floating window similar
+ to the quick search in <link linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--set-realized">
+ <title>gtk.Widget.set_realized</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_realized</methodname>
+ <methodparam><parameter role="keyword">realized</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">realized</parameter> :</term>
+ <listitem><simpara><literal>True</literal> to mark the widget as realized, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_realized</methodname>() method marks the widget as being realized.</para>
+
+ <para>This method should only ever be called in a derived widget's "realize" or "unrealize" implementation.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-realized">
+ <title>gtk.Widget.get_realized</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_realized</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if widget is realized, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_realized</methodname>() method determines whether widget is realized.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--set-mapped">
+ <title>gtk.Widget.set_mapped</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_mapped</methodname>
+ <methodparam><parameter role="keyword">mapped</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">mapped</parameter> :</term>
+ <listitem><simpara><literal>True</literal> to mark the widget as mapped, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_mapped</methodname>() method marks the widget as being mapped.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-mapped">
+ <title>gtk.Widget.get_mapped</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_mapped</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is mapped, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_mapped</methodname>() method determines whether
+ the widget is mapped.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-requisition">
+ <title>gtk.Widget.get_requisition</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_requisition</methodname>
+ <methodparam><parameter role="keyword">requisition</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>a <link linkend="class-gtkrequisition"><classname>gtk.Requisition</classname></link>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_requisition</methodname>() method retrieves the widget's requisition.</para>
+
+ <para>This method should only be used by widget implementations in order to figure whether the widget's
+ requisition has actually changed after some internal state change (so that they can call
+ <link linkend="method-gtkwidget--queue-resize"><methodname>queue_resize</methodname></link>()
+ instead of
+ <link linkend="method-gtkwidget--queue-draw"><methodname>gtk.Widget.queue_draw</methodname></link>()).</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--style-attach">
+ <title>gtk.Widget.style_attach</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>style_attach</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>style_attach</methodname>() method attaches the widget's
+ <link linkend="class-gtkstyle"><classname>gtk.Style</classname></link> to the widget's
+ <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>. It is a
+ replacement for the <link linkend="method-gtkstyle--attach"><methodname>gtk.Style.attach</methodname></link>()
+ method and should only ever be called in a derived widget's "realize" implementation which
+ does not chain up to its parent class' "realize" implementation, because one of the parent
+ classes (finally <link linkend="class-gtkwidget"><classname>gtk.Widget</classname></link>)
+ would attach the style itself.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--has-rc-style">
+ <title>gtk.Widget.has_rc_style</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_rc_style</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal>if the widget has been looked up through the rc mechanism, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>has_rc_style</methodname>() method determines
+ if the widget style has been looked up through the rc mechanism.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-app-paintable">
+ <title>gtk.Widget.get_app_paintable</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_app_paintable</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is app paintable, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_app_paintable</methodname>() method determines
+ whether the application intends to draw on the widget in an "expose-event"
+ handler.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--set-can-default">
+ <title>gtk.Widget.set_can_default</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_can_default</methodname>
+ <methodparam><parameter role="keyword">can_default</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">can_default</parameter> :</term>
+ <listitem><simpara><literal>True</literal> if the widget can be a default widget, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_can_default</methodname>() method specifies whether
+ the widget can be a default widget. See <link linkend="method-gtkwidget--grab-default"><methodname>gtk.Widget.grab_default</methodname>()</link>
+ for details about the meaning of "default".</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-can-default">
+ <title>gtk.Widget.get_can_default</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_can_default</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if widget can be a default widget, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_can_default</methodname>() method determines whether
+ widget can be a default widget.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--set-can-focus">
+ <title>gtk.Widget.set_can_focus</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_can_focus</methodname>
+ <methodparam><parameter role="keyword">can_focus</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">can_focus</parameter> :</term>
+ <listitem><simpara><literal>True</literal> if the widget can own the input focus, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_can_focus</methodname>() method specifies whether
+ the widget can own the input focus. See
+ <link linkend="method-gtkwidget--grab-focus"><methodname>grab_focus</methodname>()</link>
+ for actually setting the input focus on a widget.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-can-focus">
+ <title>gtk.Widget.get_can_focus</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_can_focus</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget can own the input focus, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_can_focus</methodname>() method determines whether
+ widget can own the input focus.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-double-buffered">
+ <title>gtk.Widget.get_double_buffered</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_double_buffered</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is double buffered, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_double_buffered</methodname>() method determines whether
+ the widget is double buffered.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--set-has-window">
+ <title>gtk.Widget.set_has_window</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_has_window</methodname>
+ <methodparam><parameter role="keyword">has_window</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">has_window</parameter> :</term>
+ <listitem><simpara><literal>True</literal> if the widget has a window, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_has_window</methodname>() method specifies whether
+ the widget has a <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
+ of its own. Note that all realized widgets have a non-<literal>None</literal> "window"
+ (<link linkend="method-gtkwidget--get-window"><methodname>get_window</methodname></link>()
+ never returns a <literal>None</literal> window when a widget is realized), but for many of them it's
+ actually the <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> of one
+ of its parent widgets. Widgets that do not create a window for themselves in their "realize" implementation
+ must announce this by calling this function with <parameter>has_window</parameter> = <literal>False</literal>.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-has-window">
+ <title>gtk.Widget.get_has_window</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_has_window</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if widget has a window, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_has_window</methodname>() method determines whether
+ widget has a <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> of its own.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--set-receives-default">
+ <title>gtk.Widget.set_receives_default</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_receives_default</methodname>
+ <methodparam><parameter role="keyword">receives_default</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">receives_default</parameter> :</term>
+ <listitem><simpara><literal>True</literal> if the widget can be a default widget, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_receives_default</methodname>() method specifies whether
+ the widget will be treated as the default widget within its toplevel when it has the
+ focus, even if another widget is the default.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-receives-default">
+ <title>gtk.Widget.get_receives_default</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_receives_default</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if widget acts as default widget when focussed, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_receives_default</methodname>() method determines whether
+ the widget is alyways treated as default widget withing its toplevel when it has the
+ focus, even if another widget is the default.</para>
+
+ <para>The effective sensitivity of a widget is however determined by both its own and
+ its parent widget's sensitivity. See
+ <link linkend="method-gtkaction--is-sensitive"><methodname>is_sensitive</methodname></link>().</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-sensitive">
+ <title>gtk.Widget.get_sensitive</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_sensitive</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is sensitive, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_sensitive</methodname>() method returns the widget's sensitivity
+ (in the sense of returning the value that has been set using
+ <link linkend="method-gtkwidget--set-sensitive"><methodname>set_sensitive</methodname>()</link>).</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-state">
+ <title>gtk.Widget.get_state</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_state</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara>the state of the widget.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_state</methodname>() method returns the widget's state.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--set-visible">
+ <title>gtk.Widget.set_visible</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_visible</methodname>
+ <methodparam><parameter role="keyword">visible</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">visible</parameter> :</term>
+ <listitem><simpara><literal>True</literal> if the widget should be shown, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_visible</methodname>() method sets the visibility
+ state of the widget. Note that setting this to <literal>True</literal> doesn't
+ mean the widget is actually viewable, see
+ <link linkend="method-gtkwidget--get-visible"><methodname>get_visible</methodname></link>().</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--get-visible">
+ <title>gtk.Widget.get_visible</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_visible</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is visible, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>get_visible</methodname>() method determines whether
+ the widget is visible. Note that this doesn't take into account whether the
+ widget's parent is also visible or the widget is obscured in any way.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--set-window">
+ <title>gtk.Widget.set_window</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_window</methodname>
+ <methodparam><parameter role="keyword">window</parameter></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">window</parameter> :</term>
+ <listitem><simpara>a <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>set_window</methodname>() method sets the widget's
+ window. This method should only be used in a widget's "realize" implementation.
+ The window passed is usually either a new window or the window of its parent widget as returned by
+ <link linkend="method-gtkwidget--get-parent-window"><methodname>get_parent_window</methodname></link>().</para>
+
+ <para>Widgets must indicate whether they will create their own
+ <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
+ by calling <link linkend="method-gtkwidget--set-has-window"><methodname>set_has_window</methodname></link>().
+ This is usually done in the widget's init() method.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--has-default">
+ <title>gtk.Widget.has_default</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_default</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if widget is the current default widget within its toplevel, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>has_default</methodname>() method determines whether
+ widget is the current default widget within its toplevel.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--has-focus">
+ <title>gtk.Widget.has_focus</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_focus</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget has the global input focus, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>has_focus</methodname>() method determines
+ if the widget has the global input focus.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--has-grab">
+ <title>gtk.Widget.has_grab</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>has_grab</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is in the grab_widgets stack, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>has_grab</methodname>() method determines whether
+ the widget is currently grabbing events, so it is the only widget
+ receiving input events (keyboard and mouse).</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--is-sensitive">
+ <title>gtk.Widget.is_sensitive</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_sensitive</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is effectively sensitive, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>is_sensitive</methodname>() method returns the
+ widget's effective sensitivity, which means it is sensitive itself and
+ also its parent widget is sensntive.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--is-toplevel">
+ <title>gtk.Widget.is_toplevel</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_toplevel</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is a toplevel, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>is_toplevel</methodname>() method determines whether
+ widget is a toplevel widget. Toplevel widgets have no parent widget.</para>
+
+ </refsect2>
+
+ <refsect2 id="method-gtkwidget--is-drawable">
+ <title>gtk.Widget.is_drawable</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>is_drawable</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis> :</term>
+ <listitem><simpara><literal>True</literal> if the widget is drawable, <literal>False</literal> otherwise.</simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <note>
+ <para>This method is available in PyGTK 2.20 and above.</para>
+ </note>
+
+ <para>The <methodname>is_drawable</methodname>() method determines whether
+ the widget can be drawn to. A widget can be drawn to if it is mapped and visible.</para>
+
+ </refsect2>
</refsect1>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]